Mercurial > repos > petr-novak > dante
changeset 14:a6c55d1bdb6c draft
Uploaded
author | petr-novak |
---|---|
date | Wed, 28 Aug 2019 08:08:47 -0400 |
parents | ab56b34d67d8 |
children | 3151a72a6671 |
files | dante.py parse_aln.py |
diffstat | 2 files changed, 50 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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)
--- /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) + +