comparison tools/get_orfs_or_cdss/get_orfs_or_cdss.py @ 9:a06ad07431ba draft

v0.2.1 Adds table 24; Depends on Biopython 1.67 via Tool Shed package or bioconda.
author peterjc
date Wed, 10 May 2017 13:24:46 -0400
parents 09a8be9247ca
children d51db443aaa4
comparison
equal deleted inserted replaced
8:09a8be9247ca 9:a06ad07431ba
15 This script is copyright 2011-2013 by Peter Cock, The James Hutton Institute 15 This script is copyright 2011-2013 by Peter Cock, The James Hutton Institute
16 (formerly SCRI), Dundee, UK. All rights reserved. 16 (formerly SCRI), Dundee, UK. All rights reserved.
17 17
18 See accompanying text file for licence details (MIT licence). 18 See accompanying text file for licence details (MIT licence).
19 """ 19 """
20
21 import re
20 import sys 22 import sys
21 import re 23
22 from optparse import OptionParser 24 from optparse import OptionParser
23 25
24 usage = """Use as follows: 26 usage = """Use as follows:
25 27
26 $ python get_orfs_or_cdss.py -i genome.fa -f fasta --table 11 -t CDS -e open -m all -s both --on cds.nuc.fa --op cds.protein.fa --ob cds.bed --og cds.gff3 28 $ python get_orfs_or_cdss.py -i genome.fa -f fasta --table 11 -t CDS -e open -m all -s both --on cds.nuc.fa --op cds.protein.fa --ob cds.bed --og cds.gff3
208 values = list(get_top_peptides(nuc_seq)) 210 values = list(get_top_peptides(nuc_seq))
209 if not values: 211 if not values:
210 raise StopIteration 212 raise StopIteration
211 yield values[0] 213 yield values[0]
212 214
215
213 if options.mode == "all": 216 if options.mode == "all":
214 get_peptides = get_all_peptides 217 get_peptides = get_all_peptides
215 elif options.mode == "top": 218 elif options.mode == "top":
216 get_peptides = get_top_peptides 219 get_peptides = get_top_peptides
217 elif options.mode == "one": 220 elif options.mode == "one":