view anticipated_purity_lcms.xml @ 1:c64891642e41 draft

planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
author tomnl
date Tue, 27 Mar 2018 05:32:57 -0400
parents dc00b7222a3c
children f5f04305ff9f
line wrap: on
line source

<tool id="anticipated_purity_lcms" name="anticipated_purity_lcms" version="0.0.3">
        <description>Calculate the anticipated precursor ion purity from a LC-MS XCMS dataset.
    </description>
    <macros>
        <import>macros.xml</import>
    </macros>



    <expand macro="requirements" />


    <stdio>
        <exit_code range="1:" />
    </stdio>
    <command interpreter="Rscript"><![CDATA[
        anticipated_purity_lcms.R
            --xset_path=$xset
            --out_dir=.
            --minOffset=$minoffset
            --maxOffset=$maxoffset
            --singleFile=$singleFile
            --purityType=$purityType
            --cores=\${GALAXY_SLOTS:-4}
            #if $xgroups.xgroups == "choose"
                --xgroups=$xgroups.xgroups_value
            #end if
            --camera_xcms=$camera_xcms
            #if $camera_xcms == "camera"
                --rdata_name=xa
            #else
                --rdata_name=xset
            #end if
            --iwNorm=$iw_norm
            --ilim=$ilim
            #if $isotopes.isotopes == "exclude_default"
                --exclude_isotopes
            #elif $isotopes.isotopes == "user"
                --exclude_isotopes
                --isotope_matrix=$isotopes.im
            #end if
            #if $file_load_conditional.file_load_select == 'yes'
                --galaxy_files='
                #for $i in $file_load_conditional.input
                    $i,
                #end for
                '
            #end if
            #if $file_load_conditional.file_load_select == 'yes'
                --files='
                #for $i in $file_load_conditional.input
                    $i.name,
                #end for
                '
            #end if

            #if $choose_class_cond.choose_class== 'choose'
                --choose_class=$choose_class_cond.class
            #end if
            #if $ignore_files_cond.ignore_files_choice== 'choose'
                --ignore_files=$ignore_files_cond.ignore_files
            #end if

            #if $raw_rt_columns
                --rtraw_columns
            #end if


    ]]></command>
    <inputs>

        <param type="data" name="xset" format="rdata"
                help="xcmsSet object saved as an RData file"/>
        <expand macro="offsets" />
        <expand macro="general_params" />
        <param name="singleFile" type="integer" label="singleFile" value="0"
                    help="If just a single file for purity is to be calculated (rather than the grouped XCMS peaks).
                    Uses the index of the files in xcmsSet object. If zero this is ignored"/>

        <conditional name="choose_class_cond">
            <param name="choose_class" type="select" label="Choose class of XCMS set object to perform calculation on?" >
                <option value="choose">Choose class</option>
                <option value="all" selected="true">calculate average across all classes</option>
            </param>
            <when value="all">
            </when>
            <when value="choose">
                                <param name="class" type="text" label="Choose class"
               help="Comma separated string of classes (found in the phenoData slot of xcmsSet object
                i.e. xset@phenoData). An average will across all the choosen classes." />
            </when>
        </conditional>

        <conditional name="ignore_files_cond">
            <param name="ignore_files_choice" type="select" label="Ignore files?" >
                <option value="choose">Choose files to ignore from calculation</option>
                <option value="none" selected="true" >Include all files of selected classes in calculation</option>
            </param>
            <when value="none">
            </when>
            <when value="choose">
                                <param name="ignore_files" type="text" label="ignore files"
               help="Comma separated string of filenames to ignore (do not include the directory) eg. blank1.mzML,blank2.mzML,sample4.mzML"  />
            </when>
        </conditional>


        <conditional name="xgroups">
            <param name="xgroups" type="select" label="xgroups" >
                <option value="choose">Choose XCMS grouped features to calculate precursor ion purity</option>
                <option value="all" selected="true">Calculate precursor ion purity for all XCMS grouped features</option>
            </param>
            <when value="all">
            </when>
            <when value="choose">
                                <param name="xgroups_value" type="text" label="xgroup ids"
               help="Comma separated string of xcms groups to perform prediction on eg. 1,2,3,4"  />
            </when>
        </conditional>


        <param name="purityType" type="select" label="Method of averaging purity"
               help="Area and average used for the purity predictions. FWHM='Full width half maximum', FW='Full width'">
                <option value="purityFWHMmedian" selected="true" >FWHM median</option>
                <option value="purityFWHMmean" >FWHM mean</option>
                <option value="purityFWmedian" >FW median</option>
                <option value="purityFWmean" >FW mean</option>
        </param>

        <expand macro="camera_xcms" />

        <param name="raw_rt_columns" type="boolean" label="Has the raw retention time been tracked within the peaks?"
               help="Only applicable when using retention time correction with obiwarp. When obiwarp is used
                     the retention time correction tracking is slightly different to the other correction methods. To ensure
                     correct tracking with obiwarp an additional tool (track_rt_raw) should be performed prior to
                     any retention time correction."/>

        <expand macro="fileload" />

    </inputs>
    <outputs>
	    <data name="anticipated_purity_lcms" format="tsv" label="${tool.name} on ${on_string}: tsv"
              from_work_dir="anticipated_purity_lcms.tsv" />
        <data name="anticipated_purity_lcms_rdata" format="rdata" label="${tool.name} on ${on_string}: RData"
              from_work_dir="anticipated_purity_lcms.rdata" />
    </outputs>
    <tests>
        <test>
            <conditional name="file_load_conditional">
                <param name="file_load_select" value="yes"/>
                <param name="input" >
                    <collection type="list">
                        <element name="LCMS_1.mzML" value="LCMS_1.mzML"/>
                        <element name="LCMS_2.mzML" value="LCMS_2.mzML"/>
                    </collection>
                </param>
            </conditional>
            <conditional name="xgroups">
                <param name="xgroups" value="choose"/>
                <param name="xgroups_value" value="1,2,3,4,5,6,7,8,9,10,11,12,13,14,15"/>
            </conditional>
            <param name="iw_norm" value="QE5" />
            <param name="xset" value="xset.RData"/>

            <output name="anticipated_purity_lcms" value="anticipated_purity_lcms.tsv" >
            </output>
        </test>
    </tests>
    <help><![CDATA[

===================================================================
Calculate anticipated precursor ion purity from LC-MS XCMS dataset
===================================================================
-----------
Description
-----------

Tool to calculate the anticipated precursor ion purity of selected precursor based on a prior LC-MS dataset. Based on
XCMS determined features

--------------
Output example
--------------
Output consists of the mz and intensity of the XCMS features (id based on the XCMS group id) and various
metrics regarding the anticipated precursor ion purity.

============= ============= ============= ================ ================ ================ ================ ================ ================
grpid         mean          median        sd               stde	            RSD              pknm             i                mz
============= ============= ============= ================ ================ ================ ================ ================ ================
1             1.00          1.00          0.0000           0.0000           0.0000           1                5404920          100.0758
------------- ------------- ------------- ---------------- ---------------- ---------------- ---------------- ---------------- ----------------
2             0.59          0.57          0.3016           0.1508           50.570           3                8793845          101.0084
------------- ------------- ------------- ---------------- ---------------- ---------------- ---------------- ---------------- ----------------
3             0.08          0.07          0.0784           0.0164           29.643           4                1526502          100.9781
------------- ------------- ------------- ---------------- ---------------- ---------------- ---------------- ---------------- ----------------
4             1.00          1.00          0.0000           0.0000           0.0000           1                42513139         102.0914
============= ============= ============= ================ ================ ================ ================ ================ ================



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