view deconrank.xml @ 19:aa7b5aac31d8 draft default tip

planemo upload for repository https://github.com/computational-metabolomics/dma-tools-galaxy commit 14435cfc042911bf1ee409f5a0d5ef908f5feec0-dirty
author tomnl
date Thu, 21 Jun 2018 08:46:19 -0400
parents 1f5c623cac2e
children
line wrap: on
line source

<tool id="deconrank" name="deconrank" version="0.3.13">
    <description>Deconvolute adducts and isotopes then score and rank for fragmentation</description>
    <requirements>
        <requirement type="package" version="0.1.7">deconrank</requirement>
    </requirements>
    <stdio>
        <exit_code range="1:" />
    </stdio>

    <command ><![CDATA[
        echo "$irm" &&
        python -m deconrank
                    -i $peaks_file
                    -o .
                    --delim tab
                    #if not $polarity == "auto"
                        --pol $polarity
                    #end if
                    --tech $technology
                    --pol $polarity
                    #if $rulescores == "user"
                        --rp $rulescores.rulescores
                    #end if
                    --pthr $pthr
                    --stp $stp
                    --irm "$irm"
                    --max_time $dschedule.max_time
                    --min_time $dschedule.min_time
                    --max_cid_time $dschedule.max_cid_time
                    --peak_time_cid $dschedule.peak_time_cid
                    --peak_time_hcd $dschedule.peak_time_hcd
                    --percentage_cid $dschedule.percentage_cid
                    --delay_time $dschedule.delay_time
                    #if $full_output
                        --full_output
                    #end if
                    #if $dschedule.template_cond.template_select == "user"
                        --method_template_name '$dschedule.template_cond.template_name'
                    #end if
                    --target_name '$peaks_file.element_identifier'

                    && ls && pwd

     ]]></command>

    <inputs>
        <param type="data" name="peaks_file" format="tabular,tsv"
                help="tsv or tabular file with mz and intensity columns"/>

        <param name="technology" type="select" label="technology" help="Mass spectrometry technology used" >
            <option value="lcms" selected="true">LC-MS</option>
            <option value="dims">DI-MS</option>
        </param>

        <param name="polarity" type="select" label="polarity" help="polarity [pos, neg]" >
            <option value="pos" >positive</option>
            <option value="neg">negative</option>
        </param>

        <conditional name="rulescores">
            <param name="rulescores" type="select" label="Scores for adducts" >
                <option value="default" >Default</option>
                <option value="user" >Provide a csv file of the rules to use</option>
            </param>
            <when value="user">
                        <param type="data" name="rulescores" format="tsv, tabular"
                help="User supplied rules file used to for scoring adducts, should contain at least
                      2 columns: [name, fragscore]
                      Where a score of 1 indicates the adduct is the best adduct form to fragment"/>
            </when>
            <when value="default"> </when>
        </conditional>

        <param name="pthr" label="precursor ion purity threshold" type="float" value="0.4" min="0" max="1"/>
        <param name="stp" label="Second tier percentage" type="float" value="0.0" min="0" max="1"
               help="Second tier percentage, % of second tier that we go into the target list. should be in decimal
                format i.e. 0.1 = 10%. Default is to remove all second tier peaks (i.e. set to 0.0)"/>

        <param name="irm" type="select" multiple="true" label="isotope removal" help="" >
            <option value="[M]+">[M]+</option>
            <option value="[M+1]+" selected="true">[M+1]+</option>
            <option value="[M+2]+" selected="true" >[M+2]+</option>
            <option value="[M+3]+">[M+3]+</option>
            <option value="[M+4]+">[M+4]+</option>
            <option value="[M]2+">[M]2+</option>
            <option value="[M+1]2+" selected="true">[M+1]2+</option>
            <option value="[M+2]2+" selected="true">[M+2]2+</option>
            <option value="[M+3]2+">[M+3]2+</option>
            <option value="[M+4]2+">[M+4]2+</option>
            <option value="[M]3+">[M]3+</option>
            <option value="[M+1]3+">[M+1]3+</option>
            <option value="[M+2]3+">[M+2]3+</option>
            <option value="[M+3]3+">[M+3]3+</option>
            <option value="[M+4]3+">[M+4]3+</option>

            <option value="[M]-">[M]-</option>
            <option value="[M+1]-" selected="true">[M+1]-</option>
            <option value="[M+2]-" selected="true" >[M+2]-</option>
            <option value="[M+3]-">[M+3]-</option>
            <option value="[M+4]-">[M+4]-</option>
            <option value="[M]2-">[M]2-</option>
            <option value="[M+1]2-" selected="true" >[M+1]2-</option>
            <option value="[M+2]2-" selected="true" >[M+2]2-</option>
            <option value="[M+3]2-" >[M+3]2-</option>
            <option value="[M+4]2-">[M+4]2-</option>
            <option value="[M]3-">[M]3-</option>
            <option value="[M+1]3-">[M+1]3-</option>
            <option value="[M+2]3-">[M+2]3-</option>
            <option value="[M+3]3-">[M+3]3-</option>
            <option value="[M+4]3-">[M+4]3-</option>
        </param>

        <param name="full_output" type="boolean" label="Use extended output for the scores tsv file?"/>

        <section name="weights" title="Weightings for scores" expanded="False" help="All values need to sum to 1">
            <param name="adduct" type="float" value="0.3" min="0" max="1"/>
            <param name="intensity" type="float" value="0.3" min="0" max="1" />
            <param name="precursor-ion-purity" type="float" value="0.2" min="0" max="1" />
            <param name="clustern" type="float" value="0.2" min="0" max="1" />
        </section>




        <section name="dschedule" title="Scheduling features for DIMS fragmentation experimental run" expanded="False">
            <param name="max_time" type="float" value="1800" help="Max time for run (secs)"/>
            <param name="min_time" type="float" value="120" help="Min time for run (secs)"/>
            <param name="max_cid_time" type="float" value="300" help="Max time to perform CID fragmentation (secs)" />
            <param name="peak_time_hcd" type="float" value="10" help="Time to fragment a peak using HCD (secs)" />
            <param name="peak_time_cid" type="float" value="12" help="Time to fragment a peak using CID (secs)" />
            <param name="percentage_cid" type="float" value="0.333" min="0" max="1" help="Percentage of time fragmenting using
                                                            CID (rather than HCD)"/>
            <param name="delay_time" type="float" value="24" help="Delay time before acquisition begins (secs)"/>

            <conditional name="template_cond">
                <param name="template_select" type="select" label="Use default method template file names?"
                  help="Default names are: Neg_MSMS_MSn.meth and Pos_MSMS_MSn.meth">
                    <option value="default" >Default</option>
                    <option value="user" >Provide name</option>
                </param>
                <when value="user">
                         <param name="template_name" label="method template name" type="text" />
                </when>
                <when value="default"> </when>
            </conditional>
        </section>


    </inputs>
    <outputs>
        <data name="scores" label="${tool.name} on ${on_string}: scores"
              from_work_dir="scores.tsv"  format="tsv"/>
        <data name="traceback" label="${tool.name} on ${on_string}: traceback"
              from_work_dir="traceback.tsv" format="tsv"/>

        <collection name="targets"  type="list" label="${tool.name} on ${on_string}: targets" format="tsv">
              <discover_datasets pattern="(?P&lt;designation&gt;.+)\.tsv"  directory="targets"   format="tsv" visible="false"
              assign_primary_output="true"/>
              <filter>technology == "dims"</filter>
        </collection>

        <data name="XcaliburAutoInput" label="${tool.name} on ${on_string}: XcaliburAutoInput"
              from_work_dir="xcalibur_auto_input.tsv" format="tsv">
            <filter>technology == "dims"</filter>
        </data>

    </outputs>
    <tests>
        <test>
            <param name="peaks_file" value="camera_annotated_peaklist.txt" ftype="tsv"/>
            <param name="technology" value="dims"/>
            <param name="polarity" value="pos"/>
            <output name="scores" value="scores.tsv"/>
            <output name="traceback" value="traceback.tsv"/>
            <output name="XcaliburAutoInput" value="XcaliburAutoInput.tsv"/>
            <output name="target" value="target.tsv"/>
        </test>
    </tests>

    <help><![CDATA[
    Deconvolute adducts and isotopes then score and rank for fragmentation

    ]]></help>
    <citations>    </citations>
</tool>