Mercurial > repos > iuc > hamronize_tool
view hamronize_tool.xml @ 4:cbfa52c8f1ef draft default tip
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/hamronization commit b49fc153425676a82e77dec090676403112bcbe6
author | iuc |
---|---|
date | Tue, 05 Mar 2024 19:47:12 +0000 |
parents | e13b801516dd |
children |
line wrap: on
line source
<tool id="hamronize_tool" name="hAMRonize" version="@TOOL_VERSION@+galaxy0" profile="@PROFILE@"> <description>Antimicrobial Resistance Analysis Reports into a common data structure</description> <macros> <import>macros.xml</import> </macros> <expand macro="bio_tools"/> <expand macro="requirements" /> <expand macro="version_command" /> <command detect_errors="exit_code"><![CDATA[ #import re #set $no_origin_info_tools = ['mykrobe', 'tbprofiler'] #set $origin_tools = ['abricate', 'amrfinderplus', 'fargene', 'srst2', 'staramr'] #set $in_fname_tools = ['amrfinderplus', 'amrplusplus', 'ariba', 'csstar', 'deeparg', 'fargene', 'groot', 'kmerresistance', 'pointfinder', 'resfarms', 'rgi', 'srax', 'srst2'] #set $ref_db_name_tools = ['ariba', 'csstar', 'groot', 'srax'] #set $input_file_name = re.sub('[^\s\w\-\.]', '_', str($input.report.element_identifier)) hamronize '$input.tool' '$input.report' --format '$format' --output '$output' #if $input.tool not in $no_origin_info_tools #if $input.tool in $origin_tools and $input.origin.origin #if $input.origin.origin --analysis_software_version '$input.report.tool_version' #else --analysis_software_version '$input.origin.analysis_software_version' #end if --reference_database_version '$input.reference_database_version' #else --analysis_software_version '$input.analysis_software_version' --reference_database_version '$input.reference_database_version' #end if #end if #if $input.tool in $in_fname_tools #if str($input.input_file_name) != '' --input_file_name '$input.input_file_name' #else --input_file_name '$input_file_name' #end if #end if #if $input.tool in $ref_db_name_tools --reference_database_name '$input.reference_database_name' #end if ]]> </command> <inputs> <conditional name="input"> <param name="tool" type="select" label="Tool"> <option value="abricate" selected="true">ABRicate</option> <option value="amrfinderplus">AMRFinderPlus</option> <option value="amrplusplus">AMRplusplus</option> <option value="ariba">ARIBA</option> <option value="csstar">c-SSTAR</option> <option value="deeparg">DeepARG</option> <option value="fargene">fARGene</option> <option value="groot">GROOT</option> <option value="kmerresistance">KmerResistance</option> <option value="mykrobe">Mykrobe</option> <option value="pointfinder">PointFinder</option> <option value="resfams">ResFams</option> <option value="resfinder">ResFinder</option> <option value="rgi">RGI</option> <option value="srax">SraX</option> <option value="srst2">SRST2</option> <option value="staramr">StarAMR</option> <option value="tbprofiler">TBProfiler</option> </param> <when value="abricate"> <expand macro="report" format="tabular" label="ABRicate Report file"/> <expand macro="origin" software="ABRicate"/> </when> <when value="amrfinderplus"> <expand macro="report" format="tabular" label="AMRFinderPlus Report file"/> <expand macro="input_file_name"/> <expand macro="origin" software="AMRFinderPlus"/> </when> <when value="amrplusplus"> <expand macro="report" format="tabular" label="AMRplusplus gene report"/> <expand macro="input_file_name"/> <expand macro="analysis_software_version" software="AMRplusplus"/> <expand macro="reference_database_version"/> </when> <when value="ariba"> <expand macro="report" format="tabular" label="ARIBA output"/> <expand macro="input_file_name"/> <expand macro="analysis_software_version" software="ARIBA"/> <expand macro="reference_database_version"/> <expand macro="reference_database_name" software="ARIBA"/> </when> <when value="csstar"> <expand macro="report" format="tabular" label="c-SSTAR output"/> <expand macro="input_file_name"/> <expand macro="analysis_software_version" software="c-SSTAR" /> <expand macro="reference_database_version"/> <expand macro="reference_database_name" software="c-SSTAR"/> </when> <when value="deeparg"> <expand macro="report" format="tabular" label="DeepARG output"/> <expand macro="input_file_name"/> <expand macro="analysis_software_version" software="DeepARG"/> </when> <when value="fargene"> <expand macro="report" format="txt" label="fARGene HMM Search Result"/> <expand macro="input_file_name"/> <expand macro="origin" software="fARGene"/> </when> <when value="groot"> <expand macro="report" format="tabular" label="GROOT output"/> <expand macro="input_file_name"/> <expand macro="analysis_software_version" software="GROOT" /> <expand macro="reference_database_version"/> <expand macro="reference_database_name" software="GROOT"/> </when> <when value="kmerresistance"> <expand macro="report" format="tabular" label="KmerResistance gene report"/> <expand macro="input_file_name"/> <expand macro="analysis_software_version" software="KmerResistance"/> <expand macro="reference_database_version"/> </when> <when value="mykrobe"> <expand macro="report" format="json" label="Mykrobe Report file"/> </when> <when value="pointfinder"> <param name="report" type="data" format="txt" label="PointFinder results"/> <expand macro="input_file_name"/> <expand macro="analysis_software_version" software="PointFinder"/> <expand macro="reference_database_version"/> </when> <when value="resfams"> <param name="report" type="data" format="txt" label="ResFams results"/> <expand macro="input_file_name"/> <expand macro="analysis_software_version" software="ResFams"/> <expand macro="reference_database_version"/> </when> <when value="resfinder"> <param name="report" type="data" format="tabular" label="ResFinder results"/> <expand macro="input_file_name"/> <expand macro="analysis_software_version" software="ResFinder"/> <expand macro="reference_database_version"/> </when> <when value="rgi"> <param name="report" type="data" format="txt" label="RGI output"/> <expand macro="input_file_name"/> <expand macro="analysis_software_version" software="RGI"/> <expand macro="reference_database_version"/> </when> <when value="srax"> <param name="report" type="data" format="tabular" label="SraX detected ARGs"/> <expand macro="input_file_name"/> <expand macro="analysis_software_version" software="SraX"/> <expand macro="reference_database_version"/> <expand macro="reference_database_name" software="SraX"/> </when> <when value="srst2"> <expand macro="report" format="tabular" label="SRST2 report"/> <expand macro="input_file_name"/> <expand macro="origin" software="SRST2"/> </when> <when value="staramr"> <expand macro="report" format="tabular" label="StarAMR ResFinder output"/> <expand macro="origin" software="StarAMR"/> </when> <when value="tbprofiler"> <param name="report" type="data" format="tabular" label="TBProfiler output"/> </when> </conditional> <param argument="--format" type="select" label="Output format"> <option value="tsv" selected="True">Tabular</option> <option value="json">JSON</option> </param> </inputs> <outputs> <data name="output" format="tabular" label="${tool.name} on ${on_string} (${input.tool})"> <change_format> <when input="format" value="json" format="json"/> </change_format> </data> </outputs> <tests> <!-- abricate --> <test expect_num_outputs="1"> <conditional name="input"> <param name="tool" value="abricate" /> <param name="report" value="abricate/report.tsv" ftype="tabular" /> <conditional name="origin"> <param name="origin" value="false"/> <param name="analysis_software_version" value="tool_v_1"/> </conditional> <param name="reference_database_version" value="db_v_1"/> </conditional> <param name="format" value="tsv" /> <output name="output" ftype="tabular"> <assert_contents> <has_n_lines n="8"/> <has_n_columns n="36"/> <has_text text="input_file_name"/> <has_text text="GCF_010120755.1_ASM1012075v1_genomic"/> <has_text text="vanS-M"/> <has_text text="db_v_1"/> </assert_contents> </output> </test> <test expect_num_outputs="1"> <conditional name="input"> <param name="tool" value="abricate" /> <param name="report" value="abricate/report.tsv" ftype="tabular" /> <conditional name="origin"> <param name="origin" value="false"/> <param name="analysis_software_version" value="tool_v_1"/> </conditional> <param name="reference_database_version" value="db_v_1"/> </conditional> <param name="format" value="json" /> <output name="output" ftype="json"> <assert_contents> <has_text text="input_file_name"/> <has_text text="GCF_010120755.1_ASM1012075v1_genomic"/> <has_text text="vanS-M"/> <has_text text="db_v_1"/> </assert_contents> </output> </test> <!-- ariba --> <test expect_num_outputs="1"> <conditional name="input"> <param name="tool" value="ariba" /> <param name="report" value="ariba/report.tsv" ftype="tabular" /> <param name="input_file_name" value="ariba_report" /> <param name="analysis_software_version" value="ariba_v1" /> <param name="reference_database_version" value="db_v_1" /> <param name="reference_database_name" value="dbname" /> </conditional> <param name="format" value="tsv" /> <output name="output" ftype="tabular"> <assert_contents> <has_n_lines n="257"/> <has_n_columns n="36"/> <has_text text="input_file_name"/> <has_text text="ariba_report"/> <has_text text="AAC_3__IId"/> <has_text text="ariba_v1"/> <has_text text="db_v_1"/> <has_text text="dbname"/> </assert_contents> </output> </test> <!-- mykrobe --> <test expect_num_outputs="1"> <conditional name="input"> <param name="tool" value="mykrobe" /> <param name="report" value="mykrobe/mykrobe.json" ftype="json" /> </conditional> <param name="format" value="tsv" /> <output name="output" ftype="tabular"> <assert_contents> <has_n_lines n="2"/> <has_n_columns n="36"/> <has_text text="input_file_name"/> <has_text text="rpoB"/> <has_text text="v0.10.0"/> <has_text text="NC_000962.3"/> <has_text text="mykrobe"/> </assert_contents> </output> </test> <!-- rgi --> <test expect_num_outputs="1"> <conditional name="input"> <param name="tool" value="rgi" /> <param name="report" value="rgi/rgi.txt" ftype="txt" /> <param name="analysis_software_version" value="rgi_v1" /> <param name="reference_database_version" value="card_v1" /> </conditional> <param name="format" value="tsv" /> <output name="output" ftype="tabular"> <assert_contents> <has_n_lines n="42"/> <has_n_columns n="36"/> <has_text text="input_file_name"/> <has_text text="rgi.txt"/> <has_text text="oqxA"/> <has_text text="CARD"/> <has_text text="card_v1"/> <has_text text="rgi_v1"/> </assert_contents> </output> </test> </tests> <help><![CDATA[ **What it does** hAMRonization parses multiple Antimicrobial Resistance Analysis Reports from disparate antimicrobial resistance gene detection tools into a single unified format. This is an implementation of the hAMRonization AMR detection specification scheme which supports gene presence/absence resistance and mutational resistance (if supported by the underlying tool). **Inputs** Report or output of an antimicrobial resistance gene detection tool: * abricate: abricate's output report i.e., OUTPUT.tsv * amrfinderplus: amrfinderplus's output report i.e., OUTPUT.tsv * ariba: ariba's output report i.e., OUTDIR/OUTPUT.tsv * rgi: rgi's output report i.e., OUTPUT.txt or OUTPUT_bwtoutput.gene_mapping_data.txt * resfinder: resfinder's output report i.e., data_resfinder.json * resfinder4: resfinder4's tabular output report i.e., ResFinder_results_tab.txt * srax: srax's output report i.e., sraX_detected_ARGs.tsv * deeparg: deeparg's output report i.e., OUTDIR/OUTPUT.mapping.ARG * kmerresistance: kmerresistance's output report i.e., OUTPUT.KmerRes * srst2: srst2's output report i.e., OUTPUT_srst2_report.tsv * staramr: staramr's output report i.e., resfinder.tsv * csstar: csstar's output report i.e., OUTPUT.tsv * amrplusplus: amrplusplus's output report i.e., gene.tsv * resfams: resfams's output report i.e., resfams.tblout * groot: groot's output report i.e., OUTPUT.tsv (from `groot report`) More: https://github.com/pha4ge/hAMRonization/#usage ]]></help> <expand macro="citations"/> </tool>