Mercurial > repos > proteore > proteore_filter_keywords_values
diff filter_kw_val.xml @ 2:52a7afd01c6d draft
planemo upload commit 9af2cf12c26c94e7206751ccf101a3368f92d0ba
author | proteore |
---|---|
date | Tue, 18 Dec 2018 09:25:11 -0500 |
parents | cb9555653b09 |
children | 68cee865018e |
line wrap: on
line diff
--- a/filter_kw_val.xml Fri Sep 21 06:03:25 2018 -0400 +++ b/filter_kw_val.xml Tue Dec 18 09:25:11 2018 -0500 @@ -1,4 +1,4 @@ -<tool id="MQoutputfilter" name="Filter by keywords or numerical value" version="2018.09.21"> +<tool id="MQoutputfilter" name="Filter by keywords and/or numerical value" version="2018.12.18"> <description></description> <requirements> </requirements> @@ -18,7 +18,7 @@ #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" + --kw_file "$key.k.file" "$key.k.header" "$key.k.ncol" "$key.ncol" "$key.match" #end if #end if #end for @@ -56,25 +56,23 @@ ]]></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?" /> - <param name="operator" type="select" label="Please select an operator to combine your filters (if more than one)" help="OR : only one filter must be satisfied to filter a row, AND : all your filters must be satisfied to filter a row" > + <param type="data" name="input1" format="txt,tabular" label="Input file" /> + <param name="header" type="boolean" checked="true" truevalue="true" falsevalue="false" label="Does file contain header?" /> + <param name="operator" type="select" label="Select an operator to combine your filters (if more than one)" help="OR : only one filter must be satisfied to filter a row, AND : all your filters must be satisfied to filter a row" > <option value="OR" selected="True">OR</option> <option value="AND">AND</option> </param> - <param name="sort_column" type="text" value="" label="If you want to sort the result files by values from a column, please enter a column number" help="For example : fill in 'c1' if you want to sort your result file by the column 1 values." /> - <param name="reversed_sort" type="boolean" checked="false" truevalue="true" falsevalue="false" label="Sort in descending order ?"/> + <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' /> + <param name="ncol" type="text" value="c1" label="Column number on which 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="Search for exact match?" help='Choosing "Yes" will only filter out exact match (e.g. case sensitive), see help section' /> <conditional name="k" > - <param argument="--kw" type="select" label="Filter by keyword" > - <option value="text" selected="true">Enter keywords (copy/paste)</option> - <option value="file">Choose a file containing keywords</option> + <param name="kw" type="select" label="Enter keywords" > + <option value="text" selected="true">copy/paste</option> + <option value="file">File containing keywords</option> </param> - <when value="None" /> <when value="text" > - <param name="txt" type="text" label="Copy/paste keywords to be filtered out" help='Keywords must be separated by ";", for example: A8K2U0;Q5TA79;O43175' > + <param name="txt" type="text" label="Copy/paste keywords to be filtered out" help='Keywords must be separated by tab, space or carriage return into the form field, for example: A8K2U0 Q5TA79 O43175' > <sanitizer> <valid initial="string.printable"> <remove value="'"/> @@ -86,15 +84,16 @@ </param> </when> <when value="file" > - <param name="file" type="data" format="txt,tabular" label="Choose a file containing keywords" /> + <param name="file" type="data" format="txt,tabular" label="File containing keywords" /> + <param name="ncol" type="text" value="c1" label="Specify the column containing keywords" help='For example, fill in "c1" if keywords are in the first column' /> + <param name="header" type="boolean" checked="true" truevalue="true" falsevalue="false" label="Does file contain header?" /> </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' /> + <repeat name="value" title="Filter by numerical value" > + <param name="ncol" type="text" value="c1" label="Column number on which 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> + <param argument="Numerical Value" type="select" label="Select operator" > <option value="Equal">=</option> <option value="Higher">></option> <option value="Equal or higher">>=</option> @@ -102,8 +101,6 @@ <option value="Equal or lower"><=</option> <option value="Different">!=</option> </param> - <when value="None" > - </when> <when value="Equal" > <param name="equal" type="float" value="" label="Value" /> </when> @@ -124,16 +121,18 @@ </when> </conditional> </repeat> - <repeat name="values_range" title="Filter by range of values"> - <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 name="bottom_value" type="float" value="" label="Please enter the bottom value" /> - <param name="top_value" type="float" value="" label="Please enter the top value" /> + <repeat name="values_range" title="Filter by range of numerical values"> + <param name="ncol" type="text" value="c1" label="Column number on which 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 name="bottom_value" type="float" value="" label="Enter the bottom value" /> + <param name="top_value" type="float" value="" label="Enter the top value" /> <param name="inclusive" type="boolean" label="inclusive range ?" checked="false" truevalue="true" falsevalue="false" /> </repeat> - </inputs> + <param name="sort_column" type="text" value="" label="Sort result files by:" help="Fill in 'c1' if you want to sort your result file by the column 1 values" /> + <param name="reversed_sort" type="boolean" checked="false" truevalue="true" falsevalue="false" label="Sort in descending order ?"/> + </inputs> <outputs> - <data name="output1" format="tabular" label="${tool.name} on ${input1.name}" /> - <data name="filtered_file" format="tabular" label="${tool.name} on ${input1.name} - Filtered lines" /> + <data name="output1" format="tsv" label="${tool.name} on ${input1.name}" /> + <data name="filtered_file" format="tsv" label="${tool.name} on ${input1.name} - Filtered lines" /> </outputs> <tests> <test> @@ -147,7 +146,7 @@ <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" /> + <param name="txt" value="P04264 P35908 P13645 Q5D862 Q5T749 Q8IW75 P81605 P22531 P59666 P78386" /> </conditional> </repeat> <repeat name="value"> @@ -162,93 +161,98 @@ </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). +**Description** + +This tool allows to filter out data according to different criteria such as keywords (e.g. a list of contaminants) or numerical values (e.g. intensity measurements below a given threshold). +A boolean operator "OR/AND" allows to combine different type of filters making this tool very powerful. + +----- + +**Input** + +A table (file in txt, tab, tsv, csv format) of your identification and/or quantification results for example. + +----- + +**Parameters** + +**AND/OR operator** + +As many filters as needed can be combined, you can choose how filters apply on your data by using the following boolean operators: + +- OR: only one filter must be satisfied to remove one row +- AND: all filters must be satisfied to remove one row + +----- **Filter by keyword(s)** -Several options can be used. For each option, you can fill in the field or upload a file which contains the keywords. +Click on the "Filter by keywords" box to use it. You can either fill in the field (copy/paste) 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 +"Column number on which to apply the filter": You must then specify the column number of your input file on wich to apply the filter by keywords. + +- If you choose to fill in the field, the keywords should be separated by tab, space or carriage return into the form field, 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.** +LYSO_ECOLI -**Keywords search can be applied by performing either exact match or partial one by using the following option** +Lines that contains these keywords will be removed from input file. + +"Search for exact match?": 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 by values** +Example: -You can filter your data by a column of numerical values. -Enter the column to be use and select one operator in the list : +**Yes** option (exact match) selected using the keyword "kinase": only lines which contain exactly the word "kinase" will be removed. -- = -- != -- < -- <= -- > -- >= - -Then enter the value to filter and specify the column to apply that option. -If a row contains a value that correspond to your settings, it will be filtered. +**No** option (partial match) for "kinase": lines which contain "kinase" and lines with "alpha-kinase" (and so on) will be removed. ----- -**Filter by a range of values** +**Filter by numerical values**: You can filter your data by a column of numerical values. + +"Column number on which to apply the filter": you must specify the column number of your input file on wich to apply the filter by numerical value. + +Then select one of the operators in the list : -You can also set a range of values to filter your file. -In opposition to value filter, rows with values inside of the defined range are kept. +- = (equal) +- != (not equal) +- < (lower than) +- <= (lower than or equal to) +- > (greater than) +- >= (greater than or equal to) -Rows with values outside of the defined range will be filtered. +Then enter the numerical threshold to apply by filling the "Value" box. +If you choose > 10, each row containing a numerical value (in the chosen column of your input file) that correspond to your settings will be filtered out. ----- -**AND/OR operator** - -Since you can add as many filters as you want, you can choose how filters apply on your data. - -AND or OR operator option works on all filters : - -- OR : only one filter to be satisfied to remove one row -- AND : all filters must be satisfied to remove one row +**Filter by a range of values**: You can also set a range of values to filter your file. +Conversely to the numeric filter, rows with numerical values within the defined range will be kept while rows with values out of this range will be filtered out. ----- -**Sort the results files** - -You can sort the result file if you wish, it can help you to check results. +**Sort results files** -In order to do so : enter the column to be used, all columns will be sorted according to the one filled in. - -Rows stay intact, just in different order like excel. -You can also choose ascending or descending order, by default ascending order is set. +You can sort your results by column in ascending (default value) or descending by entering the column number on which to sort the data. ----- **Output** -The tool will produce 2 output files. +The tool returns two output files. -* A text file containing the resulting filtered input file. +* A text file containing the results that pass your filters -* A text file containing the rows removed from the input file. +* A text file containing the rows removed from the input file (i.e. containing data taht do not pass your filter(s). -----