view macros.xml @ 20:08768644f9c4 draft

planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 1e7f850b28deeb3c4b31d9730c8f803891467afb
author lecorguille
date Thu, 09 Feb 2017 04:50:45 -0500
parents 2faecb1270fe
children 51b9f9452794
line wrap: on
line source

<?xml version="1.0"?>
<macros>
    <xml name="requirements">
        <requirements>
            <requirement type="package" version="0.4_1">r-snow</requirement>
            <requirement type="package" version="1.46.0">bioconductor-xcms</requirement>
            <requirement type="package" version="1.1_4">r-batch</requirement>
        </requirements>
    </xml>
    <xml name="requirements_light">
        <requirements>
            <requirement type="package" version="1.46.0">bioconductor-xcms</requirement>
        </requirements>
    </xml>
    <xml name="stdio">
        <stdio>
            <exit_code range="1" level="fatal" />
        </stdio>
    </xml>

    <token name="@COMMAND_XCMS_SCRIPT@">
        LANG=C Rscript $__tool_directory__/xcms.r
    </token>

    <token name="@COMMAND_LOG_EXIT@">
        ;
        return=\$?;
        mv log.txt $log;
        cat $log;
        sh -c "exit \$return"
    </token>

    <!-- zipfile load for planemo test -->

    <token name="@COMMAND_FILE_LOAD@">
        #if $file_load_conditional.file_load_select == "yes":
            #if $file_load_conditional.inputs.input == "zip_file":
                zipfile $file_load_conditional.inputs.zip_file
            #else
                #set singlefile_galaxyPath = ','.join( [ str( $single_file ) for $single_file in $file_load_conditional.inputs.single_file ] )
                #set singlefile_sampleName = ','.join( [ str( $single_file.name ) for $single_file in $file_load_conditional.inputs.single_file ] )

                singlefile_galaxyPath $singlefile_galaxyPath singlefile_sampleName $singlefile_sampleName
            #end if
        #end if
    </token>

    <xml name="file_load">
        <conditional name="file_load_conditional">
            <param name="file_load_select" type="select" label="Resubmit your dataset or your zip file" help="Use only if you get a message which say that your original dataset or zip file have been deleted on the server." >
                <option value="no" >no need</option>
                <option value="yes" >yes</option>
            </param>
            <when value="no">
            </when>
            <when value="yes">
                <conditional name="inputs">
                    <param name="input" type="select" label="Choose your inputs method" >
                        <option value="zip_file" selected="true">Zip file from your history containing your chromatograms</option>
                        <option value="single_file">A mzXML or netCDF file from your history</option>
                    </param>
                    <when value="zip_file">
                        <param name="zip_file" type="data" format="no_unzip.zip,zip" label="Zip file" />
                    </when>
                    <when value="single_file">
                        <param name="single_file" type="data" format="mzxml,netcdf" label="Single file"  multiple="true"/>
                    </when>
                </conditional>
            </when>
        </conditional>
    </xml>

    <token name="@COMMAND_PEAKLIST@">
        #if $peaklist.peaklistBool
            variableMetadataOutput $variableMetadata
            dataMatrixOutput $dataMatrix
            convertRTMinute $peaklist.convertRTMinute
            numDigitsMZ $peaklist.numDigitsMZ
            numDigitsRT $peaklist.numDigitsRT
            intval $peaklist.intval
        #end if
    </token>

    <xml name="input_peaklist">
        <conditional name="peaklist">
            <param name="peaklistBool" type="boolean" label="Get a Peak List" />
            <when value="true">
              <param name="convertRTMinute" type="boolean" checked="false" truevalue="TRUE" falsevalue="FALSE" label="Convert retention time (seconds) into minutes" help="Convert the columns rtmed, rtmin and rtmax into minutes"/>
              <param name="numDigitsMZ" type="integer" value="4" label="Number of decimal places for mass values reported in ions' identifiers." help="A minimum of 4 decimal places is recommended. Useful to avoid duplicates within identifiers" />
              <param name="numDigitsRT" type="integer" value="0" label="Number of decimal places for retention time values reported in ions' identifiers." help="Useful to avoid duplicates within identifiers" />
              <param name="intval" type="select" label="Reported intensity values" help="[intval] See the help section below">
                  <option value="into" selected="true">into</option>
                  <option value="maxo">maxo</option>
                  <option value="intb">intb</option>
              </param>
            </when>
            <when value="false" />
        </conditional>
    </xml>

    <xml name="output_peaklist">
        <data name="variableMetadata" format="tabular" label="${image.name[:-6]}.fillPeaks.variableMetadata.tsv">
            <filter>(peaklist['peaklistBool'])</filter>
        </data>
        <data name="dataMatrix" format="tabular" label="${image.name[:-6]}.fillPeaks.dataMatrix.tsv" >
            <filter>(peaklist['peaklistBool'])</filter>
        </data>
    </xml>

    <token name="@HELP_AUTHORS@">
.. class:: infomark

**Authors**  Colin A. Smith csmith@scripps.edu, Ralf Tautenhahn rtautenh@gmail.com, Steffen Neumann sneumann@ipb-halle.de, Paul Benton hpaul.benton08@imperial.ac.uk and Christopher Conley cjconley@ucdavis.edu

.. class:: infomark

**Galaxy integration** ABiMS TEAM - UPMC/CNRS - Station biologique de Roscoff and Yann Guitton yann.guitton@oniris-nantes.fr - part of Workflow4Metabolomics.org [W4M]

 | Contact support@workflow4metabolomics.org for any questions or concerns about the Galaxy implementation of this tool.

---------------------------------------------------

    </token>


    <xml name="citation">
        <citations>
            <citation type="doi">10.1021/ac051437y</citation>
            <citation type="doi">10.1093/bioinformatics/btu813</citation>
        </citations>
    </xml>
</macros>