view BlibSearch.xml @ 0:5a4801b7d106 draft default tip

planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/bibliospec commit 68cd288246e3678dc92a179f1f022d30c0f11ce7
author galaxyp
date Tue, 08 May 2018 14:16:45 -0400
parents
children
line wrap: on
line source

<tool id="BlibSearch" name="BlibSearch" version="@VERSION@.0">
    <description>search a spectrum library for matches to query spectra</description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <expand macro="requirements" />
    <command detect_errors="exit_code"><![CDATA[
        #set $exts = {'mgf':'MGF', 'mzml':'mzML', 'mzxml':'mzXML', 'ms2': 'ms2', 'wiff':'wiff'}
        #set $ext = $exts[$spectrum_file.extension.lower()]
        #set $spectrum_name = $spectrum_file.display_name.split('/')[-1].replace($spectrum_file.extension, "") + "." + $ext
        ln -s -f '${spectrum_file}' '${spectrum_name}' &&
        #set $blib_name = $blib.display_name.split('/')[-1].replace($blib.extension, "") + ".blib"
        ln -s -f '$blib' '$blib_name' &&
        BlibSearch 
        --clear-precursor $clear_precursor
        --topPeaksForSearch $topPeaksForSearch
        --mz-window $mz_window
        --min-peaks $min_peaks
        --low-charge $low_charge
        --high-charge $high_charge
        --report-matches $report_matches
        $preserve_order
        ## --psm-result-file '$psms'
        --report-file temp.report
        '$spectrum_name' '$blib_name'
        && grep -v '^$' temp.report > '$report'
    ]]></command>
    <inputs>
        <param name="spectrum_file" type="data" format="mzml,mzxml,mgf,ms2" label="Spectrum file to search"/>
        <param name="blib" type="data" format="sqlite" label="Filtered Blib"/>
        <param name="clear_precursor" type="boolean" value="true" label="Remove the peaks in a X m/z window around the precursor from the query and library spectrum."/>
        <param name="topPeaksForSearch" type="integer" value="100" label="Use ARG of the highest intensity peaks."/>
        <param name="mz_window" type="float" value="3" label="Compare query to library spectra with precursor m/z +/- ARG."/>
        <param name="min_peaks" type="integer" value="20" label="Search only spectra with charge no less than ARG."/>
        <param name="low_charge" type="integer" value="1" label="Search only spectra with charge no less than ARG."/>
        <param name="high_charge" type="integer" value="5" label="Search only spectra with charge no higher than ARG."/>
        <param name="report_matches" type="integer" value="5" label="Return ARG of the best matches for each query.  Use -1 to report all."/>
        <param name="preserve_order" type="boolean" truevalue="--preserve-order" falsevalue="" checked="false" 
               label="Search spectra in the order they appear in the file." 
               help="Default to search as sorted by precursor m/z."/>
    </inputs>
    <outputs>
        <data name="report" format="tabular" label="${spectrum_file.name}.report">
            <actions>
                <action name="comment_lines" type="metadata" default="13" />
                <action name="column_names" type="metadata" default="Query,LibId,LibSpec,rank,dotp,query-mz,query-z,lib-mz,lib-z,copies,candidates,sequence,TIC-raw,bp-mz-raw,bp-raw,lbp-mz-raw,num-peaks,matched-ions" />
            </actions>
        </data>
        <!--
        <data name="psms" format="tabular" label="${spectrum_file.name}.psms"/>
        -->
    </outputs>
    <tests>
        <test>
            <param name="spectrum_file" ftype="mzml" value="msgf-test.mzML"/>
            <param name="blib" ftype="sqlite" value="msgf_filterd.blib"/>
            <output name="report">
                <assert_contents>
                    <has_text text="LibSpec" />
                    <has_text text="VIYTTNAVEAVHRQFRKLTK" />
                </assert_contents>
            </output>
        </test>
    </tests>
    <help><![CDATA[
BiblioSpec_ is a suite of software tools for creating and searching MS/MS peptide spectrum libraries.

BlibSearch_ creates a library of peptide MS/MS spectra from a variety of different database search results. 

::

  Usage: BlibSearch [options] <spectrum-file> <library>[+]
  
  Options:
    -c [ --clear-precursor ] arg (=1)  Remove the peaks in a X m/z window around
                                       the precursor from the query and library
                                       spectrum.
    --topPeaksForSearch arg (=100)     Use ARG of the highest intensity peaks.
    -w [ --mz-window ] arg (=3)        Compare query to library spectra with
                                       precursor m/z +/- ARG.
    -n [ --min-peaks ] arg (=20)       Search only spectra with charge no less
                                       than ARG.
    -L [ --low-charge ] arg (=1)       Search only spectra with charge no less
                                       than ARG.
    -H [ --high-charge ] arg (=5)      Search only spectra with charge no higher
                                       than ARG.
    -m [ --report-matches ] arg (=5)   Return ARG of the best matches for each
                                       query.  Use -1 to report all.
    --psm-result-file arg              Return results in a .psm file named ARG.
    -R [ --report-file ] arg           Return results in report file named ARG.
                                       Default is <spectrum file name>.report.
    --preserve-order                   Search spectra in the order they appear in
                                       the file.  Default to search as sorted by
                                       precursor m/z.
    -p [ --parameter-file ] arg        File containing search parameters.
                                       Command line values override file values.
    -v [ --verbosity ] arg (=status)   Control the level of output to stderr.
                                       (silent, error, status, warn, debug,
                                       detail, all)  Default status.
    -h [ --help ]                      Print help message.


.. _BlibSearch: https://skyline.ms/wiki/home/software/BiblioSpec/page.view?name=BlibSearch
.. _BiblioSpec: https://skyline.ms/project/home/software/BiblioSpec/begin.view?
    ]]></help>
    <expand macro="citations" />
</tool>