Mercurial > repos > proteore > filter_keywords_values
view filter_kw_val.xml @ 4:2c1012e0a628 draft
planemo upload commit f23adbff4edf77bde1fe742f7bd6dcc7ae0fbb8e-dirty
author | proteore |
---|---|
date | Thu, 08 Mar 2018 10:41:08 -0500 |
parents | 593b8a1b2a7b |
children | 1e9911190142 |
line wrap: on
line source
<tool id="MQoutputfilter" name="Filter by keywords or numerical value" version="0.1.0"> <description></description> <requirements> </requirements> <stdio> <exit_code range="1:" /> </stdio> <command><![CDATA[ python $__tool_directory__/filter_kw_val.py -i "$input1,$header" -o "$output1" --trash_file "$trash_file" ## Keywords #for $i, $key in enumerate($keyword) #if $key.k.kw != "None" #if $key.k.kw == "text" --kw "$key.k.txt" "$key.ncol" "$key.match" #else if $key.k.kw == "file" --kw_file "$key.k.file" "$key.ncol" "$key.match" #end if #end if #end for ## Number of proteins #for $i, $val in enumerate($value) #if $val.v.val != "None" --value #if $val.v.val == "Equal" $val.v.equal "$val.ncol" "=" #else if $val.v.val == "Higher" $val.v.higher "$val.ncol" ">" #else if $val.v.val == "Equal or higher" $val.v.equal_higher "$val.ncol" ">=" #else if $val.v.val == "Lower" $val.v.lower "$val.ncol" "<" #else $val.v.equal_lower "$val.ncol" "<=" #end if #end if #end for ]]></command> <inputs> <param type="data" name="input1" format="txt,tabular" label="Input file" help="Input file is a tab-delimited file containing proteomics identification and/or quantitative results" /> <param name="header" type="boolean" checked="true" truevalue="true" falsevalue="false" label="Does your input file contain header?" /> <repeat name="keyword" title="Filter by keywords" > <param name="ncol" type="text" value="c1" label="Please specify the column number of the input file on which you want to apply the filter" help='For example, fill in "c1" if the keywords you want to filter out are listed in the first column' /> <param type="boolean" name="match" truevalue="True" label="Would you like to search for exact match?" help='Choosing "Yes" will only filter out exact match (i.e. case sensitive), see below for more details' /> <conditional name="k" > <param argument="--kw" type="select" label="Filter by keyword" > <option value="None" selected="True">---</option> <option value="text">Enter keywords (copy/paste)</option> <option value="file">Choose a file containing keywords</option> </param> <when value="None" /> <when value="text" > <param name="txt" type="text" label="Copy/paste keywords to be removed" help='Keywords should be separated by ";", for example: A8K2U0;Q5TA79;O43175' > <sanitizer> <valid initial="string.printable"> <remove value="'"/> </valid> <mapping initial="none"> <add source="'" target="__sq__"/> </mapping> </sanitizer> </param> </when> <when value="file" > <param name="file" type="data" format="txt,tabular" label="Choose a file containing keywords" /> </when> </conditional> </repeat> <repeat name="value" title="Filter by value" > <param name="ncol" type="text" value="c1" label="Please specify the column number of the input file on which you want to apply the filter" help='For example, fill in "c1" if the keywords you want to filter out are listed in the first column' /> <conditional name="v" > <param argument="--val" type="select" label="Filter by value" > <option value="None">---</option> <option value="Equal">=</option> <option value="Higher">></option> <option value="Equal or higher">>=</option> <option value="Lower"><</option> <option value="Equal or lower"><=</option> </param> <when value="None" > </when> <when value="Equal" > <param name="equal" type="float" value="" label="Value" /> </when> <when value="Higher" > <param type="float" name="higher" value="" label="Value" /> </when> <when value="Equal or higher" > <param type="float" name="equal_higher" value="" label="Value" /> </when> <when value="Lower" > <param type="float" name="lower" value="" label="Value" /> </when> <when value="Equal or lower" > <param type="float" name="equal_lower" value="" label="Value" /> </when> </conditional> </repeat> </inputs> <outputs> <data name="output1" format="tabular" label="${tool.name} on ${input1.name}" /> <data name="trash_file" format="tabular" label="${tool.name} on ${input1.name} - Removed lines" /> </outputs> <tests> <test> <param name="input1" value="Lacombe_et_al_2017_OK.txt" /> <param name="header" value="true" /> <repeat name="keyword"> <param name="ncol" value="c1" /> <param name="match" value="True" /> <conditional name="k"> <param name="kw" value="text" /> <param name="txt" value="P04264;P35908;P13645;Q5D862;Q5T749;Q8IW75;P81605;P22531;P59666;P78386" /> </conditional> </repeat> <output name="output1" file="FKW_Lacombe_et_al_2017_OK.txt" /> <output name="trash_file" file="Trash_FKW_Lacombe_et_al_2017_OK.txt" /> </test> </tests> <help><![CDATA[ This tool allows to remove unneeded data (e.g. contaminants, non-significant values) from a proteomics results file (e.g. MaxQuant or Proline output). **For each row, if there are more than one protein IDs/protein names/gene names, only the first one will be considered in the output** **Filter the file by keywords** Several options can be used. For each option, you can fill in the field or upload a file which contains the keywords. - If you choose to fill in the field, the keywords should be separated by ";", for example: A8K2U0;Q5TA79;O43175 - If you choose to upload a file in a text format in which each line is a keyword, for example: REV TRYP_PIG ALDOA_RABBIT **The line that contains these keywords will be eliminated from input file.** **Keywords search can be applied by performing either exact match or partial one by using the following option** - If you choose **Yes**, only the fields that contains exactly the same content will be removed. - If you choose **No**, all the fields containing the keyword will be removed. For example: **Yes** option (exact match) selected using the keyword "kinase": only lines which contain exactly "kinase" is removed. **No** option (partial match) for "kinase": not only lines which contain "kinase" but also lines with "alpha-kinase" (and so on) are removed. **Filter the file by values** You can choose to use one or more options (e.g. to filter out peptides of low intensity value, by q-value, etc.). * For each option, you can choose between "=", ">", ">=", "<" and "<=", then enter the value to filter and specify the column to apply that option. **Output** The tool will produce 2 output files. * A text file containing the resulting filtered input file. * A text file containing the rows removed from the input file. ----- .. class:: infomark **Authors** T.P. Lien Nguyen, Florence Combes, Yves Vandenbrouck - CEA, INSERM, CNRS, Grenoble-Alpes University, BIG Institute, FR Sandra Dérozier, Olivier Rué, Christophe Caron, Valentin Loux - INRA, Paris-Saclay University, MAIAGE Unit, Migale Bioinformatics platform, FR This work has been partially funded through the French National Agency for Research (ANR) IFB project. Contact support@proteore.org for any questions or concerns about the Galaxy implementation of this tool. ]]></help> <citations> </citations> </tool>