Mercurial > repos > artbio > mircounts
comparison mature_mir_gff_translation.py @ 10:de227b7307cf draft
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/mircounts commit af0f70b8156c078cc0d832c54ebb678af10c42a0
author | artbio |
---|---|
date | Sun, 29 Apr 2018 18:57:13 -0400 |
parents | 2a08a6eb471c |
children | b045c30fb768 |
comparison
equal
deleted
inserted
replaced
9:2a08a6eb471c | 10:de227b7307cf |
---|---|
3 | 3 |
4 | 4 |
5 def Parser(): | 5 def Parser(): |
6 the_parser = argparse.ArgumentParser() | 6 the_parser = argparse.ArgumentParser() |
7 the_parser.add_argument( | 7 the_parser.add_argument( |
8 '--input', action="store", type=str, help="input miRBase GFF3 file") | 8 '--gff_path', action="store", type=str, |
9 help="path to miRBase GFF3 file") | |
9 the_parser.add_argument( | 10 the_parser.add_argument( |
10 '--output', action="store", type=str, | 11 '--output', action="store", type=str, |
11 help="output GFF3 file with converted mature mir coordinates") | 12 help="output GFF3 file with converted mature mir coordinates") |
13 the_parser.add_argument( | |
14 '--basename', action="store", type=str, | |
15 help="basename of the parsed gff file returned") | |
12 args = the_parser.parse_args() | 16 args = the_parser.parse_args() |
13 return args | 17 return args |
14 | 18 |
15 | 19 |
16 def convert_and_print_gff(gff_input_file, output): | 20 def convert_and_print_gff(gff_input_file, output): |
93 output.write('%s' % get_gff_header(gff_input_file)) | 97 output.write('%s' % get_gff_header(gff_input_file)) |
94 output.write('\n'.join(gff_list)) | 98 output.write('\n'.join(gff_list)) |
95 output.write('\n') | 99 output.write('\n') |
96 | 100 |
97 | 101 |
98 def main(infile, outfile): | 102 def main(gff_path, outfile): |
99 convert_and_print_gff(infile, outfile) | 103 convert_and_print_gff(gff_path, outfile) |
100 | 104 |
101 | 105 |
102 if __name__ == "__main__": | 106 if __name__ == "__main__": |
103 args = Parser() | 107 args = Parser() |
104 main(args.input, args.output) | 108 main(args.gff_path, args.output) |