view filterFragSpectra.xml @ 7:2e10c13085c9 draft default tip

"planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit e3b17490a958d80ebe78ef1bebebef48948e1240"
author computational-metabolomics
date Tue, 08 Feb 2022 14:02:03 +0000
parents 96af79da0cc6
children
line wrap: on
line source

<tool id="mspurity_filterfragspectra" name="msPurity.filterFragSpectra" version="@TOOL_VERSION@+galaxy@GALAXY_TOOL_VERSION@">
    <description>
      Filter fragmentations spectra associated with an XCMS feature
    </description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <expand macro="requirements" />
    <command detect_errors="exit_code" interpreter="Rscript"><![CDATA[
        filterFragSpectra.R
            --out_rdata='$filterFragSpectra_output_rdata'
            --out_peaklist_prec='$filterFragSpectra_output_prec_tsv'
            --out_peaklist_frag='$filterFragSpectra_output_frag_tsv'
            --pa='$pa'
            --ilim=$ilim
            --plim=$plim
            --ra=$ra
            --snr=$snr
            --snmeth=$snmeth
            $rmp
            $allfrag
    ]]></command>
    <inputs>
        <param argument="--pa" type="data"
               label="purityA object with fragmentation linked to XCMS features" format="rdata"
               help="purityA object saved as 'pa' in a RData file where fragmentation has
                     been linked to XCMS features(output from frag4feature tool)"/>
        <param argument="--plim" type="float" value="0.5" help=""
               label="Miniumum precursor ion purity of the associated precursor for
                     fragmentation spectra scan"  />
        <param argument="--ilim" type="float" value="0.0" label="Peak instensity threshold" help="" />
        <param argument="--ra" type="float" min="0.0" max="1.0" value="0.0"
               label="Relative abundance threshold" help="" />
        <param argument="--snr" type="float" value="0.0" label="Signal-to-noise threshold" help="" />
        <param argument="--snmeth" type="select" label="Function to calculate noise." help="" >
            <option value="median" selected="true">median</option>
            <option value="mean">mean</option>
            <!-- <option value="mad">mad</option> -->
        </param>
        <param argument="--rmp" type="boolean" checked="false" truevalue="--rmp" falsevalue=""
               label="Remove peaks that do not meet the filtering criteria.
                      Otherwise peaks will be flagged instead."
               help="" />
        <param argument="--allfrag" type="boolean" checked="false" truevalue="--allfrag" falsevalue=""
               label="Perform filtering on all fragmentation spectra (not just those aligned to XCMS features)"
               help="" />
    </inputs>
    <outputs>
        <data name="filterFragSpectra_output_rdata" format="rdata"
              label="${tool.name} on ${on_string}: RData" />
        <data name="filterFragSpectra_output_prec_tsv" format="tsv"
              label="${tool.name} on ${on_string}: peaklist (precursors)" />
        <data name="filterFragSpectra_output_frag_tsv" format="tsv"
              label="${tool.name} on ${on_string}: peaklist (fragments)" />
    </outputs>
    <tests>
        <test>
            <param name="pa" value="frag4feature_output.RData" />
            <output name="filterFragSpectra_output_rdata"
                    file="filterFragSpectra_output.RData" ftype="rdata" compare="sim_size" />
            <output name="filterFragSpectra_output_prec_tsv"
                    file="filterFragSpectra_output_prec.tsv" ftype="tsv" />
            <output name="filterFragSpectra_output_frag_tsv"
                    file="filterFragSpectra_output_frag.tsv" ftype="tsv" />
        </test>
    </tests>

    <help><![CDATA[
=============================================================
Filter Fragmentation Spectra
=============================================================
-----------
Description
-----------

Flag and filter features based on signal-to-noise ratio, relative abundance, intensity threshold and precursor ion purity of precursor.


**Example LC-MS/MS processing workflow**


* Purity assessments
    +  (mzML files) -> purityA -> (pa)
* XCMS processing
    +  (mzML files) -> xcms.xcmsSet -> xcms.merge -> xcms.group -> xcms.retcor -> xcms.group -> (xset)
* Fragmentation processing
    + (xset, pa) -> frag4feature -> **filterFragSpectra** -> averageAllFragSpectra -> createDatabase -> spectralMatching -> (sqlite spectral database)

See Bioconductor documentation for more details, functions:
msPurity::filterFragSpectra()

-----------
Outputs
-----------
* filter_fragmentation_spectra_rdata: RData of the purityA object (pa) with filtered data
* peaklist_prec_tsv: precursor peaklist
* peaklist_frag_tsv: fragmentation peaklist

    ]]></help>

    <expand macro="citations" />

</tool>