Mercurial > repos > recetox > qcxms_production_run
diff qcxms_prod_run.xml @ 2:b566b27247f7 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:31 +0000 |
parents | bc099c440016 |
children | e97bfe7ac906 |
line wrap: on
line diff
--- a/qcxms_prod_run.xml Tue Feb 27 16:20:31 2024 +0000 +++ b/qcxms_prod_run.xml Fri Mar 08 10:55:31 2024 +0000 @@ -1,4 +1,4 @@ -<tool id="qcxms_production_run" name="QCxMS production run" version="@TOOL_VERSION@+galaxy1" profile="21.05"> +<tool id="qcxms_production_run" name="QCxMS production run" version="@TOOL_VERSION@+galaxy2" profile="22.09"> <description>Production run to obtain a QCxMS simulated mass spectrum</description> <macros> @@ -10,10 +10,7 @@ <command detect_errors="exit_code"><![CDATA[ python3 '${create_folder_structure}' && - find TMPQCXMS/*/ -type d | xargs -I {} -P \${GALAXY_SLOTS:-1} sh -c 'cd {} && /qcxms_bin/qcxms --prod >> $log' && - /qcxms_bin/getres && - /plotms_bin/PlotMS.v.6.2.0/plotms && - sh ${__tool_directory__}/msp_out.sh + (cd TMPQCXMS/*/ && /qcxms_bin/qcxms --prod) >> $log ]]></command> <environment_variables> @@ -25,54 +22,50 @@ import os import shutil -#set in_collection = str("', '").join([str($f) for $f in $in_files]) -#set start_collection = str("', '").join([str($f) for $f in $start_files]) -#set xyz_collection = str("', '").join([str($f) for $f in $xyz_files]) +names = '$xyz_file.name' +folder_name = names.split("_")[0] -#set names = str("', '").join([str($f.name) for $f in $xyz_files]) -names = '$names' -folder_names = [x.split("_")[0] for x in names] - -in_collection = '$in_collection' -start_collection = '$start_collection' -xyz_collection = '$xyz_collection' # Create a new output folder to store the result output_path = 'TMPQCXMS' os.makedirs(output_path, exist_ok=True) -for folder_name, in_file, start_file, xyz_file in zip(folder_names, in_collection, start_collection, xyz_collection): - new_folder_path = os.path.join(output_path, folder_name) - os.makedirs(new_folder_path, exist_ok=True) +new_folder_path = os.path.join(output_path, folder_name) +os.makedirs(new_folder_path, exist_ok=True) - shutil.copy2(os.path.join(os.path.dirname(in_collection[0]), in_file), os.path.join(new_folder_path, 'qcxms.in')) - shutil.copy2(os.path.join(os.path.dirname(start_collection[0]), start_file), os.path.join(new_folder_path, 'qcxms.start')) - shutil.copy2(os.path.join(os.path.dirname(xyz_collection[0]), xyz_file), os.path.join(new_folder_path, 'start.xyz')) +shutil.copy2(os.path.join(os.path.dirname('$in_file'), '$in_file'), os.path.join(new_folder_path, 'qcxms.in')) +shutil.copy2(os.path.join(os.path.dirname('$start_file'), '$start_file'), os.path.join(new_folder_path, 'qcxms.start')) +shutil.copy2(os.path.join(os.path.dirname('$xyz_file'), '$xyz_file'), os.path.join(new_folder_path, 'start.xyz')) </configfile> </configfiles> <inputs> - <param type="data_collection" collection_type="list" name="in_files" label="in files [.in]" format="in,txt,text"/> - <param type="data_collection" collection_type="list" name="start_files" label="start files [.start]" format="start,txt,text"/> - <param type="data_collection" collection_type="list" name="xyz_files" label="xyz files [.xyz]" format="xyz,txt,text"/> + <param type="data" name="in_file" label="in files [.in]" format="txt,text"/> + <param type="data" name="start_file" label="start files [.start]" format="txt,text"/> + <param type="data" name="xyz_file" label="xyz files [.xyz]" format="xyz,txt,text"/> <param name="store_extended_output" type="boolean" value="false" label="Store additional outputs" help="Output the logfile."/> </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}"/> - <data name="log" format="txt" label="logfile of ${tool.name} on ${on_string}"> + <data name="log" format="txt" label="logfile_of_${tool.id}_on_${on_string}"> <filter>store_extended_output</filter> </data> + <data name="res_files" format="txt" from_work_dir="TMPQCXMS/*/qcxms.res" label="res files generated by ${tool.name} on ${on_string}"/> </outputs> <tests> - <test expect_failure="true"/> + <test expect_num_outputs="1"> + <param name="in_file" value="TMP.1_qcxms_in.txt" ftype="txt"/> + <param name="start_file" value="TMP.1_qcxms_start.txt" ftype="txt"/> + <param name="xyz_file" value="TMP.1_start_xyz.txt" ftype="txt"/> + <output name="res_files" file="res_out.txt" ftype="txt"/> + </test> </tests> <help><![CDATA[ The QCxMS production run tool is used to simulate mass spectra for a given molecule using the QCxMS (Quantum Chemistry by Mass Spectrometry) method. - This tool generates simulated mass spectra based on the equilibrium structure of a molecule and allows you to perform QCxMS production runs. + This tool allows you to perform QCxMS production runs and generates res files which are further used by QCxMS get results tool to produce the simulated mass spectra. For detail information visit the documentation at https://xtb-docs.readthedocs.io/en/latest/qcxms_doc/qcxms_run.html#excecuting-the-production-runs ]]> </help>