Mercurial > repos > recetox > assign_ri_from_comment
diff riassigner_from_comment.xml @ 0:6975af39ba79 draft
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/riassigner commit de7fd0986bce8d42bc7e63f9e4caf3c23862e497
author | recetox |
---|---|
date | Thu, 22 Feb 2024 10:40:33 +0000 |
parents | |
children | 7226eba9c09d |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/riassigner_from_comment.xml Thu Feb 22 10:40:33 2024 +0000 @@ -0,0 +1,73 @@ +<tool id="riassigner_from_comment" name="RIAssigner init from comment" version="@TOOL_VERSION@+galaxy4" 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} && + mv results.${input.ext} ${output} + ]]> + </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}') +query.write('results.${input.ext}') + </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_source="input" name="output" label="${on_string} with ${format} RI"/> + </outputs> + + <tests> + <test> + <param name="input" value="nist_to_ri_2mols_input.csv" ftype="csv"/> + <output name="output" file="nist_to_ri_2mols_output.csv" ftype="csv"/> + </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> + </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> +