Skip to content

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,32 @@
<exit_code range="1:" level="fatal" description="Error"/>
</stdio>
<command><![CDATA[
python '$__tool_directory__/data_manager_metaphlan_download.py'
--index '$index'
--json '$out_file'
metaphlan --install --index '$index' --bowtie2db '$out_file.extra_files_path/$index' &&
cp '$dmjson' '$out_file'
]]></command>
<configfiles>
<configfile name="dmjson"><![CDATA[
#from datetime import date
{
"data_tables":{
"genomad":[
{
"dbkey": "$index",
"value": "${index}-#echo date.today().strftime('%d%m%Y')#",
"name": "MetaPhlAn clade-specific marker genes ($index)",
"path": "$out_file.extra_files_path/$index",
"db_version": #slurp
#if "SGB" in str($index)
"SGB"#slurp
#else
"legacy"#slurp
#end if
}
]
}
}]]>
</configfile>
</configfiles>
<inputs>
<param name="index" type="select" label="Version">
<option value="mpa_vOct22_CHOCOPhlAnSGB_202403" selected="true">FULL: mpa_vOct22_CHOCOPhlAnSGB_202403</option>
Expand All @@ -34,8 +56,11 @@ python '$__tool_directory__/data_manager_metaphlan_download.py'
<param name="index" value="mpa_vJan21_TOY_CHOCOPhlAnSGB_202103"/>
<output name="out_file">
<assert_contents>
<has_text text="mpa_vJan21_TOY_CHOCOPhlAnSGB_202103"/>
<has_text text="MetaPhlAn clade-specific marker genes (mpa_vJan21_TOY_CHOCOPhlAnSGB_202103)"/>
<has_text text='"db_version": "SGB"'/>
<has_text text='"dbkey": "mpa_vJan21_TOY_CHOCOPhlAnSGB_202103"'/>
<has_text_matching expression='"value": "mpa_vJan21_TOY_CHOCOPhlAnSGB_202103-[0-9]{8}"'/>
<has_text text='"name": "MetaPhlAn clade-specific marker genes (mpa_vJan21_TOY_CHOCOPhlAnSGB_202103)"'/>
<has_text_matching expression='.*"path": ".*/mpa_vJan21_TOY_CHOCOPhlAnSGB_202103".*'/>
</assert_contents>
</output>
</test>
Expand Down
2 changes: 1 addition & 1 deletion tools/metaphlan/customize_metaphlan_database.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</macros>
<expand macro="edam_ontology"/>
<expand macro="requirements">
<requirement type="package" version="1.3">seqtk</requirement>
<requirement type="package" version="1.4">seqtk</requirement>
</expand>
<version_command>metaphlan -v</version_command>
<command detect_errors="aggressive"><![CDATA[
Expand Down
9 changes: 7 additions & 2 deletions tools/metaphlan/macros.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<macros>
<token name="@TOOL_VERSION@">4.0.6</token>
<token name="@VERSION_SUFFIX@">3</token>
<token name="@TOOL_VERSION@">4.1.1</token>
<token name="@VERSION_SUFFIX@">0</token>
<token name="@PROFILE@">22.05</token>
<!-- Metaphlan DB compatible with this version of Metaphlan
v4 introduced single genome level bins (SGB) and the index syntax differs from previous versions -->
Expand All @@ -23,4 +23,9 @@
<citation type="doi">10.7554/eLife.65088</citation>
</citations>
</xml>

<xml name="subsample_common">
<param argument="--mapping_subsampling" type="boolean" truevalue="--mapping_subsampling" falsevalue="" label="Subsampling on the mapping results" help="instead of on the reads"/>
<param argument="--subsampling_seed" type="integer" optional="true" label="Subsampling seed" help="No value: random"/>
</xml>
</macros>
Loading