Mercurial > repos > proteore > filter_keywords_values
diff filter_kw_val.xml @ 7:6f32c1e12572 draft default tip
planemo upload commit 72b345a7df2c87f07a9df71ecee1f252c9355337
| author | proteore |
|---|---|
| date | Fri, 01 Jun 2018 11:10:47 -0400 |
| parents | 1e9911190142 |
| children |
line wrap: on
line diff
--- a/filter_kw_val.xml Fri Apr 20 09:07:23 2018 -0400 +++ b/filter_kw_val.xml Fri Jun 01 11:10:47 2018 -0400 @@ -9,10 +9,11 @@ python $__tool_directory__/filter_kw_val.py -i "$input1,$header" -o "$output1" - --trash_file "$trash_file" + --filtered_file "$filtered_file" + --operator "$operator" ## Keywords - #for $i, $key in enumerate($keyword) + #for $key in $keyword #if $key.k.kw != "None" #if $key.k.kw == "text" --kw "$key.k.txt" "$key.ncol" "$key.match" @@ -22,8 +23,8 @@ #end if #end for - ## Number of proteins - #for $i, $val in enumerate($value) + ## value to filter + #for $val in $value #if $val.v.val != "None" --value #if $val.v.val == "Equal" @@ -34,16 +35,35 @@ $val.v.equal_higher "$val.ncol" ">=" #else if $val.v.val == "Lower" $val.v.lower "$val.ncol" "<" - #else + #else if $val.v.val == "Equal or lower" $val.v.equal_lower "$val.ncol" "<=" + #else + $val.v.different "$val.ncol" "!=" #end if #end if #end for + ##range of values to keep + #for $vr in $values_range + #if vr + --values_range $vr.bottom_value $vr.top_value $vr.ncol $vr.inclusive + #end if + #end for + + #if $sort_column != "" + --sort_col "$sort_column,$reversed_sort" + #end if + ]]></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 your operator for your filters" 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' /> @@ -71,7 +91,6 @@ </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" > @@ -82,6 +101,7 @@ <option value="Equal or higher">>=</option> <option value="Lower"><</option> <option value="Equal or lower"><=</option> + <option value="Different">!=</option> </param> <when value="None" > </when> @@ -100,18 +120,29 @@ <when value="Equal or lower" > <param type="float" name="equal_lower" value="" label="Value" /> </when> + <when value="Different"> + <param type="float" name="different" value="" label="Value"/> + </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" /> + <param name="inclusive" type="boolean" label="inclusive range ?" checked="false" truevalue="true" falsevalue="false" /> + </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} - Filtered lines" /> + <data name="filtered_file" format="tabular" label="${tool.name} on ${input1.name} - Filtered lines" /> </outputs> <tests> <test> <param name="input1" value="Lacombe_et_al_2017_OK.txt" /> <param name="header" value="true" /> + <param name="operator" value="OR"/> + <param name="sort_column" value="c1"/> + <param name="reversed_sort" value="false"/> <repeat name="keyword"> <param name="ncol" value="c1" /> <param name="match" value="True" /> @@ -120,16 +151,21 @@ <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" /> + <repeat name="value"> + <param name="ncol" value="c3"/> + <conditional name="v"> + <param name="val" value="Higher"/> + <param name="higher" value="20" /> + </conditional> + </repeat> + <output name="output1" file="output.csv" /> + <output name="filtered_file" file="filtered_output.csv" /> </test> </tests> <help><