# HG changeset patch # User recetox # Date 1708591292 0 # Node ID bf836aaeca19ad51e85c26acc2c1f8304ff6d287 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/qcxms commit 45ad41f2368834ab06929496fb17fc9a85b8e3c5 diff -r 000000000000 -r bf836aaeca19 macros.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/macros.xml Thu Feb 22 08:41:32 2024 +0000 @@ -0,0 +1,26 @@ + + 5.2.1 + + + recetox/qcxms-docker:@TOOL_VERSION@ + + + + + topic_3332 + + + operation_0297 + + + + + + + + + + diff -r 000000000000 -r bf836aaeca19 msp_out.sh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/msp_out.sh Thu Feb 22 08:41:32 2024 +0000 @@ -0,0 +1,11 @@ +#!/bin/sh + +molname=`sed -n '2{p;q}' TMPQCXMS/TMP.1/start.xyz` +kword=$(grep 'NPOINTS' result.jdx) +num_peaks=$(echo "$kword" | sed 's/^[^=]*=//') +echo `pwd` +sed -n '/PEAK/,/END/{/PEAK/!{/END/!p}}' result.jdx > temp.dat +awk '{print $1, $2}' temp.dat > tempa.dat +sed "1s/^/NAME: $molname\nNum Peaks: $num_peaks\n/" tempa.dat >> simulated_spectra.msp +sed -i '$a\ ' simulated_spectra.msp +rm temp.dat tempa.dat \ No newline at end of file diff -r 000000000000 -r bf836aaeca19 qcxms_prod_run.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/qcxms_prod_run.xml Thu Feb 22 08:41:32 2024 +0000 @@ -0,0 +1,87 @@ + + Production run to obtain a QCxMS simulated mass spectrum + + + macros.xml + + + + + + > $log' && + /qcxms_bin/getres && + /plotms_bin/PlotMS.v.6.2.0/plotms && + sh ${__tool_directory__}/msp_out.sh + ]]> + + + 1,2,1 + + + + +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]) + +#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) + + 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')) + + + + + + + + + + + + + + + store_extended_output + + + + + + + + + + + + 10.1002/anie.201300158 + 10.1039/C4OB01668H + 10.1021/jp5096618 + 10.1255/ejms.1313 + 10.1021/acs.jpca.6b02907 + + \ No newline at end of file diff -r 000000000000 -r bf836aaeca19 test-data/mol.xyz --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/mol.xyz Thu Feb 22 08:41:32 2024 +0000 @@ -0,0 +1,20 @@ +18 +Lindane +CL -2.3574740887 0.2795224786 1.4453580379 +C -1.5060254335 -0.0564753152 -0.1808833480 +C -0.7409992814 1.1908990145 -0.6060928106 +C -0.6154388189 -1.2913844585 -0.1359211653 +CL -0.4997346103 1.0723730326 -2.4801609516 +C 0.6426193118 1.3751488924 0.0051864041 +CL -1.5938731432 -2.7512128353 0.4462303221 +C 0.6645445824 -1.0841370821 0.6675278544 +CL 0.4618762434 2.1580321789 1.6895099878 +C 1.4344482422 0.0744384378 0.0415960811 +CL 1.6999230385 -2.6236054897 0.5561774969 +CL 3.0750505924 0.3596521318 0.8505522013 +H -2.3252866268 -0.2277424186 -0.8540474772 +H -1.3395941257 2.0737268925 -0.4863004684 +H -0.3587814867 -1.5482350588 -1.1510624886 +H 1.1898183823 2.1143426895 -0.5496439934 +H 0.4745289683 -0.9351251125 1.7152343988 +H 1.6943985224 -0.1802178770 -0.9732601047