Repository 'dante'
hg clone https://toolshed.g2.bx.psu.edu/repos/petr-novak/dante

Changeset 14:a6c55d1bdb6c (2019-08-28)
Previous changeset 13:ab56b34d67d8 (2019-08-15) Next changeset 15:3151a72a6671 (2019-09-03)
Commit message:
Uploaded
modified:
dante.py
added:
parse_aln.py
b
diff -r ab56b34d67d8 -r a6c55d1bdb6c dante.py
--- a/dante.py Thu Aug 15 07:48:49 2019 -0400
+++ b/dante.py Wed Aug 28 08:08:47 2019 -0400
[
@@ -585,9 +585,14 @@
             db_ends_best = db_ends[best_idx_reg]
             if count_region == len(indices_plus):
                 strand_gff = "-"
+            if strand_gff == "+":
+                feature_start = min(start_hit[regions_above_threshold])-1
+                feature_end = max(end_hit[regions_above_threshold])
+            else:
+                feature_end = seq_len[region][0] - min(start_hit[regions_above_threshold]) - 1
+                feature_start = seq_len[region][0] - max(end_hit[regions_above_threshold]) + 1
             create_gff3(domain_type, ann_substring, unique_annotations,
-                        ann_pos_counts, min(start_hit[regions_above_threshold])-1,
-                        max(end_hit[regions_above_threshold]),
+                        ann_pos_counts, feature_start,feature_end,
                         step, best_idx, annotation_best, db_name_best,
                         db_starts_best, db_ends_best, strand_gff, score,
                         seq_id, db_seq, query_seq, domain_size, positions, gff, consensus)
b
diff -r ab56b34d67d8 -r a6c55d1bdb6c parse_aln.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/parse_aln.py Wed Aug 28 08:08:47 2019 -0400
b
@@ -0,0 +1,43 @@
+#!/usr/bin/env python3
+'''
+parse .aln file - output from cap3 program. Output is fasta file and
+profile file
+'''
+import argparse
+
+
+def parse_args():
+    '''Argument parsin'''
+    description = """
+    parsing cap3 assembly aln output
+    """
+    parser = argparse.ArgumentParser(description=description,
+                                     formatter_class=argparse.RawTextHelpFormatter)
+    parser.add_argument(
+        '-a', '--aln_file',
+        default=None, required=True,
+        help="Aln file input",
+        type=str,
+        action='store')
+    parser.add_argument(
+        '-f', '--fasta',
+        default=None, required=True,
+        help="fasta output file name",
+        type=str,
+        action='store')
+    parser.add_argument(
+        '-p', '--profile',
+        default=None, required=True,
+        help="output file for coverage profile",
+        type=str,
+        action="store"
+    )
+    return parser.parse_args()
+
+
+if __name__ == "__main__":
+
+    args = parse_args()
+    print(args.profile)
+
+