view qcxms_prod_run.xml @ 4:356f7916ac07 draft default tip

planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/qcxms commit 5a088c3d758c9a1dbd119dad55ecffa173139a40
author recetox
date Thu, 17 Oct 2024 06:17:42 +0000
parents e97bfe7ac906
children
line wrap: on
line source

<tool id="qcxms_production_run" name="QCxMS production run" version="@TOOL_VERSION@+galaxy3" profile="22.09">
    <description>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 '${create_folder_structure}' &&
        (cd TMPQCXMS/*/ && /qcxms_bin/qcxms --prod) >> $log
    ]]></command>

    <environment_variables>
        <environment_variable name="OMP_NUM_THREADS">1,2,1</environment_variable>
    </environment_variables>

    <configfiles>
        <configfile name="create_folder_structure">
import os
import shutil

names = '$xyz_file.name'
folder_name = names.split("_")[0]


# Create a new output folder to store the result
output_path = 'TMPQCXMS'
os.makedirs(output_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_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" 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="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_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 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>

    <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>