Mercurial > repos > tduigou > get_sbml_model
annotate get_infos.py @ 7:33be348bf9d6 draft
planemo upload for repository https://github.com/brsynth/synbiocad-galaxy-wrappers commit 1a86e55d9e8c539de5fe8110ba85a2489473bde4
| author | tduigou |
|---|---|
| date | Tue, 26 Sep 2023 12:59:14 +0000 |
| parents | 4c773948a490 |
| children | 06366f104f78 |
| rev | line source |
|---|---|
|
1
e276119e73c8
planemo upload for repository https://github.com/brsynth/synbiocad-galaxy-wrappers commit eadd9bb9edbc70361b9e8d7900e6743b37142ee3
tduigou
parents:
diff
changeset
|
1 from argparse import ArgumentParser |
|
e276119e73c8
planemo upload for repository https://github.com/brsynth/synbiocad-galaxy-wrappers commit eadd9bb9edbc70361b9e8d7900e6743b37142ee3
tduigou
parents:
diff
changeset
|
2 from libsbml import ( |
|
e276119e73c8
planemo upload for repository https://github.com/brsynth/synbiocad-galaxy-wrappers commit eadd9bb9edbc70361b9e8d7900e6743b37142ee3
tduigou
parents:
diff
changeset
|
3 readSBMLFromFile |
|
e276119e73c8
planemo upload for repository https://github.com/brsynth/synbiocad-galaxy-wrappers commit eadd9bb9edbc70361b9e8d7900e6743b37142ee3
tduigou
parents:
diff
changeset
|
4 ) |
|
2
52649039cf3f
planemo upload for repository https://github.com/brsynth/synbiocad-galaxy-wrappers commit d1f5bac36c249e0767ed0bb968a1f4b5843256e3
tduigou
parents:
1
diff
changeset
|
5 from requests import get as r_get |
|
1
e276119e73c8
planemo upload for repository https://github.com/brsynth/synbiocad-galaxy-wrappers commit eadd9bb9edbc70361b9e8d7900e6743b37142ee3
tduigou
parents:
diff
changeset
|
6 |
|
e276119e73c8
planemo upload for repository https://github.com/brsynth/synbiocad-galaxy-wrappers commit eadd9bb9edbc70361b9e8d7900e6743b37142ee3
tduigou
parents:
diff
changeset
|
7 |
|
e276119e73c8
planemo upload for repository https://github.com/brsynth/synbiocad-galaxy-wrappers commit eadd9bb9edbc70361b9e8d7900e6743b37142ee3
tduigou
parents:
diff
changeset
|
8 def entry_point(): |
|
e276119e73c8
planemo upload for repository https://github.com/brsynth/synbiocad-galaxy-wrappers commit eadd9bb9edbc70361b9e8d7900e6743b37142ee3
tduigou
parents:
diff
changeset
|
9 parser = ArgumentParser('Returns cell informations') |
|
e276119e73c8
planemo upload for repository https://github.com/brsynth/synbiocad-galaxy-wrappers commit eadd9bb9edbc70361b9e8d7900e6743b37142ee3
tduigou
parents:
diff
changeset
|
10 parser.add_argument( |
|
e276119e73c8
planemo upload for repository https://github.com/brsynth/synbiocad-galaxy-wrappers commit eadd9bb9edbc70361b9e8d7900e6743b37142ee3
tduigou
parents:
diff
changeset
|
11 'infile', |
|
e276119e73c8
planemo upload for repository https://github.com/brsynth/synbiocad-galaxy-wrappers commit eadd9bb9edbc70361b9e8d7900e6743b37142ee3
tduigou
parents:
diff
changeset
|
12 type=str, |
|
e276119e73c8
planemo upload for repository https://github.com/brsynth/synbiocad-galaxy-wrappers commit eadd9bb9edbc70361b9e8d7900e6743b37142ee3
tduigou
parents:
diff
changeset
|
13 help='SBML input file (xml)' |
|
e276119e73c8
planemo upload for repository https://github.com/brsynth/synbiocad-galaxy-wrappers commit eadd9bb9edbc70361b9e8d7900e6743b37142ee3
tduigou
parents:
diff
changeset
|
14 ) |
|
7
33be348bf9d6
planemo upload for repository https://github.com/brsynth/synbiocad-galaxy-wrappers commit 1a86e55d9e8c539de5fe8110ba85a2489473bde4
tduigou
parents:
4
diff
changeset
|
15 # argument to tag file from BiGG |
|
33be348bf9d6
planemo upload for repository https://github.com/brsynth/synbiocad-galaxy-wrappers commit 1a86e55d9e8c539de5fe8110ba85a2489473bde4
tduigou
parents:
4
diff
changeset
|
16 parser.add_argument( |
|
33be348bf9d6
planemo upload for repository https://github.com/brsynth/synbiocad-galaxy-wrappers commit 1a86e55d9e8c539de5fe8110ba85a2489473bde4
tduigou
parents:
4
diff
changeset
|
17 '--bigg', |
|
33be348bf9d6
planemo upload for repository https://github.com/brsynth/synbiocad-galaxy-wrappers commit 1a86e55d9e8c539de5fe8110ba85a2489473bde4
tduigou
parents:
4
diff
changeset
|
18 action='store_true', |
|
33be348bf9d6
planemo upload for repository https://github.com/brsynth/synbiocad-galaxy-wrappers commit 1a86e55d9e8c539de5fe8110ba85a2489473bde4
tduigou
parents:
4
diff
changeset
|
19 help='Tag file from BiGG' |
|
33be348bf9d6
planemo upload for repository https://github.com/brsynth/synbiocad-galaxy-wrappers commit 1a86e55d9e8c539de5fe8110ba85a2489473bde4
tduigou
parents:
4
diff
changeset
|
20 ) |
|
1
e276119e73c8
planemo upload for repository https://github.com/brsynth/synbiocad-galaxy-wrappers commit eadd9bb9edbc70361b9e8d7900e6743b37142ee3
tduigou
parents:
diff
changeset
|
21 parser.add_argument( |
|
e276119e73c8
planemo upload for repository https://github.com/brsynth/synbiocad-galaxy-wrappers commit eadd9bb9edbc70361b9e8d7900e6743b37142ee3
tduigou
parents:
diff
changeset
|
22 '--comp', |
|
e276119e73c8
planemo upload for repository https://github.com/brsynth/synbiocad-galaxy-wrappers commit eadd9bb9edbc70361b9e8d7900e6743b37142ee3
tduigou
parents:
diff
changeset
|
23 type=str, |
|
e276119e73c8
planemo upload for repository https://github.com/brsynth/synbiocad-galaxy-wrappers commit eadd9bb9edbc70361b9e8d7900e6743b37142ee3
tduigou
parents:
diff
changeset
|
24 help='Path to store cell compartments' |
|
e276119e73c8
planemo upload for repository https://github.com/brsynth/synbiocad-galaxy-wrappers commit eadd9bb9edbc70361b9e8d7900e6743b37142ee3
tduigou
parents:
diff
changeset
|
25 ) |
|
e276119e73c8
planemo upload for repository https://github.com/brsynth/synbiocad-galaxy-wrappers commit eadd9bb9edbc70361b9e8d7900e6743b37142ee3
tduigou
parents:
diff
changeset
|
26 parser.add_argument( |
|
e276119e73c8
planemo upload for repository https://github.com/brsynth/synbiocad-galaxy-wrappers commit eadd9bb9edbc70361b9e8d7900e6743b37142ee3
tduigou
parents:
diff
changeset
|
27 '--biomass', |
|
e276119e73c8
planemo upload for repository https://github.com/brsynth/synbiocad-galaxy-wrappers commit eadd9bb9edbc70361b9e8d7900e6743b37142ee3
tduigou
parents:
diff
changeset
|
28 type=str, |
|
e276119e73c8
planemo upload for repository https://github.com/brsynth/synbiocad-galaxy-wrappers commit eadd9bb9edbc70361b9e8d7900e6743b37142ee3
tduigou
parents:
diff
changeset
|
29 help='Path to store biomass reaction ID' |
|
e276119e73c8
planemo upload for repository https://github.com/brsynth/synbiocad-galaxy-wrappers commit eadd9bb9edbc70361b9e8d7900e6743b37142ee3
tduigou
parents:
diff
changeset
|
30 ) |
|
2
52649039cf3f
planemo upload for repository https://github.com/brsynth/synbiocad-galaxy-wrappers commit d1f5bac36c249e0767ed0bb968a1f4b5843256e3
tduigou
parents:
1
diff
changeset
|
31 parser.add_argument( |
|
52649039cf3f
planemo upload for repository https://github.com/brsynth/synbiocad-galaxy-wrappers commit d1f5bac36c249e0767ed0bb968a1f4b5843256e3
tduigou
parents:
1
diff
changeset
|
32 '--hostid', |
|
52649039cf3f
planemo upload for repository https://github.com/brsynth/synbiocad-galaxy-wrappers commit d1f5bac36c249e0767ed0bb968a1f4b5843256e3
tduigou
parents:
1
diff
changeset
|
33 type=str, |
|
52649039cf3f
planemo upload for repository https://github.com/brsynth/synbiocad-galaxy-wrappers commit d1f5bac36c249e0767ed0bb968a1f4b5843256e3
tduigou
parents:
1
diff
changeset
|
34 help='Extended name of the host organism' |
|
52649039cf3f
planemo upload for repository https://github.com/brsynth/synbiocad-galaxy-wrappers commit d1f5bac36c249e0767ed0bb968a1f4b5843256e3
tduigou
parents:
1
diff
changeset
|
35 ) |
|
52649039cf3f
planemo upload for repository https://github.com/brsynth/synbiocad-galaxy-wrappers commit d1f5bac36c249e0767ed0bb968a1f4b5843256e3
tduigou
parents:
1
diff
changeset
|
36 parser.add_argument( |
|
52649039cf3f
planemo upload for repository https://github.com/brsynth/synbiocad-galaxy-wrappers commit d1f5bac36c249e0767ed0bb968a1f4b5843256e3
tduigou
parents:
1
diff
changeset
|
37 '--taxid', |
|
52649039cf3f
planemo upload for repository https://github.com/brsynth/synbiocad-galaxy-wrappers commit d1f5bac36c249e0767ed0bb968a1f4b5843256e3
tduigou
parents:
1
diff
changeset
|
38 type=str, |
|
52649039cf3f
planemo upload for repository https://github.com/brsynth/synbiocad-galaxy-wrappers commit d1f5bac36c249e0767ed0bb968a1f4b5843256e3
tduigou
parents:
1
diff
changeset
|
39 help='Path to store host taxonomy ID' |
|
52649039cf3f
planemo upload for repository https://github.com/brsynth/synbiocad-galaxy-wrappers commit d1f5bac36c249e0767ed0bb968a1f4b5843256e3
tduigou
parents:
1
diff
changeset
|
40 ) |
|
1
e276119e73c8
planemo upload for repository https://github.com/brsynth/synbiocad-galaxy-wrappers commit eadd9bb9edbc70361b9e8d7900e6743b37142ee3
tduigou
parents:
diff
changeset
|
41 params = parser.parse_args() |
|
e276119e73c8
planemo upload for repository https://github.com/brsynth/synbiocad-galaxy-wrappers commit eadd9bb9edbc70361b9e8d7900e6743b37142ee3
tduigou
parents:
diff
changeset
|
42 |
|
e276119e73c8
planemo upload for repository https://github.com/brsynth/synbiocad-galaxy-wrappers commit eadd9bb9edbc70361b9e8d7900e6743b37142ee3
tduigou
parents:
diff
changeset
|
43 sbml_doc = readSBMLFromFile(params.infile) |
|
e276119e73c8
planemo upload for repository https://github.com/brsynth/synbiocad-galaxy-wrappers commit eadd9bb9edbc70361b9e8d7900e6743b37142ee3
tduigou
parents:
diff
changeset
|
44 |
|
e276119e73c8
planemo upload for repository https://github.com/brsynth/synbiocad-galaxy-wrappers commit eadd9bb9edbc70361b9e8d7900e6743b37142ee3
tduigou
parents:
diff
changeset
|
45 if params.comp: |
|
e276119e73c8
planemo upload for repository https://github.com/brsynth/synbiocad-galaxy-wrappers commit eadd9bb9edbc70361b9e8d7900e6743b37142ee3
tduigou
parents:
diff
changeset
|
46 compartments = sbml_doc.getModel().getListOfCompartments() |
|
e276119e73c8
planemo upload for repository https://github.com/brsynth/synbiocad-galaxy-wrappers commit eadd9bb9edbc70361b9e8d7900e6743b37142ee3
tduigou
parents:
diff
changeset
|
47 with open(params.comp, 'w') as f: |
|
e276119e73c8
planemo upload for repository https://github.com/brsynth/synbiocad-galaxy-wrappers commit eadd9bb9edbc70361b9e8d7900e6743b37142ee3
tduigou
parents:
diff
changeset
|
48 f.write('#ID\tNAME\n') |
|
e276119e73c8
planemo upload for repository https://github.com/brsynth/synbiocad-galaxy-wrappers commit eadd9bb9edbc70361b9e8d7900e6743b37142ee3
tduigou
parents:
diff
changeset
|
49 for comp in compartments: |
|
e276119e73c8
planemo upload for repository https://github.com/brsynth/synbiocad-galaxy-wrappers commit eadd9bb9edbc70361b9e8d7900e6743b37142ee3
tduigou
parents:
diff
changeset
|
50 f.write(f'{comp.getId()}\t{comp.getName()}\n') |
|
e276119e73c8
planemo upload for repository https://github.com/brsynth/synbiocad-galaxy-wrappers commit eadd9bb9edbc70361b9e8d7900e6743b37142ee3
tduigou
parents:
diff
changeset
|
51 |
|
e276119e73c8
planemo upload for repository https://github.com/brsynth/synbiocad-galaxy-wrappers commit eadd9bb9edbc70361b9e8d7900e6743b37142ee3
tduigou
parents:
diff
changeset
|
52 if params.biomass: |
|
e276119e73c8
planemo upload for repository https://github.com/brsynth/synbiocad-galaxy-wrappers commit eadd9bb9edbc70361b9e8d7900e6743b37142ee3
tduigou
parents:
diff
changeset
|
53 reactions = sbml_doc.getModel().getListOfReactions() |
|
e276119e73c8
planemo upload for repository https://github.com/brsynth/synbiocad-galaxy-wrappers commit eadd9bb9edbc70361b9e8d7900e6743b37142ee3
tduigou
parents:
diff
changeset
|
54 with open(params.biomass, 'w') as f: |
|
e276119e73c8
planemo upload for repository https://github.com/brsynth/synbiocad-galaxy-wrappers commit eadd9bb9edbc70361b9e8d7900e6743b37142ee3
tduigou
parents:
diff
changeset
|
55 f.write('#ID\n') |
|
e276119e73c8
planemo upload for repository https://github.com/brsynth/synbiocad-galaxy-wrappers commit eadd9bb9edbc70361b9e8d7900e6743b37142ee3
tduigou
parents:
diff
changeset
|
56 for rxn in reactions: |
|
e276119e73c8
planemo upload for repository https://github.com/brsynth/synbiocad-galaxy-wrappers commit eadd9bb9edbc70361b9e8d7900e6743b37142ee3
tduigou
parents:
diff
changeset
|
57 if 'biomass' in rxn.getId().lower(): |
|
e276119e73c8
planemo upload for repository https://github.com/brsynth/synbiocad-galaxy-wrappers commit eadd9bb9edbc70361b9e8d7900e6743b37142ee3
tduigou
parents:
diff
changeset
|
58 f.write(f'{rxn.getId()}\n') |
|
e276119e73c8
planemo upload for repository https://github.com/brsynth/synbiocad-galaxy-wrappers commit eadd9bb9edbc70361b9e8d7900e6743b37142ee3
tduigou
parents:
diff
changeset
|
59 |
|
2
52649039cf3f
planemo upload for repository https://github.com/brsynth/synbiocad-galaxy-wrappers commit d1f5bac36c249e0767ed0bb968a1f4b5843256e3
tduigou
parents:
1
diff
changeset
|
60 if params.taxid: |
|
7
33be348bf9d6
planemo upload for repository https://github.com/brsynth/synbiocad-galaxy-wrappers commit 1a86e55d9e8c539de5fe8110ba85a2489473bde4
tduigou
parents:
4
diff
changeset
|
61 hostname = '' |
|
33be348bf9d6
planemo upload for repository https://github.com/brsynth/synbiocad-galaxy-wrappers commit 1a86e55d9e8c539de5fe8110ba85a2489473bde4
tduigou
parents:
4
diff
changeset
|
62 |
|
33be348bf9d6
planemo upload for repository https://github.com/brsynth/synbiocad-galaxy-wrappers commit 1a86e55d9e8c539de5fe8110ba85a2489473bde4
tduigou
parents:
4
diff
changeset
|
63 # Model from BiGG |
|
33be348bf9d6
planemo upload for repository https://github.com/brsynth/synbiocad-galaxy-wrappers commit 1a86e55d9e8c539de5fe8110ba85a2489473bde4
tduigou
parents:
4
diff
changeset
|
64 if params.bigg: |
|
33be348bf9d6
planemo upload for repository https://github.com/brsynth/synbiocad-galaxy-wrappers commit 1a86e55d9e8c539de5fe8110ba85a2489473bde4
tduigou
parents:
4
diff
changeset
|
65 # Extended Name |
|
33be348bf9d6
planemo upload for repository https://github.com/brsynth/synbiocad-galaxy-wrappers commit 1a86e55d9e8c539de5fe8110ba85a2489473bde4
tduigou
parents:
4
diff
changeset
|
66 server = 'http://bigg.ucsd.edu/api/v2/models/' |
|
33be348bf9d6
planemo upload for repository https://github.com/brsynth/synbiocad-galaxy-wrappers commit 1a86e55d9e8c539de5fe8110ba85a2489473bde4
tduigou
parents:
4
diff
changeset
|
67 ext = params.hostid |
|
4
4c773948a490
planemo upload for repository https://github.com/brsynth/synbiocad-galaxy-wrappers commit 4a0b08beb8cdf51ab295a1f5f8c586d6bbaf5586
tduigou
parents:
2
diff
changeset
|
68 r = r_get(server+ext, headers={ "Content-Type" : "application/json"}) |
|
4c773948a490
planemo upload for repository https://github.com/brsynth/synbiocad-galaxy-wrappers commit 4a0b08beb8cdf51ab295a1f5f8c586d6bbaf5586
tduigou
parents:
2
diff
changeset
|
69 if not r.ok: |
|
7
33be348bf9d6
planemo upload for repository https://github.com/brsynth/synbiocad-galaxy-wrappers commit 1a86e55d9e8c539de5fe8110ba85a2489473bde4
tduigou
parents:
4
diff
changeset
|
70 print(f"Warning: unable to retrieve host name for id {params.hostid}") |
|
4
4c773948a490
planemo upload for repository https://github.com/brsynth/synbiocad-galaxy-wrappers commit 4a0b08beb8cdf51ab295a1f5f8c586d6bbaf5586
tduigou
parents:
2
diff
changeset
|
71 else: |
|
4c773948a490
planemo upload for repository https://github.com/brsynth/synbiocad-galaxy-wrappers commit 4a0b08beb8cdf51ab295a1f5f8c586d6bbaf5586
tduigou
parents:
2
diff
changeset
|
72 try: |
|
7
33be348bf9d6
planemo upload for repository https://github.com/brsynth/synbiocad-galaxy-wrappers commit 1a86e55d9e8c539de5fe8110ba85a2489473bde4
tduigou
parents:
4
diff
changeset
|
73 hostname = r.json()["organism"] |
|
4
4c773948a490
planemo upload for repository https://github.com/brsynth/synbiocad-galaxy-wrappers commit 4a0b08beb8cdf51ab295a1f5f8c586d6bbaf5586
tduigou
parents:
2
diff
changeset
|
74 except KeyError: |
|
7
33be348bf9d6
planemo upload for repository https://github.com/brsynth/synbiocad-galaxy-wrappers commit 1a86e55d9e8c539de5fe8110ba85a2489473bde4
tduigou
parents:
4
diff
changeset
|
75 print(f"Warning: unable to retrieve host name for id {params.hostid}") |
|
33be348bf9d6
planemo upload for repository https://github.com/brsynth/synbiocad-galaxy-wrappers commit 1a86e55d9e8c539de5fe8110ba85a2489473bde4
tduigou
parents:
4
diff
changeset
|
76 if not hostname: |
|
33be348bf9d6
planemo upload for repository https://github.com/brsynth/synbiocad-galaxy-wrappers commit 1a86e55d9e8c539de5fe8110ba85a2489473bde4
tduigou
parents:
4
diff
changeset
|
77 taxid = '' |
|
33be348bf9d6
planemo upload for repository https://github.com/brsynth/synbiocad-galaxy-wrappers commit 1a86e55d9e8c539de5fe8110ba85a2489473bde4
tduigou
parents:
4
diff
changeset
|
78 else: |
|
33be348bf9d6
planemo upload for repository https://github.com/brsynth/synbiocad-galaxy-wrappers commit 1a86e55d9e8c539de5fe8110ba85a2489473bde4
tduigou
parents:
4
diff
changeset
|
79 # TAXON ID |
|
33be348bf9d6
planemo upload for repository https://github.com/brsynth/synbiocad-galaxy-wrappers commit 1a86e55d9e8c539de5fe8110ba85a2489473bde4
tduigou
parents:
4
diff
changeset
|
80 server = 'https://rest.ensembl.org' |
|
33be348bf9d6
planemo upload for repository https://github.com/brsynth/synbiocad-galaxy-wrappers commit 1a86e55d9e8c539de5fe8110ba85a2489473bde4
tduigou
parents:
4
diff
changeset
|
81 ext = f'/taxonomy/id/{hostname}?' |
|
33be348bf9d6
planemo upload for repository https://github.com/brsynth/synbiocad-galaxy-wrappers commit 1a86e55d9e8c539de5fe8110ba85a2489473bde4
tduigou
parents:
4
diff
changeset
|
82 r = r_get(server+ext, headers={ "Content-Type" : "application/json"}) |
|
33be348bf9d6
planemo upload for repository https://github.com/brsynth/synbiocad-galaxy-wrappers commit 1a86e55d9e8c539de5fe8110ba85a2489473bde4
tduigou
parents:
4
diff
changeset
|
83 if not r.ok: |
|
4
4c773948a490
planemo upload for repository https://github.com/brsynth/synbiocad-galaxy-wrappers commit 4a0b08beb8cdf51ab295a1f5f8c586d6bbaf5586
tduigou
parents:
2
diff
changeset
|
84 print(f"Warning: unable to retrieve taxonomy ID for host organism {hostname}") |
|
7
33be348bf9d6
planemo upload for repository https://github.com/brsynth/synbiocad-galaxy-wrappers commit 1a86e55d9e8c539de5fe8110ba85a2489473bde4
tduigou
parents:
4
diff
changeset
|
85 else: |
|
33be348bf9d6
planemo upload for repository https://github.com/brsynth/synbiocad-galaxy-wrappers commit 1a86e55d9e8c539de5fe8110ba85a2489473bde4
tduigou
parents:
4
diff
changeset
|
86 try: |
|
33be348bf9d6
planemo upload for repository https://github.com/brsynth/synbiocad-galaxy-wrappers commit 1a86e55d9e8c539de5fe8110ba85a2489473bde4
tduigou
parents:
4
diff
changeset
|
87 taxid = r.json()["id"] |
|
33be348bf9d6
planemo upload for repository https://github.com/brsynth/synbiocad-galaxy-wrappers commit 1a86e55d9e8c539de5fe8110ba85a2489473bde4
tduigou
parents:
4
diff
changeset
|
88 except KeyError: |
|
33be348bf9d6
planemo upload for repository https://github.com/brsynth/synbiocad-galaxy-wrappers commit 1a86e55d9e8c539de5fe8110ba85a2489473bde4
tduigou
parents:
4
diff
changeset
|
89 print(f"Warning: unable to retrieve taxonomy ID for host organism {hostname}") |
|
33be348bf9d6
planemo upload for repository https://github.com/brsynth/synbiocad-galaxy-wrappers commit 1a86e55d9e8c539de5fe8110ba85a2489473bde4
tduigou
parents:
4
diff
changeset
|
90 taxid = '' |
|
33be348bf9d6
planemo upload for repository https://github.com/brsynth/synbiocad-galaxy-wrappers commit 1a86e55d9e8c539de5fe8110ba85a2489473bde4
tduigou
parents:
4
diff
changeset
|
91 |
|
33be348bf9d6
planemo upload for repository https://github.com/brsynth/synbiocad-galaxy-wrappers commit 1a86e55d9e8c539de5fe8110ba85a2489473bde4
tduigou
parents:
4
diff
changeset
|
92 # Model from user |
|
33be348bf9d6
planemo upload for repository https://github.com/brsynth/synbiocad-galaxy-wrappers commit 1a86e55d9e8c539de5fe8110ba85a2489473bde4
tduigou
parents:
4
diff
changeset
|
93 else: |
|
33be348bf9d6
planemo upload for repository https://github.com/brsynth/synbiocad-galaxy-wrappers commit 1a86e55d9e8c539de5fe8110ba85a2489473bde4
tduigou
parents:
4
diff
changeset
|
94 taxid = params.hostid |
|
33be348bf9d6
planemo upload for repository https://github.com/brsynth/synbiocad-galaxy-wrappers commit 1a86e55d9e8c539de5fe8110ba85a2489473bde4
tduigou
parents:
4
diff
changeset
|
95 |
|
4
4c773948a490
planemo upload for repository https://github.com/brsynth/synbiocad-galaxy-wrappers commit 4a0b08beb8cdf51ab295a1f5f8c586d6bbaf5586
tduigou
parents:
2
diff
changeset
|
96 with open(params.taxid, 'w') as f: |
|
4c773948a490
planemo upload for repository https://github.com/brsynth/synbiocad-galaxy-wrappers commit 4a0b08beb8cdf51ab295a1f5f8c586d6bbaf5586
tduigou
parents:
2
diff
changeset
|
97 f.write('#ID\n') |
|
4c773948a490
planemo upload for repository https://github.com/brsynth/synbiocad-galaxy-wrappers commit 4a0b08beb8cdf51ab295a1f5f8c586d6bbaf5586
tduigou
parents:
2
diff
changeset
|
98 f.write(f'{taxid}\n') |
|
2
52649039cf3f
planemo upload for repository https://github.com/brsynth/synbiocad-galaxy-wrappers commit d1f5bac36c249e0767ed0bb968a1f4b5843256e3
tduigou
parents:
1
diff
changeset
|
99 |
|
52649039cf3f
planemo upload for repository https://github.com/brsynth/synbiocad-galaxy-wrappers commit d1f5bac36c249e0767ed0bb968a1f4b5843256e3
tduigou
parents:
1
diff
changeset
|
100 |
|
1
e276119e73c8
planemo upload for repository https://github.com/brsynth/synbiocad-galaxy-wrappers commit eadd9bb9edbc70361b9e8d7900e6743b37142ee3
tduigou
parents:
diff
changeset
|
101 if __name__ == "__main__": |
|
e276119e73c8
planemo upload for repository https://github.com/brsynth/synbiocad-galaxy-wrappers commit eadd9bb9edbc70361b9e8d7900e6743b37142ee3
tduigou
parents:
diff
changeset
|
102 entry_point() |
