# HG changeset patch # User proteore # Date 1521037494 14400 # Node ID 1e99111901424e224aacebb860a816858257b19e # Parent 2c1012e0a628b13e338875b5e3e5a6363f38d4c6 planemo upload commit 08f1831e097df5d74bf60ff5955e7e9c8e524cc8-dirty diff -r 2c1012e0a628 -r 1e9911190142 README.rst --- a/README.rst Thu Mar 08 10:41:08 2018 -0500 +++ b/README.rst Wed Mar 14 10:24:54 2018 -0400 @@ -13,7 +13,7 @@ ------------------------------------------------------- -This tool allows to remove unneeded data (e.g. contaminants, non-significant values) from a proteomics results file (e.g. MaxQuant or Proline output). +This tool allows to filter out data according to your specific needs (e.g. contaminants, non-significant values or related to a particular annotation) 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** @@ -31,17 +31,17 @@ ALDOA_RABBIT -**The line that contains these keywords will be eliminated from input file.** +**The line that contains these keywords will be filtered from input file and provided in a separate 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 **Yes**, only the fields that contains exactly the same content will be filtered. -- If you choose **No**, all the fields containing the keyword will be removed. +- If you choose **No**, all the fields containing the keyword will be filtered. For example: -**Yes** option (exact match) selected using the keyword "kinase": only lines which contain exactly "kinase" is removed. +**Yes** option (exact match) selected using the keyword "kinase": only lines which contain exactly "kinase" is filtered (and not "Kinase"). **No** option (partial match) for "kinase": not only lines which contain "kinase" but also lines with "alpha-kinase" (and so on) are removed. @@ -57,4 +57,4 @@ * A text file containing the resulting filtered input file. -* A text file containing the rows removed from the input file. \ No newline at end of file +* A text file containing the rows that have been filtered from the input file. diff -r 2c1012e0a628 -r 1e9911190142 filter_kw_val.py --- a/filter_kw_val.py Thu Mar 08 10:41:08 2018 -0500 +++ b/filter_kw_val.py Wed Mar 14 10:24:54 2018 -0400 @@ -4,12 +4,22 @@ def options(): """ - Parse options + Parse options: + -i, --input Input filename and boolean value if the file contains header ["filename,true/false"] + -m, --match if the keywords should be filtered in exact + --kw Keyword to be filtered, the column number where this filter applies, + boolean value if the keyword should be filtered in exact ["keyword,ncol,true/false"]. + This option can be repeated: --kw "kw1,c1,true" --kw "kw2,c1,false" --kw "kw3,c2,true" + --kwfile A file that contains keywords to be filter, the column where this filter applies and + boolean value if the keyword should be filtered in exact ["filename,ncol,true/false"] + --value The value to be filtered, the column number where this filter applies and the + operation symbol ["value,ncol,=/>/>=/ - + @@ -106,7 +106,7 @@ - + @@ -125,7 +125,7 @@