Skip to content

Commit

Permalink
get_sbml_model, enable to load file from history (#137)
Browse files Browse the repository at this point in the history
* feat(tools): get_sbml_model, enable to load file from history
  • Loading branch information
guillaume-gricourt authored Aug 28, 2023
1 parent 77c42c2 commit 87a863d
Show file tree
Hide file tree
Showing 3 changed files with 9,993 additions and 64 deletions.
1 change: 1 addition & 0 deletions .github/workflows/testtools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ jobs:
--galaxy_source https://github.com/galaxyproject/galaxy \
--galaxy_branch release_22.05 \
--galaxy_python_version 3.7 \
--docker_extra_volume ./ \
"tools/${{ matrix.repo }}"
mv tool_test_output.json "log/${{ matrix.repo }}"
- name: 'Prepare artefact'
Expand Down
158 changes: 94 additions & 64 deletions tools/get_sbml_model/get_sbml_model.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<tool id="get_sbml_model" name="Pick SBML Model" version="0.0.3" profile="19.09" license="MIT">
<tool id="get_sbml_model" name="Pick SBML Model" version="0.0.4" profile="21.09" license="MIT">
<description>Get an SBML model (BiGG)</description>
<requirements>
<requirement type="package" version="7.81.0">curl</requirement>
Expand All @@ -7,87 +7,117 @@
<requirement type="package" version="2.29">requests</requirement>
</requirements>
<command detect_errors="exit_code"><![CDATA[
curl -o - 'http://bigg.ucsd.edu/static/models/$(input).xml.gz'
| gunzip > '$model';
#if str($cond_src.from_src) == 'from_bigg'
curl -o - 'http://bigg.ucsd.edu/static/models/${cond_src.hostid}.xml.gz' | gunzip > '$model' &&
#else
cp '${cond_src.input_file}' '$model' &&
#end if
python '$__tool_directory__/'get_infos.py
'$model'
--hostid '$input'
--hostid '${cond_src.hostid}'
--comp '$compartments'
--biomass '$biomass'
--taxid '$taxid'
]]></command>
<inputs>
<param name="input" type="select" label="Strain">
<option value="iCN718">Acinetobacter baumannii AYE (iCN718)</option>
<option value="iYO844">Bacillus subtilis subsp. subtilis str. 168 (iYO844)</option>
<option value="iRC1080">Chlamydomonas reinhardtii (iRC1080)</option>
<option value="iCN900">Clostridioides difficile 630 (iCN900)</option>
<option value="iHN637">Clostridium ljungdahlii DSM 13528 (iHN637)</option>
<option value="iCHOv1_DG44">Cricetulus griseus (iCHOv1_DG44)</option>
<option value="iCHOv1">Cricetulus griseus (iCHOv1)</option>
<option value="iAF1260b">Escherichia coli str. K-12 substr. MG1655 (iAF1260b)</option>
<option value="iAF1260">Escherichia coli str. K-12 substr. MG1655 (iAF1260)</option>
<option value="iML1515" selected="true">Escherichia coli str. K-12 substr. MG1655 (iML1515)</option>
<option value="iJO1366">Escherichia coli str. K-12 substr. MG1655 (iJO1366)</option>
<option value="iJR904">Escherichia coli str. K-12 substr. MG1655 (iJR904)</option>
<option value="e_coli_core">Escherichia coli str. K-12 substr. MG1655 (e_coli_core)</option>
<option value="iAF987">Geobacter metallireducens GS-15 (iAF987)</option>
<option value="iIT341">Helicobacter pylori 26695 (iIT341)</option>
<option value="iAT_PLT_636">Homo sapiens (iAT_PLT_636)</option>
<option value="Recon3D">Homo sapiens (Recon3D)</option>
<option value="iAB_RBC_283">Homo sapiens (iAB_RBC_283)</option>
<option value="RECON1">Homo sapiens (RECON1)</option>
<option value="iYL1228">Klebsiella pneumoniae subsp. pneumoniae MGH 78578 (iYL1228)</option>
<option value="iNF517">Lactococcus lactis subsp. cremoris MG1363 (iNF517)</option>
<option value="iAF692">Methanosarcina barkeri str. Fusaro (iAF692)</option>
<option value="iMM1415">Mus musculus (iMM1415)</option>
<option value="iNJ661">Mycobacterium tuberculosis H37Rv (iNJ661)</option>
<option value="iEK1008">Mycobacterium tuberculosis H37Rv (iEK1008)</option>
<option value="iLB1027_lipid">Phaeodactylum tricornutum CCAP 1055/1 (iLB1027_lipid)</option>
<option value="iAM_Pb448">Plasmodium berghei (iAM_Pb448)</option>
<option value="iAM_Pc455">Plasmodium cynomolgi strain B (iAM_Pc455)</option>
<option value="iAM_Pf480">Plasmodium falciparum 3D7 (iAM_Pf480)</option>
<option value="iAM_Pk459">Plasmodium knowlesi strain H (iAM_Pk459)</option>
<option value="iAM_Pv461">Plasmodium vivax Sal-1 (iAM_Pv461)</option>
<option value="iJN746">Pseudomonas putida KT2440 (iJN746)</option>
<option value="iJN1463">Pseudomonas putida KT2440 (iJN1463)</option>
<option value="iND750">Saccharomyces cerevisiae S288C (iND750)</option>
<option value="iMM904">Saccharomyces cerevisiae S288C (iMM904)</option>
<option value="STM_v1_0">Salmonella enterica subsp. enterica serovar Typhimurium str. LT2 (STM_v1_0)</option>
<option value="iYS1720">Salmonella pan-reactome (iYS1720)</option>
<option value="iSB619">Staphylococcus aureus subsp. aureus N315 (iSB619)</option>
<option value="iYS854">Staphylococcus aureus subsp. aureus USA300_TCH1516 (iYS854)</option>
<option value="iJB785">Synechococcus elongatus PCC 7942 (iJB785)</option>
<option value="iJN678">Synechocystis sp. PCC 6803 (iJN678)</option>
<option value="iSynCJ816">Synechocystis sp. PCC 6803 (iSynCJ816)</option>
<option value="iLJ478">Thermotoga maritima MSB8 (iLJ478)</option>
<option value="iIS312">Trypanosoma cruzi Dm28c (iIS312)</option>
<option value="iIS312_Trypomastigote">Trypanosoma cruzi Dm28c (iIS312_Trypomastigote)</option>
<option value="iIS312_Epimastigote">Trypanosoma cruzi Dm28c (iIS312_Epimastigote)</option>
<option value="iIS312_Amastigote">Trypanosoma cruzi Dm28c (iIS312_Amastigote)</option>
</param>
<conditional name="cond_src">
<param name="from_src" type="select" label="Select source">
<option value="from_bigg" selected="True">Download model from BiGG</option>
<option value="from_history">Select file from the History</option>
</param>
<when value="from_history">
<param name="hostid" type="text" help="ID of the model">
<validator type="empty_field" message="An ID is required"/>
</param>
<param name="input_file" type="data" format="sbml,xml" label="SBML model" help="An SBML file is expected"/>
</when>
<when value="from_bigg">
<param name="hostid" type="select" label="Strain">
<option value="iCN718">Acinetobacter baumannii AYE (iCN718)</option>
<option value="iYO844">Bacillus subtilis subsp. subtilis str. 168 (iYO844)</option>
<option value="iRC1080">Chlamydomonas reinhardtii (iRC1080)</option>
<option value="iCN900">Clostridioides difficile 630 (iCN900)</option>
<option value="iHN637">Clostridium ljungdahlii DSM 13528 (iHN637)</option>
<option value="iCHOv1_DG44">Cricetulus griseus (iCHOv1_DG44)</option>
<option value="iCHOv1">Cricetulus griseus (iCHOv1)</option>
<option value="iAF1260b">Escherichia coli str. K-12 substr. MG1655 (iAF1260b)</option>
<option value="iAF1260">Escherichia coli str. K-12 substr. MG1655 (iAF1260)</option>
<option value="iML1515" selected="true">Escherichia coli str. K-12 substr. MG1655 (iML1515)</option>
<option value="iJO1366">Escherichia coli str. K-12 substr. MG1655 (iJO1366)</option>
<option value="iJR904">Escherichia coli str. K-12 substr. MG1655 (iJR904)</option>
<option value="e_coli_core">Escherichia coli str. K-12 substr. MG1655 (e_coli_core)</option>
<option value="iAF987">Geobacter metallireducens GS-15 (iAF987)</option>
<option value="iIT341">Helicobacter pylori 26695 (iIT341)</option>
<option value="iAT_PLT_636">Homo sapiens (iAT_PLT_636)</option>
<option value="Recon3D">Homo sapiens (Recon3D)</option>
<option value="iAB_RBC_283">Homo sapiens (iAB_RBC_283)</option>
<option value="RECON1">Homo sapiens (RECON1)</option>
<option value="iYL1228">Klebsiella pneumoniae subsp. pneumoniae MGH 78578 (iYL1228)</option>
<option value="iNF517">Lactococcus lactis subsp. cremoris MG1363 (iNF517)</option>
<option value="iAF692">Methanosarcina barkeri str. Fusaro (iAF692)</option>
<option value="iMM1415">Mus musculus (iMM1415)</option>
<option value="iNJ661">Mycobacterium tuberculosis H37Rv (iNJ661)</option>
<option value="iEK1008">Mycobacterium tuberculosis H37Rv (iEK1008)</option>
<option value="iLB1027_lipid">Phaeodactylum tricornutum CCAP 1055/1 (iLB1027_lipid)</option>
<option value="iAM_Pb448">Plasmodium berghei (iAM_Pb448)</option>
<option value="iAM_Pc455">Plasmodium cynomolgi strain B (iAM_Pc455)</option>
<option value="iAM_Pf480">Plasmodium falciparum 3D7 (iAM_Pf480)</option>
<option value="iAM_Pk459">Plasmodium knowlesi strain H (iAM_Pk459)</option>
<option value="iAM_Pv461">Plasmodium vivax Sal-1 (iAM_Pv461)</option>
<option value="iJN746">Pseudomonas putida KT2440 (iJN746)</option>
<option value="iJN1463">Pseudomonas putida KT2440 (iJN1463)</option>
<option value="iND750">Saccharomyces cerevisiae S288C (iND750)</option>
<option value="iMM904">Saccharomyces cerevisiae S288C (iMM904)</option>
<option value="STM_v1_0">Salmonella enterica subsp. enterica serovar Typhimurium str. LT2 (STM_v1_0)</option>
<option value="iYS1720">Salmonella pan-reactome (iYS1720)</option>
<option value="iSB619">Staphylococcus aureus subsp. aureus N315 (iSB619)</option>
<option value="iYS854">Staphylococcus aureus subsp. aureus USA300_TCH1516 (iYS854)</option>
<option value="iJB785">Synechococcus elongatus PCC 7942 (iJB785)</option>
<option value="iJN678">Synechocystis sp. PCC 6803 (iJN678)</option>
<option value="iSynCJ816">Synechocystis sp. PCC 6803 (iSynCJ816)</option>
<option value="iLJ478">Thermotoga maritima MSB8 (iLJ478)</option>
<option value="iIS312">Trypanosoma cruzi Dm28c (iIS312)</option>
<option value="iIS312_Trypomastigote">Trypanosoma cruzi Dm28c (iIS312_Trypomastigote)</option>
<option value="iIS312_Epimastigote">Trypanosoma cruzi Dm28c (iIS312_Epimastigote)</option>
<option value="iIS312_Amastigote">Trypanosoma cruzi Dm28c (iIS312_Amastigote)</option>
</param>
</when>
</conditional>
</inputs>
<outputs>
<data name="model" format="sbml" label="${input}" />
<data name="taxid" format="tsv" label="${input} (taxon id)" />
<data name="compartments" format="tsv" label="${input} (compartments)" />
<data name="biomass" format="tsv" label="${input} (biomass reactions)" />
<data name="model" format="sbml" label="${cond_src.hostid}" />
<data name="taxid" format="tsv" label="${cond_src.hostid} (taxon id)" />
<data name="compartments" format="tsv" label="${cond_src.hostid} (compartments)" />
<data name="biomass" format="tsv" label="${cond_src.hostid} (biomass reactions)" />
</outputs>
<tests>
<test>
<!-- test 1: check if identical outputs are produced with iML1515 model input -->
<param name="input" value="iML1515" />
<output name="model" md5="9bf81d20cab5476700697ded95b716d1"/>
<output name="taxid" md5="6b35ad8a1c2b640af4ba738c2f5f876e"/>
<output name="compartments" md5="e93a875a2d8efc10a880ae3ac0018236"/>
<output name="biomass" md5="cffb2fbdb07d1301dfdb7bb284fb7e06"/>
<conditional name="cond_src">
<param name="from_src" value="from_bigg" />
<param name="hostid" value="iML1515" />
</conditional>
<output name="model" md5="9bf81d20cab5476700697ded95b716d1" />
<output name="taxid" md5="6b35ad8a1c2b640af4ba738c2f5f876e" />
<output name="compartments" md5="e93a875a2d8efc10a880ae3ac0018236" />
<output name="biomass" md5="cffb2fbdb07d1301dfdb7bb284fb7e06" />
</test>
<test>
<conditional name="cond_src">
<param name="from_src" value="from_history" />
<param name="hostid" value="e_coli_core" />
<param name="input_file" value="e_coli_core.xml" />
</conditional>
<output name="model" md5="4574760460afe9e1b3388dc15f354706" />
<output name="taxid" md5="6b35ad8a1c2b640af4ba738c2f5f876e" />
<output name="compartments" md5="71dc18974a12e9bb75bb2c4cffd13edf" />
<output name="biomass" md5="d10baa335181450c7bffa9b4ca01754a" />
</test>
</tests>
<help><![CDATA[
Pick SBML Model
=================
Download the selected SBML model fromg BiGG database.
Download the selected SBML model fromg BiGG database or get statistics from local SBML model.
]]></help>
<creator>
<organization name="BioRetroSynth" url="https://github.com/brsynth"/>
Expand Down
Loading

0 comments on commit 87a863d

Please sign in to comment.