Mercurial > repos > recetox > qcxms_production_run
comparison 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 |
comparison
equal
deleted
inserted
replaced
1:bc099c440016 | 2:b566b27247f7 |
---|---|
1 <tool id="qcxms_production_run" name="QCxMS production run" version="@TOOL_VERSION@+galaxy1" profile="21.05"> | 1 <tool id="qcxms_production_run" name="QCxMS production run" version="@TOOL_VERSION@+galaxy2" profile="22.09"> |
2 <description>Production run to obtain a QCxMS simulated mass spectrum</description> | 2 <description>Production run to obtain a QCxMS simulated mass spectrum</description> |
3 | 3 |
4 <macros> | 4 <macros> |
5 <import>macros.xml</import> | 5 <import>macros.xml</import> |
6 </macros> | 6 </macros> |
8 <expand macro="creator"/> | 8 <expand macro="creator"/> |
9 <expand macro="requirements"/> | 9 <expand macro="requirements"/> |
10 | 10 |
11 <command detect_errors="exit_code"><![CDATA[ | 11 <command detect_errors="exit_code"><![CDATA[ |
12 python3 '${create_folder_structure}' && | 12 python3 '${create_folder_structure}' && |
13 find TMPQCXMS/*/ -type d | xargs -I {} -P \${GALAXY_SLOTS:-1} sh -c 'cd {} && /qcxms_bin/qcxms --prod >> $log' && | 13 (cd TMPQCXMS/*/ && /qcxms_bin/qcxms --prod) >> $log |
14 /qcxms_bin/getres && | |
15 /plotms_bin/PlotMS.v.6.2.0/plotms && | |
16 sh ${__tool_directory__}/msp_out.sh | |
17 ]]></command> | 14 ]]></command> |
18 | 15 |
19 <environment_variables> | 16 <environment_variables> |
20 <environment_variable name="OMP_NUM_THREADS">1,2,1</environment_variable> | 17 <environment_variable name="OMP_NUM_THREADS">1,2,1</environment_variable> |
21 </environment_variables> | 18 </environment_variables> |
23 <configfiles> | 20 <configfiles> |
24 <configfile name="create_folder_structure"> | 21 <configfile name="create_folder_structure"> |
25 import os | 22 import os |
26 import shutil | 23 import shutil |
27 | 24 |
28 #set in_collection = str("', '").join([str($f) for $f in $in_files]) | 25 names = '$xyz_file.name' |
29 #set start_collection = str("', '").join([str($f) for $f in $start_files]) | 26 folder_name = names.split("_")[0] |
30 #set xyz_collection = str("', '").join([str($f) for $f in $xyz_files]) | |
31 | 27 |
32 #set names = str("', '").join([str($f.name) for $f in $xyz_files]) | |
33 names = '$names' | |
34 folder_names = [x.split("_")[0] for x in names] | |
35 | |
36 in_collection = '$in_collection' | |
37 start_collection = '$start_collection' | |
38 xyz_collection = '$xyz_collection' | |
39 | 28 |
40 # Create a new output folder to store the result | 29 # Create a new output folder to store the result |
41 output_path = 'TMPQCXMS' | 30 output_path = 'TMPQCXMS' |
42 os.makedirs(output_path, exist_ok=True) | 31 os.makedirs(output_path, exist_ok=True) |
43 | 32 |
44 for folder_name, in_file, start_file, xyz_file in zip(folder_names, in_collection, start_collection, xyz_collection): | 33 new_folder_path = os.path.join(output_path, folder_name) |
45 new_folder_path = os.path.join(output_path, folder_name) | 34 os.makedirs(new_folder_path, exist_ok=True) |
46 os.makedirs(new_folder_path, exist_ok=True) | |
47 | 35 |
48 shutil.copy2(os.path.join(os.path.dirname(in_collection[0]), in_file), os.path.join(new_folder_path, 'qcxms.in')) | 36 shutil.copy2(os.path.join(os.path.dirname('$in_file'), '$in_file'), os.path.join(new_folder_path, 'qcxms.in')) |
49 shutil.copy2(os.path.join(os.path.dirname(start_collection[0]), start_file), os.path.join(new_folder_path, 'qcxms.start')) | 37 shutil.copy2(os.path.join(os.path.dirname('$start_file'), '$start_file'), os.path.join(new_folder_path, 'qcxms.start')) |
50 shutil.copy2(os.path.join(os.path.dirname(xyz_collection[0]), xyz_file), os.path.join(new_folder_path, 'start.xyz')) | 38 shutil.copy2(os.path.join(os.path.dirname('$xyz_file'), '$xyz_file'), os.path.join(new_folder_path, 'start.xyz')) |
51 | 39 |
52 </configfile> | 40 </configfile> |
53 </configfiles> | 41 </configfiles> |
54 | 42 |
55 <inputs> | 43 <inputs> |
56 <param type="data_collection" collection_type="list" name="in_files" label="in files [.in]" format="in,txt,text"/> | 44 <param type="data" name="in_file" label="in files [.in]" format="txt,text"/> |
57 <param type="data_collection" collection_type="list" name="start_files" label="start files [.start]" format="start,txt,text"/> | 45 <param type="data" name="start_file" label="start files [.start]" format="txt,text"/> |
58 <param type="data_collection" collection_type="list" name="xyz_files" label="xyz files [.xyz]" format="xyz,txt,text"/> | 46 <param type="data" name="xyz_file" label="xyz files [.xyz]" format="xyz,txt,text"/> |
59 <param name="store_extended_output" type="boolean" value="false" label="Store additional outputs" help="Output the logfile."/> | 47 <param name="store_extended_output" type="boolean" value="false" label="Store additional outputs" help="Output the logfile."/> |
60 </inputs> | 48 </inputs> |
61 | 49 |
62 <outputs> | 50 <outputs> |
63 <data name="msp_output" format="msp" from_work_dir="simulated_spectra.msp" label="simulated_spectra.msp generated by ${tool.name} on ${on_string}"/> | 51 <data name="log" format="txt" label="logfile_of_${tool.id}_on_${on_string}"> |
64 <data name="log" format="txt" label="logfile of ${tool.name} on ${on_string}"> | |
65 <filter>store_extended_output</filter> | 52 <filter>store_extended_output</filter> |
66 </data> | 53 </data> |
54 <data name="res_files" format="txt" from_work_dir="TMPQCXMS/*/qcxms.res" label="res files generated by ${tool.name} on ${on_string}"/> | |
67 </outputs> | 55 </outputs> |
68 | 56 |
69 <tests> | 57 <tests> |
70 <test expect_failure="true"/> | 58 <test expect_num_outputs="1"> |
59 <param name="in_file" value="TMP.1_qcxms_in.txt" ftype="txt"/> | |
60 <param name="start_file" value="TMP.1_qcxms_start.txt" ftype="txt"/> | |
61 <param name="xyz_file" value="TMP.1_start_xyz.txt" ftype="txt"/> | |
62 <output name="res_files" file="res_out.txt" ftype="txt"/> | |
63 </test> | |
71 </tests> | 64 </tests> |
72 | 65 |
73 <help><![CDATA[ | 66 <help><![CDATA[ |
74 The QCxMS production run tool is used to simulate mass spectra for a given molecule using the QCxMS (Quantum Chemistry by Mass Spectrometry) method. | 67 The QCxMS production run tool is used to simulate mass spectra for a given molecule using the QCxMS (Quantum Chemistry by Mass Spectrometry) method. |
75 This tool generates simulated mass spectra based on the equilibrium structure of a molecule and allows you to perform QCxMS production runs. | 68 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. |
76 For detail information visit the documentation at https://xtb-docs.readthedocs.io/en/latest/qcxms_doc/qcxms_run.html#excecuting-the-production-runs | 69 For detail information visit the documentation at https://xtb-docs.readthedocs.io/en/latest/qcxms_doc/qcxms_run.html#excecuting-the-production-runs |
77 ]]> | 70 ]]> |
78 </help> | 71 </help> |
79 | 72 |
80 <citations> | 73 <citations> |