view encyclopedia_searchtolib.xml @ 4:54f4d8c5fbe0 draft

"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/encyclopedia/tools/encyclopedia commit 96a023cccea27c30ff61caf271a3c79b92db1873"
author jjohnson
date Tue, 07 Jul 2020 11:57:09 -0400
parents a74d446c8f5f
children b9c8e02d1405
line wrap: on
line source

<tool id="encyclopedia_searchtolib" name="SearchToLib" version="@VERSION@.0">
    <description>Build a Chromatogram Library from Data-Independent Acquisition (DIA) MS/MS Data</description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <expand macro="requirements" />
    <command detect_errors="aggressive"><![CDATA[
        @CMD_IMPORTS@
        @LINK_SCAN_INPUTS@
        @LINK_FASTA_INPUT@
        @LINK_TARGET_FASTA@
        @LINK_LIB_INPUT@
        for SCAN_FILE in `ls -1 inputs/*`; do 
        echo "\$SCAN_FILE" &&
        EncyclopeDIA -Djava.awt.headless=true -Xmx20g 
        #if not $l
            -walnut
        #end if
        -i \$SCAN_FILE
        @FASTA_INPUT@
        @TARGET_FASTA@
        @LIB_INPUT@
        @COMMON_OPTIONS@
        @MASS_LIBRARY_TOLERANCE@
        @PERCOLATOR_OPTIONS@
        @PEAK_OPTIONS@
        @WINDOW_OPTIONS@
        @MODIFICATION_OPTIONS@
        @SEARCH_OPTIONS@ | tee -a search2lib.log
        ; done && 
        for TXT in `find inputs/*.mzML.[efw]*[ast].txt`; do TRGT=`echo \$TXT | sed 's/mzML/dia/'`; ln -s \$TXT \$TRGT; done &&
        EncyclopeDIA -Djava.awt.headless=true -Xmx12g -libexport
        #if not $l
            -pecan
        #end if
        @SCAN_INPUTS@
        @FASTA_INPUT@
        @TARGET_FASTA@
        @LIB_INPUT@
        -a $a
        -o chromatogram_library.elib
        && ls -l ./*.* inputs/*
        | tee -a search2lib.log
    ]]></command>
    <inputs>
        <expand macro="scan_inputs"/>
        <expand macro="lib_input" optional="true" libhelp="Use a Prosit dlib spectral library to make a chromatogram elib using EncyclopeDIA, or else leave blank to make a Chromatogram library from just the fasta using Walnut"/>
        <expand macro="fasta_input"/>
        <expand macro="target_fasta"/>
        <expand macro="options_section"/>
        <param argument="-a" type="boolean" truevalue="true" falsevalue="false" checked="false" label="align between files" help="retention-time alignment of peptides is generally not needed when when building a library from narrow-window spectrums"/>
        <param name="select_outputs" type="select" label="Select outputs" multiple="true">
            <option value="log" selected="true">log</option>
            <option value="elib" selected="true">elib</option>
            <option value="features" selected="false">concatenated_features.txt</option>
            <option value="results" selected="false">concatenated_results.txt</option>
            <option value="decoy" selected="false">concatenated_decoy.txt</option>
            <!--
            <option value="rt_plots" selected="false">Retention Time Plots</option>
            <option value="rt_tables" selected="false">Retention Time Tables</option>
            <option value="peptides" selected="false">peptides.txt (requires align between files)</option>
            <option value="proteins" selected="false">proteins.txt (requires align between files)</option>
            -->
        </param>
    </inputs>
    <outputs>
        <data name="log" format="txt" label="${tool.name} ${on_string} log" from_work_dir="search2lib.log">
            <filter>'log' in select_outputs</filter>
        </data>
        <data name="elib" format="elib" label="${tool.name} ${on_string} elib" from_work_dir="chromatogram_library.elib">
            <filter>'elib' in select_outputs</filter>
        </data>
        <data name="features" format="tabular" label="${tool.name} ${on_string} concatenated_features.txt" from_work_dir="inputs/chromatogram_library_concatenated_features.txt">
            <filter>'features' in select_outputs</filter>
            <actions>
                <action name="column_names" type="metadata" default="id,TD,ScanNr,topN,rank,peakZScore,peakCalibratedScore,deltaSn,avgIdotp,midIdotp,peakScore,peakWeightedScore,NCI,CIMassErrMean,CIMassErrVar,precursorMassErrMean,precursorMassErrVar,peakSimilarity,sampledTimes,midTime,spectraNorm,pepLength,charge2,charge3,precursorMz,sequence,protein" />
            </actions>
        </data>
        <data name="results" format="tabular" label="${tool.name} ${on_string} concatenated_results.txt" from_work_dir="inputs/chromatogram_library_concatenated_results.txt">
            <filter>'results' in select_outputs</filter>
            <actions>
                <action name="column_names" type="metadata" default="PSMId,score,q-value,posterior_error_prob,peptide,proteinIds" />
            </actions>
        </data>
        <data name="decoy" format="tabular" label="${tool.name} ${on_string} concatenated_decoy.txt" from_work_dir="inputs/chromatogram_library_concatenated_decoy.txt">
            <filter>'decoy' in select_outputs</filter>
            <actions>
                <action name="column_names" type="metadata" default="PSMId,score,q-value,posterior_error_prob,peptide,proteinIds" />
            </actions>
        </data>
        <!--
        <collection name="rt_plots" type="list" label="${tool.name} - ${on_string}: Retention Time Plots">
            <filter>l and 'rt_plots' in select_outputs</filter>
            <discover_datasets pattern="(?P&lt;designation&gt;.+\.pdf)" ext="pdf" directory="inputs"/>
        </collection>
        <collection name="rt_tables" type="list" label="${tool.name} - ${on_string}: Retention Time Tables">
            <filter>l and 'rt_tables' in select_outputs</filter>
            <discover_datasets pattern="(?P&lt;designation&gt;.+\.rt_fit\.txt)" ext="tabular" directory="inputs"/>
        </collection>
        -->

        <!--
        <data name="peptides" format="tabular" label="${tool.name} ${on_string} peptides.txt" from_work_dir="chromatogram_library.elib.peptides.txt">
            <filter>a and 'peptides' in select_outputs</filter>
            <actions>
                <action name="column_names" type="metadata" default="Peptide,Protein,numFragments" />
            </actions>
        </data>
        <data name="proteins" format="tabular" label="${tool.name} ${on_string} proteins.txt" from_work_dir="chromatogram_library.elib.proteins.txt">
            <filter>a and 'proteins' in select_outputs</filter>
            <actions>
                <action name="column_names" type="metadata" default="Protein,NumPeptides,PeptideSequences" />
            </actions>
        </data>
        -->
    </outputs>
    <help><![CDATA[

**SearchToLIB**

@ENCYCLOPEDIA_WIKI@

SearchToLIB uses the EncyclopeDIA algorithm, or the Walnut (Pecan) algorithm to search Data-Independent Acquisition (DIA) MS/MS spectrum files and creates a DIA elib chromatogram library for EncyclopeDIA DIA quantitation search. 

SearchToLIB can also quantify peptides from the chromatogram library. 

@MSCONVERT_HELP@

**Typical DIA Workflow**

Two sets of Mass Spec MS/MS DIA data are collected for the experiment.  In addition to collecting wide-window DIA experiments on each quantitative replicate, a pool containing peptides from every condition is measured using several staggered narrow-window DIA experiments.

  1. SearchToLib is first run with the pooled narrow-window mzML files to create a combined DIA elib chromatogram library.   
     If a Spectral library argument is provided, for example from **Prosit**, SearchToLIB uses EncyclopeDIA to search each input spectrum mzML file.  
     Otherwise, SearchToLIB uses Walnut, a FASTA database search engine for DIA data that uses PECAN-style scoring.


       * Prosit_ generates a predicted spectrum library of fragmentation patterns and retention times for every +2H and +3H tryptic peptide in a FASTA database, with up to one missed cleavage.


  2. EncyclopeDIA Quantify is then run on the wide-window quantitative replicate mzML files using that chromatogram library to produce quantification results.

.. image:: SearchToLib_Workflow.png
  :width: 810
  :height: 580

.. _Prosit: https://www.proteomicsdb.org/prosit

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