Mercurial > repos > earlhaminst > ensembl_get_sequences
comparison get_feature_info.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 | 3b686142e9c2 |
children | 7af66c2b3831 |
comparison
equal
deleted
inserted
replaced
4:3b686142e9c2 | 5:0fa1d1cc417d |
---|---|
13 parser.add_option('-i', '--input', help='List of Ensembl IDs') | 13 parser.add_option('-i', '--input', help='List of Ensembl IDs') |
14 parser.add_option('-e', '--expand', type='choice', choices=['0', '1'], | 14 parser.add_option('-e', '--expand', type='choice', choices=['0', '1'], |
15 default='0', | 15 default='0', |
16 help='Expands the search to include any connected features. e.g. If the object is a gene, its transcripts, translations and exons will be returned as well.') | 16 help='Expands the search to include any connected features. e.g. If the object is a gene, its transcripts, translations and exons will be returned as well.') |
17 | 17 |
18 parser.add_option('-s', '--species', type='choice', | |
19 choices=['ensembl', 'ensemblgenomes'], default='ensembl', | |
20 help='Specify the genome databases for vertebrates and other eukaryotic species') | |
21 | |
22 parser.add_option('-f', '--format', type='choice', | 18 parser.add_option('-f', '--format', type='choice', |
23 choices=['full', 'condensed'], default='full', | 19 choices=['full', 'condensed'], default='full', |
24 help='Specify the formats to emit from this endpoint') | 20 help='Specify the formats to emit from this endpoint') |
25 options, args = parser.parse_args() | 21 options, args = parser.parse_args() |
26 if options.input is None: | 22 if options.input is None: |
27 raise Exception('-i option must be specified') | 23 raise Exception('-i option must be specified') |
28 | 24 |
29 | 25 |
30 server = 'http://rest.%s.org' % options.species | 26 server = 'http://rest.ensembl.org' |
31 ext = 'lookup/id' | 27 ext = 'lookup/id' |
32 | 28 |
33 headers = {'Content-Type': 'application/json', 'Accept': 'application/json'} | 29 headers = {'Content-Type': 'application/json', 'Accept': 'application/json'} |
34 params = dict((k, getattr(options, k)) for k in ['format', 'expand']) | 30 params = dict((k, getattr(options, k)) for k in ['format', 'expand']) |
35 | 31 |