comparison get_genetree.py @ 5:0fa1d1cc417d draft

"planemo upload for repository https://github.com/TGAC/earlham-galaxytools/tree/master/tools/Ensembl-REST commit ed32f2e6d8174873cefcbe141084f857f84b0586"
author earlhaminst
date Thu, 31 Oct 2019 07:50:07 -0400
parents 4b7261f484bb
children 7af66c2b3831
comparison
equal deleted inserted replaced
4:3b686142e9c2 5:0fa1d1cc417d
16 default='json', help='Output format') 16 default='json', help='Output format')
17 parser.add_option('-s', '--sequence', type='choice', 17 parser.add_option('-s', '--sequence', type='choice',
18 choices=['protein', 'cdna', 'none'], default='protein', 18 choices=['protein', 'cdna', 'none'], default='protein',
19 help='The type of sequence to bring back. Setting it to none results in no sequence being returned') 19 help='The type of sequence to bring back. Setting it to none results in no sequence being returned')
20 20
21 parser.add_option('-g', '--species', type='choice',
22 choices=['ensembl', 'ensemblgenomes'], default='ensembl',
23 help='Specify the genome databases for vertebrates and other eukaryotic species')
24
25 parser.add_option('-a', '--aligned', type='choice', choices=['0', '1'], 21 parser.add_option('-a', '--aligned', type='choice', choices=['0', '1'],
26 default='0', help='Return the aligned string if true. Otherwise, return the original sequence (no insertions)') 22 default='0', help='Return the aligned string if true. Otherwise, return the original sequence (no insertions)')
27 parser.add_option('-c', '--cigar_line', type='choice', choices=['0', '1'], 23 parser.add_option('-c', '--cigar_line', type='choice', choices=['0', '1'],
28 default='0', 24 default='0',
29 help='Return the aligned sequence encoded in CIGAR format') 25 help='Return the aligned sequence encoded in CIGAR format')
33 help='The format of a NH (New Hampshire) request') 29 help='The format of a NH (New Hampshire) request')
34 options, args = parser.parse_args() 30 options, args = parser.parse_args()
35 if options.input is None: 31 if options.input is None:
36 raise Exception('-i option must be specified') 32 raise Exception('-i option must be specified')
37 33
38 server = 'http://rest.%s.org' % options.species 34 server = 'http://rest.ensembl.org'
39 35
40 if options.id_type == 'gene_id': 36 if options.id_type == 'gene_id':
41 ext = 'genetree/member/id' 37 ext = 'genetree/member/id'
42 elif options.id_type == 'gene_tree_id': 38 elif options.id_type == 'gene_tree_id':
43 ext = 'genetree/id' 39 ext = 'genetree/id'