Mercurial > repos > recetox > qcxms_getres
diff qcxms_getres.xml @ 0:ef51824f6d04 draft
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/qcxms commit 4018b84dd3c735d16f488094f001a19e634fe1a2
author | recetox |
---|---|
date | Fri, 08 Mar 2024 10:55:44 +0000 |
parents | |
children | af8839475b43 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/qcxms_getres.xml Fri Mar 08 10:55:44 2024 +0000 @@ -0,0 +1,75 @@ +<tool id="qcxms_getres" name="QCxMS get results" version="@TOOL_VERSION@+galaxy0" profile="22.09"> + <description>Get result of the Production run to obtain a QCxMS simulated mass spectrum</description> + + <macros> + <import>macros.xml</import> + </macros> + <expand macro="edam"/> + <expand macro="creator"/> + <expand macro="requirements"/> + + <command detect_errors="exit_code"><![CDATA[ + python3 '${get_res}' && + /plotms_bin/PlotMS.v.6.2.0/plotms && + sh ${__tool_directory__}/msp_out.sh + ]]></command> + + <configfiles> + <configfile name="get_res"> +#set res_collection = str("', '").join([str($f) for $f in $res_files]) + +with open('$mol', 'r') as file: + lines = file.readlines() + molname = lines[1] + +with open('molname.txt', 'w') as file: + file.write(molname) + +input_files = '$res_collection' +output_file = 'tmpqcxms.res' + +with open(output_file, 'w') as output: + for file_path in input_files: + with open(file_path, 'r') as input_file: + output.write(input_file.read()) + + </configfile> + </configfiles> + + <inputs> + <param type="data" name="mol" label="Molecule 3D structure [.xzy]" format="xyz" /> + <param type="data_collection" collection_type="list" name="res_files" label="res files [.res]" format="txt,text"/> + </inputs> + + <outputs> + <data name="msp_output" format="msp" from_work_dir="simulated_spectra.msp" label="simulated_spectra.msp generated by ${tool.name} on ${on_string}"/> + </outputs> + + <tests> + <test> + <param name="mol" value="mol.xyz" ftype="xyz"/> + <param name="res_files"> + <collection type="list"> + <element name="res_files_1" value="res_files/TMP.1_qcxms.txt" /> + <element name="res_files_2" value="res_files/TMP.2_qcxms.txt" /> + <element name="res_files_3" value="res_files/TMP.3_qcxms.txt" /> + </collection> + </param> + <output name="msp_output" file="output.msp" ftype="msp"/> + </test> + </tests> + + <help><![CDATA[ + The QCxMS getres tool is used to simulate mass spectra for a given molecule. + This tool take res and molecules files and generates simulated mass spectra. + ]]> + </help> + + <citations> + <citation type="doi">10.1002/anie.201300158</citation> + <citation type="doi">10.1039/C4OB01668H</citation> + <citation type="doi">10.1021/jp5096618</citation> + <citation type="doi">10.1255/ejms.1313</citation> + <citation type="doi">10.1021/acs.jpca.6b02907</citation> + </citations> +</tool>