Mercurial > repos > gga > apollo_delete_features
annotate export.py @ 12:90c7d1d29b15 draft
"planemo upload for repository https://github.com/galaxy-genome-annotation/galaxy-tools/tree/master/tools/apollo commit 6d9302680b01ce11a8f2ee744942296243d5d004"
author | gga |
---|---|
date | Fri, 24 Apr 2020 09:02:02 -0400 |
parents | df0e4eb2dfa5 |
children | 21a8cad7dfa5 |
rev | line source |
---|---|
0
4dd45d2fd904
planemo upload for repository https://github.com/galaxy-genome-annotation/galaxy-tools/tree/master/tools/apollo commit f745b23c84a615bf434d717c8c0e553a012f0268
gga
parents:
diff
changeset
|
1 #!/usr/bin/env python |
4dd45d2fd904
planemo upload for repository https://github.com/galaxy-genome-annotation/galaxy-tools/tree/master/tools/apollo commit f745b23c84a615bf434d717c8c0e553a012f0268
gga
parents:
diff
changeset
|
2 from __future__ import print_function |
4dd45d2fd904
planemo upload for repository https://github.com/galaxy-genome-annotation/galaxy-tools/tree/master/tools/apollo commit f745b23c84a615bf434d717c8c0e553a012f0268
gga
parents:
diff
changeset
|
3 |
4dd45d2fd904
planemo upload for repository https://github.com/galaxy-genome-annotation/galaxy-tools/tree/master/tools/apollo commit f745b23c84a615bf434d717c8c0e553a012f0268
gga
parents:
diff
changeset
|
4 import argparse |
4dd45d2fd904
planemo upload for repository https://github.com/galaxy-genome-annotation/galaxy-tools/tree/master/tools/apollo commit f745b23c84a615bf434d717c8c0e553a012f0268
gga
parents:
diff
changeset
|
5 import json |
10
df0e4eb2dfa5
"planemo upload for repository https://github.com/galaxy-genome-annotation/galaxy-tools/tree/master/tools/apollo commit 08015be1ee8a784e0619f961aaa724857debfd6f"
gga
parents:
5
diff
changeset
|
6 import time |
0
4dd45d2fd904
planemo upload for repository https://github.com/galaxy-genome-annotation/galaxy-tools/tree/master/tools/apollo commit f745b23c84a615bf434d717c8c0e553a012f0268
gga
parents:
diff
changeset
|
7 |
10
df0e4eb2dfa5
"planemo upload for repository https://github.com/galaxy-genome-annotation/galaxy-tools/tree/master/tools/apollo commit 08015be1ee8a784e0619f961aaa724857debfd6f"
gga
parents:
5
diff
changeset
|
8 from apollo import accessible_organisms |
df0e4eb2dfa5
"planemo upload for repository https://github.com/galaxy-genome-annotation/galaxy-tools/tree/master/tools/apollo commit 08015be1ee8a784e0619f961aaa724857debfd6f"
gga
parents:
5
diff
changeset
|
9 from apollo.util import CnOrGuess, GuessCn |
0
4dd45d2fd904
planemo upload for repository https://github.com/galaxy-genome-annotation/galaxy-tools/tree/master/tools/apollo commit f745b23c84a615bf434d717c8c0e553a012f0268
gga
parents:
diff
changeset
|
10 |
10
df0e4eb2dfa5
"planemo upload for repository https://github.com/galaxy-genome-annotation/galaxy-tools/tree/master/tools/apollo commit 08015be1ee8a784e0619f961aaa724857debfd6f"
gga
parents:
5
diff
changeset
|
11 from arrow.apollo import get_apollo_instance |
0
4dd45d2fd904
planemo upload for repository https://github.com/galaxy-genome-annotation/galaxy-tools/tree/master/tools/apollo commit f745b23c84a615bf434d717c8c0e553a012f0268
gga
parents:
diff
changeset
|
12 |
10
df0e4eb2dfa5
"planemo upload for repository https://github.com/galaxy-genome-annotation/galaxy-tools/tree/master/tools/apollo commit 08015be1ee8a784e0619f961aaa724857debfd6f"
gga
parents:
5
diff
changeset
|
13 from webapollo import UserObj, handle_credentials |
0
4dd45d2fd904
planemo upload for repository https://github.com/galaxy-genome-annotation/galaxy-tools/tree/master/tools/apollo commit f745b23c84a615bf434d717c8c0e553a012f0268
gga
parents:
diff
changeset
|
14 |
4dd45d2fd904
planemo upload for repository https://github.com/galaxy-genome-annotation/galaxy-tools/tree/master/tools/apollo commit f745b23c84a615bf434d717c8c0e553a012f0268
gga
parents:
diff
changeset
|
15 if __name__ == '__main__': |
10
df0e4eb2dfa5
"planemo upload for repository https://github.com/galaxy-genome-annotation/galaxy-tools/tree/master/tools/apollo commit 08015be1ee8a784e0619f961aaa724857debfd6f"
gga
parents:
5
diff
changeset
|
16 parser = argparse.ArgumentParser(description='Script to export data from Apollo via web services') |
0
4dd45d2fd904
planemo upload for repository https://github.com/galaxy-genome-annotation/galaxy-tools/tree/master/tools/apollo commit f745b23c84a615bf434d717c8c0e553a012f0268
gga
parents:
diff
changeset
|
17 CnOrGuess(parser) |
4dd45d2fd904
planemo upload for repository https://github.com/galaxy-genome-annotation/galaxy-tools/tree/master/tools/apollo commit f745b23c84a615bf434d717c8c0e553a012f0268
gga
parents:
diff
changeset
|
18 parser.add_argument('--gff', type=argparse.FileType('w')) |
10
df0e4eb2dfa5
"planemo upload for repository https://github.com/galaxy-genome-annotation/galaxy-tools/tree/master/tools/apollo commit 08015be1ee8a784e0619f961aaa724857debfd6f"
gga
parents:
5
diff
changeset
|
19 parser.add_argument('--fasta_pep', type=argparse.FileType('w')) |
df0e4eb2dfa5
"planemo upload for repository https://github.com/galaxy-genome-annotation/galaxy-tools/tree/master/tools/apollo commit 08015be1ee8a784e0619f961aaa724857debfd6f"
gga
parents:
5
diff
changeset
|
20 parser.add_argument('--fasta_cds', type=argparse.FileType('w')) |
df0e4eb2dfa5
"planemo upload for repository https://github.com/galaxy-genome-annotation/galaxy-tools/tree/master/tools/apollo commit 08015be1ee8a784e0619f961aaa724857debfd6f"
gga
parents:
5
diff
changeset
|
21 parser.add_argument('--fasta_cdna', type=argparse.FileType('w')) |
df0e4eb2dfa5
"planemo upload for repository https://github.com/galaxy-genome-annotation/galaxy-tools/tree/master/tools/apollo commit 08015be1ee8a784e0619f961aaa724857debfd6f"
gga
parents:
5
diff
changeset
|
22 parser.add_argument('--vcf', type=argparse.FileType('w')) |
0
4dd45d2fd904
planemo upload for repository https://github.com/galaxy-genome-annotation/galaxy-tools/tree/master/tools/apollo commit f745b23c84a615bf434d717c8c0e553a012f0268
gga
parents:
diff
changeset
|
23 parser.add_argument('--json', type=argparse.FileType('w')) |
5
f7e9c792047b
planemo upload for repository https://github.com/galaxy-genome-annotation/galaxy-tools/tree/master/tools/apollo commit 85194fa009ead2c34720faab61a4143fc29d17c2
gga
parents:
4
diff
changeset
|
24 parser.add_argument('email', help='User Email') |
0
4dd45d2fd904
planemo upload for repository https://github.com/galaxy-genome-annotation/galaxy-tools/tree/master/tools/apollo commit f745b23c84a615bf434d717c8c0e553a012f0268
gga
parents:
diff
changeset
|
25 args = parser.parse_args() |
4dd45d2fd904
planemo upload for repository https://github.com/galaxy-genome-annotation/galaxy-tools/tree/master/tools/apollo commit f745b23c84a615bf434d717c8c0e553a012f0268
gga
parents:
diff
changeset
|
26 |
10
df0e4eb2dfa5
"planemo upload for repository https://github.com/galaxy-genome-annotation/galaxy-tools/tree/master/tools/apollo commit 08015be1ee8a784e0619f961aaa724857debfd6f"
gga
parents:
5
diff
changeset
|
27 wa = get_apollo_instance() |
0
4dd45d2fd904
planemo upload for repository https://github.com/galaxy-genome-annotation/galaxy-tools/tree/master/tools/apollo commit f745b23c84a615bf434d717c8c0e553a012f0268
gga
parents:
diff
changeset
|
28 |
5
f7e9c792047b
planemo upload for repository https://github.com/galaxy-genome-annotation/galaxy-tools/tree/master/tools/apollo commit 85194fa009ead2c34720faab61a4143fc29d17c2
gga
parents:
4
diff
changeset
|
29 # User must have an apollo account, if not, create it |
10
df0e4eb2dfa5
"planemo upload for repository https://github.com/galaxy-genome-annotation/galaxy-tools/tree/master/tools/apollo commit 08015be1ee8a784e0619f961aaa724857debfd6f"
gga
parents:
5
diff
changeset
|
30 gx_user = UserObj(**wa.users._assert_or_create_user(args.email)) |
df0e4eb2dfa5
"planemo upload for repository https://github.com/galaxy-genome-annotation/galaxy-tools/tree/master/tools/apollo commit 08015be1ee8a784e0619f961aaa724857debfd6f"
gga
parents:
5
diff
changeset
|
31 handle_credentials(gx_user) |
df0e4eb2dfa5
"planemo upload for repository https://github.com/galaxy-genome-annotation/galaxy-tools/tree/master/tools/apollo commit 08015be1ee8a784e0619f961aaa724857debfd6f"
gga
parents:
5
diff
changeset
|
32 |
df0e4eb2dfa5
"planemo upload for repository https://github.com/galaxy-genome-annotation/galaxy-tools/tree/master/tools/apollo commit 08015be1ee8a784e0619f961aaa724857debfd6f"
gga
parents:
5
diff
changeset
|
33 org_cns, seqs = GuessCn(args, wa) |
df0e4eb2dfa5
"planemo upload for repository https://github.com/galaxy-genome-annotation/galaxy-tools/tree/master/tools/apollo commit 08015be1ee8a784e0619f961aaa724857debfd6f"
gga
parents:
5
diff
changeset
|
34 if not isinstance(org_cns, list): |
df0e4eb2dfa5
"planemo upload for repository https://github.com/galaxy-genome-annotation/galaxy-tools/tree/master/tools/apollo commit 08015be1ee8a784e0619f961aaa724857debfd6f"
gga
parents:
5
diff
changeset
|
35 org_cns = [org_cns] |
df0e4eb2dfa5
"planemo upload for repository https://github.com/galaxy-genome-annotation/galaxy-tools/tree/master/tools/apollo commit 08015be1ee8a784e0619f961aaa724857debfd6f"
gga
parents:
5
diff
changeset
|
36 |
df0e4eb2dfa5
"planemo upload for repository https://github.com/galaxy-genome-annotation/galaxy-tools/tree/master/tools/apollo commit 08015be1ee8a784e0619f961aaa724857debfd6f"
gga
parents:
5
diff
changeset
|
37 all_orgs = wa.organisms.get_organisms() |
df0e4eb2dfa5
"planemo upload for repository https://github.com/galaxy-genome-annotation/galaxy-tools/tree/master/tools/apollo commit 08015be1ee8a784e0619f961aaa724857debfd6f"
gga
parents:
5
diff
changeset
|
38 if 'error' in all_orgs: |
df0e4eb2dfa5
"planemo upload for repository https://github.com/galaxy-genome-annotation/galaxy-tools/tree/master/tools/apollo commit 08015be1ee8a784e0619f961aaa724857debfd6f"
gga
parents:
5
diff
changeset
|
39 all_orgs = [] |
df0e4eb2dfa5
"planemo upload for repository https://github.com/galaxy-genome-annotation/galaxy-tools/tree/master/tools/apollo commit 08015be1ee8a784e0619f961aaa724857debfd6f"
gga
parents:
5
diff
changeset
|
40 all_orgs = [org['commonName'] for org in all_orgs] |
5
f7e9c792047b
planemo upload for repository https://github.com/galaxy-genome-annotation/galaxy-tools/tree/master/tools/apollo commit 85194fa009ead2c34720faab61a4143fc29d17c2
gga
parents:
4
diff
changeset
|
41 |
0
4dd45d2fd904
planemo upload for repository https://github.com/galaxy-genome-annotation/galaxy-tools/tree/master/tools/apollo commit f745b23c84a615bf434d717c8c0e553a012f0268
gga
parents:
diff
changeset
|
42 org_data = [] |
10
df0e4eb2dfa5
"planemo upload for repository https://github.com/galaxy-genome-annotation/galaxy-tools/tree/master/tools/apollo commit 08015be1ee8a784e0619f961aaa724857debfd6f"
gga
parents:
5
diff
changeset
|
43 for org_cn in org_cns: |
df0e4eb2dfa5
"planemo upload for repository https://github.com/galaxy-genome-annotation/galaxy-tools/tree/master/tools/apollo commit 08015be1ee8a784e0619f961aaa724857debfd6f"
gga
parents:
5
diff
changeset
|
44 if org_cn not in all_orgs: |
df0e4eb2dfa5
"planemo upload for repository https://github.com/galaxy-genome-annotation/galaxy-tools/tree/master/tools/apollo commit 08015be1ee8a784e0619f961aaa724857debfd6f"
gga
parents:
5
diff
changeset
|
45 raise Exception("Could not find organism %s" % org_cn) |
df0e4eb2dfa5
"planemo upload for repository https://github.com/galaxy-genome-annotation/galaxy-tools/tree/master/tools/apollo commit 08015be1ee8a784e0619f961aaa724857debfd6f"
gga
parents:
5
diff
changeset
|
46 |
df0e4eb2dfa5
"planemo upload for repository https://github.com/galaxy-genome-annotation/galaxy-tools/tree/master/tools/apollo commit 08015be1ee8a784e0619f961aaa724857debfd6f"
gga
parents:
5
diff
changeset
|
47 orgs = accessible_organisms(gx_user, [org_cn], 'READ') |
df0e4eb2dfa5
"planemo upload for repository https://github.com/galaxy-genome-annotation/galaxy-tools/tree/master/tools/apollo commit 08015be1ee8a784e0619f961aaa724857debfd6f"
gga
parents:
5
diff
changeset
|
48 if not orgs: |
df0e4eb2dfa5
"planemo upload for repository https://github.com/galaxy-genome-annotation/galaxy-tools/tree/master/tools/apollo commit 08015be1ee8a784e0619f961aaa724857debfd6f"
gga
parents:
5
diff
changeset
|
49 raise Exception("You do not have read permission on organism %s" % org_cn) |
df0e4eb2dfa5
"planemo upload for repository https://github.com/galaxy-genome-annotation/galaxy-tools/tree/master/tools/apollo commit 08015be1ee8a784e0619f961aaa724857debfd6f"
gga
parents:
5
diff
changeset
|
50 |
df0e4eb2dfa5
"planemo upload for repository https://github.com/galaxy-genome-annotation/galaxy-tools/tree/master/tools/apollo commit 08015be1ee8a784e0619f961aaa724857debfd6f"
gga
parents:
5
diff
changeset
|
51 org = wa.organisms.show_organism(org_cn) |
df0e4eb2dfa5
"planemo upload for repository https://github.com/galaxy-genome-annotation/galaxy-tools/tree/master/tools/apollo commit 08015be1ee8a784e0619f961aaa724857debfd6f"
gga
parents:
5
diff
changeset
|
52 |
df0e4eb2dfa5
"planemo upload for repository https://github.com/galaxy-genome-annotation/galaxy-tools/tree/master/tools/apollo commit 08015be1ee8a784e0619f961aaa724857debfd6f"
gga
parents:
5
diff
changeset
|
53 uuid_gff = wa.io.write_downloadable(org['commonName'], 'GFF3', export_gff3_fasta=True, sequences=seqs) |
df0e4eb2dfa5
"planemo upload for repository https://github.com/galaxy-genome-annotation/galaxy-tools/tree/master/tools/apollo commit 08015be1ee8a784e0619f961aaa724857debfd6f"
gga
parents:
5
diff
changeset
|
54 if 'error' in uuid_gff or 'uuid' not in uuid_gff: |
df0e4eb2dfa5
"planemo upload for repository https://github.com/galaxy-genome-annotation/galaxy-tools/tree/master/tools/apollo commit 08015be1ee8a784e0619f961aaa724857debfd6f"
gga
parents:
5
diff
changeset
|
55 raise Exception("Apollo failed to prepare the file for download: %s" % uuid_gff) |
df0e4eb2dfa5
"planemo upload for repository https://github.com/galaxy-genome-annotation/galaxy-tools/tree/master/tools/apollo commit 08015be1ee8a784e0619f961aaa724857debfd6f"
gga
parents:
5
diff
changeset
|
56 args.gff.write(wa.io.download(uuid_gff['uuid'], output_format="text")) |
df0e4eb2dfa5
"planemo upload for repository https://github.com/galaxy-genome-annotation/galaxy-tools/tree/master/tools/apollo commit 08015be1ee8a784e0619f961aaa724857debfd6f"
gga
parents:
5
diff
changeset
|
57 |
df0e4eb2dfa5
"planemo upload for repository https://github.com/galaxy-genome-annotation/galaxy-tools/tree/master/tools/apollo commit 08015be1ee8a784e0619f961aaa724857debfd6f"
gga
parents:
5
diff
changeset
|
58 time.sleep(1) |
df0e4eb2dfa5
"planemo upload for repository https://github.com/galaxy-genome-annotation/galaxy-tools/tree/master/tools/apollo commit 08015be1ee8a784e0619f961aaa724857debfd6f"
gga
parents:
5
diff
changeset
|
59 |
df0e4eb2dfa5
"planemo upload for repository https://github.com/galaxy-genome-annotation/galaxy-tools/tree/master/tools/apollo commit 08015be1ee8a784e0619f961aaa724857debfd6f"
gga
parents:
5
diff
changeset
|
60 uuid_vcf = wa.io.write_downloadable(org['commonName'], 'VCF', sequences=seqs) |
df0e4eb2dfa5
"planemo upload for repository https://github.com/galaxy-genome-annotation/galaxy-tools/tree/master/tools/apollo commit 08015be1ee8a784e0619f961aaa724857debfd6f"
gga
parents:
5
diff
changeset
|
61 if 'error' in uuid_vcf or 'uuid' not in uuid_vcf: |
df0e4eb2dfa5
"planemo upload for repository https://github.com/galaxy-genome-annotation/galaxy-tools/tree/master/tools/apollo commit 08015be1ee8a784e0619f961aaa724857debfd6f"
gga
parents:
5
diff
changeset
|
62 raise Exception("Apollo failed to prepare the file for download: %s" % uuid_vcf) |
df0e4eb2dfa5
"planemo upload for repository https://github.com/galaxy-genome-annotation/galaxy-tools/tree/master/tools/apollo commit 08015be1ee8a784e0619f961aaa724857debfd6f"
gga
parents:
5
diff
changeset
|
63 args.vcf.write(wa.io.download(uuid_vcf['uuid'], output_format="text")) |
df0e4eb2dfa5
"planemo upload for repository https://github.com/galaxy-genome-annotation/galaxy-tools/tree/master/tools/apollo commit 08015be1ee8a784e0619f961aaa724857debfd6f"
gga
parents:
5
diff
changeset
|
64 |
df0e4eb2dfa5
"planemo upload for repository https://github.com/galaxy-genome-annotation/galaxy-tools/tree/master/tools/apollo commit 08015be1ee8a784e0619f961aaa724857debfd6f"
gga
parents:
5
diff
changeset
|
65 time.sleep(1) |
df0e4eb2dfa5
"planemo upload for repository https://github.com/galaxy-genome-annotation/galaxy-tools/tree/master/tools/apollo commit 08015be1ee8a784e0619f961aaa724857debfd6f"
gga
parents:
5
diff
changeset
|
66 |
df0e4eb2dfa5
"planemo upload for repository https://github.com/galaxy-genome-annotation/galaxy-tools/tree/master/tools/apollo commit 08015be1ee8a784e0619f961aaa724857debfd6f"
gga
parents:
5
diff
changeset
|
67 uuid_fa = wa.io.write_downloadable(org['commonName'], 'FASTA', sequences=seqs, seq_type='cdna') |
df0e4eb2dfa5
"planemo upload for repository https://github.com/galaxy-genome-annotation/galaxy-tools/tree/master/tools/apollo commit 08015be1ee8a784e0619f961aaa724857debfd6f"
gga
parents:
5
diff
changeset
|
68 if 'error' in uuid_fa or 'uuid' not in uuid_fa: |
df0e4eb2dfa5
"planemo upload for repository https://github.com/galaxy-genome-annotation/galaxy-tools/tree/master/tools/apollo commit 08015be1ee8a784e0619f961aaa724857debfd6f"
gga
parents:
5
diff
changeset
|
69 raise Exception("Apollo failed to prepare the file for download: %s" % uuid_fa) |
df0e4eb2dfa5
"planemo upload for repository https://github.com/galaxy-genome-annotation/galaxy-tools/tree/master/tools/apollo commit 08015be1ee8a784e0619f961aaa724857debfd6f"
gga
parents:
5
diff
changeset
|
70 args.fasta_cdna.write(wa.io.download(uuid_fa['uuid'], output_format="text")) |
df0e4eb2dfa5
"planemo upload for repository https://github.com/galaxy-genome-annotation/galaxy-tools/tree/master/tools/apollo commit 08015be1ee8a784e0619f961aaa724857debfd6f"
gga
parents:
5
diff
changeset
|
71 |
df0e4eb2dfa5
"planemo upload for repository https://github.com/galaxy-genome-annotation/galaxy-tools/tree/master/tools/apollo commit 08015be1ee8a784e0619f961aaa724857debfd6f"
gga
parents:
5
diff
changeset
|
72 time.sleep(1) |
df0e4eb2dfa5
"planemo upload for repository https://github.com/galaxy-genome-annotation/galaxy-tools/tree/master/tools/apollo commit 08015be1ee8a784e0619f961aaa724857debfd6f"
gga
parents:
5
diff
changeset
|
73 |
df0e4eb2dfa5
"planemo upload for repository https://github.com/galaxy-genome-annotation/galaxy-tools/tree/master/tools/apollo commit 08015be1ee8a784e0619f961aaa724857debfd6f"
gga
parents:
5
diff
changeset
|
74 uuid_fa = wa.io.write_downloadable(org['commonName'], 'FASTA', sequences=seqs, seq_type='cds') |
df0e4eb2dfa5
"planemo upload for repository https://github.com/galaxy-genome-annotation/galaxy-tools/tree/master/tools/apollo commit 08015be1ee8a784e0619f961aaa724857debfd6f"
gga
parents:
5
diff
changeset
|
75 if 'error' in uuid_fa or 'uuid' not in uuid_fa: |
df0e4eb2dfa5
"planemo upload for repository https://github.com/galaxy-genome-annotation/galaxy-tools/tree/master/tools/apollo commit 08015be1ee8a784e0619f961aaa724857debfd6f"
gga
parents:
5
diff
changeset
|
76 raise Exception("Apollo failed to prepare the file for download: %s" % uuid_fa) |
df0e4eb2dfa5
"planemo upload for repository https://github.com/galaxy-genome-annotation/galaxy-tools/tree/master/tools/apollo commit 08015be1ee8a784e0619f961aaa724857debfd6f"
gga
parents:
5
diff
changeset
|
77 args.fasta_cds.write(wa.io.download(uuid_fa['uuid'], output_format="text")) |
df0e4eb2dfa5
"planemo upload for repository https://github.com/galaxy-genome-annotation/galaxy-tools/tree/master/tools/apollo commit 08015be1ee8a784e0619f961aaa724857debfd6f"
gga
parents:
5
diff
changeset
|
78 |
df0e4eb2dfa5
"planemo upload for repository https://github.com/galaxy-genome-annotation/galaxy-tools/tree/master/tools/apollo commit 08015be1ee8a784e0619f961aaa724857debfd6f"
gga
parents:
5
diff
changeset
|
79 time.sleep(1) |
df0e4eb2dfa5
"planemo upload for repository https://github.com/galaxy-genome-annotation/galaxy-tools/tree/master/tools/apollo commit 08015be1ee8a784e0619f961aaa724857debfd6f"
gga
parents:
5
diff
changeset
|
80 |
df0e4eb2dfa5
"planemo upload for repository https://github.com/galaxy-genome-annotation/galaxy-tools/tree/master/tools/apollo commit 08015be1ee8a784e0619f961aaa724857debfd6f"
gga
parents:
5
diff
changeset
|
81 uuid_fa = wa.io.write_downloadable(org['commonName'], 'FASTA', sequences=seqs, seq_type='peptide') |
df0e4eb2dfa5
"planemo upload for repository https://github.com/galaxy-genome-annotation/galaxy-tools/tree/master/tools/apollo commit 08015be1ee8a784e0619f961aaa724857debfd6f"
gga
parents:
5
diff
changeset
|
82 if 'error' in uuid_fa or 'uuid' not in uuid_fa: |
df0e4eb2dfa5
"planemo upload for repository https://github.com/galaxy-genome-annotation/galaxy-tools/tree/master/tools/apollo commit 08015be1ee8a784e0619f961aaa724857debfd6f"
gga
parents:
5
diff
changeset
|
83 raise Exception("Apollo failed to prepare the file for download: %s" % uuid_fa) |
df0e4eb2dfa5
"planemo upload for repository https://github.com/galaxy-genome-annotation/galaxy-tools/tree/master/tools/apollo commit 08015be1ee8a784e0619f961aaa724857debfd6f"
gga
parents:
5
diff
changeset
|
84 args.fasta_pep.write(wa.io.download(uuid_fa['uuid'], output_format="text")) |
df0e4eb2dfa5
"planemo upload for repository https://github.com/galaxy-genome-annotation/galaxy-tools/tree/master/tools/apollo commit 08015be1ee8a784e0619f961aaa724857debfd6f"
gga
parents:
5
diff
changeset
|
85 |
df0e4eb2dfa5
"planemo upload for repository https://github.com/galaxy-genome-annotation/galaxy-tools/tree/master/tools/apollo commit 08015be1ee8a784e0619f961aaa724857debfd6f"
gga
parents:
5
diff
changeset
|
86 org_data.append(org) |
df0e4eb2dfa5
"planemo upload for repository https://github.com/galaxy-genome-annotation/galaxy-tools/tree/master/tools/apollo commit 08015be1ee8a784e0619f961aaa724857debfd6f"
gga
parents:
5
diff
changeset
|
87 |
0
4dd45d2fd904
planemo upload for repository https://github.com/galaxy-genome-annotation/galaxy-tools/tree/master/tools/apollo commit f745b23c84a615bf434d717c8c0e553a012f0268
gga
parents:
diff
changeset
|
88 args.json.write(json.dumps(org_data, indent=2)) |