Mercurial > repos > recetox > assign_ri_from_comment
view riassigner_from_comment.xml @ 2:97ccdb1ba47c draft default tip
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/riassigner commit 722ce0aee0a49d5bd76f261d949945adf69aae90
author | recetox |
---|---|
date | Tue, 07 May 2024 12:25:38 +0000 |
parents | 7226eba9c09d |
children |
line wrap: on
line source
<tool id="riassigner_from_comment" name="RIAssigner init from comment" version="@TOOL_VERSION@+galaxy0" profile="21.09"> <description>Assign different retention indices from unstructured comment metadata</description> <macros> <import>macros.xml</import> </macros> <expand macro="creator"/> <xrefs> <xref type="bio.tools">riassigner</xref> </xrefs> <requirements> <requirement type="package" version="@TOOL_VERSION@">riassigner</requirement> </requirements> <command detect_errors="exit_code"><![CDATA[ python ${script} && #if $input.ext == "csv" mv results.tsv ${output} #else: mv results.${input.ext} ${output} #end if ]]> </command> <configfiles> <configfile name="script"> from RIAssigner.data import PandasData, MatchMSData #if $input.ext in ["csv", "tsv", "parquet"] query = PandasData('${input}', '${input.ext}', rt_unit="seconds") #else query = MatchMSData('${input}', '${input.ext}', rt_unit="seconds") #end if query.init_ri_from_comment('${format}') #if $input.ext == "csv" query.write('results.tsv') #else query.write('results.${input.ext}') #end if </configfile> </configfiles> <inputs> <param name="input" type="data" format="csv,tsv,parquet,msp,mgf" label="Input File"> <help> File with 'comment' metadata in which to assign the selected retention index type from 'comment' to 'retention_index'. </help> </param> <param name="format" type="select" label="GC column type" help="Type of gas chromatographic column for which to set the retention index value"> <option value="SemiStdNP">Semi Standard Non-Polar</option> <option value="StdNP">Standard Non-Polar</option> <option value="StdPolar">Standard Polar</option> </param> </inputs> <outputs> <data format="tsv" name="output" label="${on_string} with ${format} RI"> <change_format> <when input="input.ext" value="msp" format="msp" /> <when input="input.ext" value="mgf" format="mgf" /> <when input="input.ext" value="parquet" format="parquet" /> </change_format> </data> </outputs> <tests> <test> <param name="input" value="nist_to_ri_2mols_input.csv" ftype="csv"/> <output name="output" file="nist_to_ri_2mols_output.tsv" ftype="tsv"/> </test> <test> <param name="input" value="nist_ei_ms_2mols_input.msp" ftype="msp"/> <output name="output" file="nist_ei_ms_2mols_output.msp" ftype="msp"/> </test> <test> <param name="input" value="nist_ei_ms_3mols_input.msp" ftype="msp"/> <output name="output" file="nist_ei_ms_3mols_output.msp" ftype="msp"/> </test> </tests> <help><![CDATA[ This tool can be used to assign retention indices (RI) from the comment field in csv, tsv, parquet, or msp files. The tool will read RI from the comment field and assign them to the RI field. The type of gas chromatographic column for which to set the retention index value can be selected. ]]></help> <citations> <citation type="doi">10.21105/joss.04337</citation> </citations> </tool>