# HG changeset patch # User petr-novak # Date 1566994127 14400 # Node ID a6c55d1bdb6cfb469ea0e051a7d9c72189fcedd1 # Parent ab56b34d67d8ee02f972042890057511c5a41527 Uploaded 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) 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 @@ -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) + +