view recetox_msfinder.xml @ 5:e7eff0c9baa3 draft default tip

planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/recetox_msfinder commit c6bc00f50c232c1c7cbb2e6f838c14a0c1c20e05
author recetox
date Wed, 24 Jan 2024 13:26:32 +0000
parents ae66b58846cd
children
line wrap: on
line source

<tool id="recetox_msfinder" name="RECETOX MsFinder" version="@TOOL_VERSION@+galaxy4">
    <description>Annotation of fragment peaks in mass spectral libraries.</description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <expand macro="refs"/>
    <expand macro="creator" />

    <expand macro="requirements" />
    <command detect_errors="exit_code">
        <![CDATA[
        mkdir output;
        sh ${write_param};
        mono /MsFinder/MsFinder/bin/Debug/MsfinderConsoleApp.exe annotate -i '$input_data' -m 'MSFINDER.INI' -o 'output/result.msp';
        [ -f output/log_smiles.smi ] && sed -i '1s/^/smiles\n/' output/log_smiles.smi;
        [ -s output/result.msp ] || rm output/result.msp;
    ]]>
    </command>

    <configfiles>
        <configfile name="write_param">
            printf "%s\n" "Ms2Tolerance=$Ms2Tolerance" \
            "IsTmsMeoxDerivative=$IsTmsMeoxDerivative" \
            "RelativeAbundanceCutOff=$RelativeAbundanceCutOff" \
            "Ms1Tolerance=$Ms1Tolerance" \
			"MassToleranceType=$MassToleranceType" \
			"StructurePredictionTimeOut=$StructurePredictionTimeOut" \
            "LewisAndSeniorCheck=$LewisAndSeniorCheck" \
			"IsUseRtForFilteringCandidates=False" \
			"RtToleranceForStructureElucidation=2.5" \
			"IsUsePredictedRtForStructureElucidation=False" \
			"Coeff_RtPrediction=-1" \
			"Intercept_RtPrediction=-1" \
			"IsUseRtInchikeyLibrary=True" \
			"IsUsePredictedCcsForStructureElucidation=False" \
			"IsUseCcsForFilteringCandidates=True" \
			"CcsToleranceForStructureElucidation=10" \
			"CanExcuteMS2AdductSearch=False" \
            "IsUseXlogpPrediction=False" \
            "ElementProbabilityCheck=$ElementProbabilityCheck" \
            "IsotopicAbundanceTolerance=$IsotopicAbundanceTolerance" \
            "TreeDepth=$TreeDepth" \
            "$element_ratio_check" \
            "IsUseEiFragmentDB=$IsUseEiFragmentDB" >MSFINDER.INI
            
            #set element_selected = "\n".join([str($element) for $element in str($element_selection_option).split(",")])
            printf "%s\n" "$element_selected" >> MSFINDER.INI
        </configfile>
    </configfiles>

    <inputs>
        <expand macro="input" />
        <expand macro="parameter" />
        <param name="element_selection_option" type="select" label="Element selection" multiple="true" optional="true"
            help="Generate formula candidates that just contain the elements selected by the users. Check 'IsTmsMeoxDerivative' if you want to annotate EI-MS spectra.">
            <expand macro="element_select" />
        </param>
    </inputs>

    <outputs>
        <expand macro="output" />
    </outputs>

    <tests>
        <test>
            <param name="input_data" value="test.msp" ftype="msp" />
            <output_collection name="output" type="list">
                <element name="result" file="out.msp" lines_diff="16"/>
            </output_collection>
            <!-- This is set to 16 since msfinder sometimes places double bonds between certain atoms and sometimes not - there are 16 such cases in this file. -->
        </test>
        <test>
            <param name="input_data" value="test.msp" ftype="msp" />
            <param name="element_ratio_check" value="ExtendedRange=TRUE"/>
            <param name="TreeDepth" value="3"/>
            <param name="element_selection_option" value="Ocheck=True,Ncheck=True,Pcheck=True,Scheck=True,Fcheck=True,ClCheck=True,BrCheck=True,Icheck=True,SiCheck=True"/>
            <output_collection name="output" type="list">
                <element name="result" file="test2_out.msp" lines_diff="24"/>
            </output_collection>
        </test>
        <test>
            <param name="input_data" value="test_log.msp" ftype="msp" />
            <output_collection name="output" type="list">
                <element name="log_smiles" file="log_smiles.smi" />
            </output_collection>
        </test>
    </tests>

    <help>
        <![CDATA[
            @HELP@
        ]]>
    </help>

    <citations>
        <expand macro="citations" />
    </citations>
</tool>