annotate awklike-filter.xml @ 0:20e8be1464f5 draft default tip

"planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
author nml
date Tue, 19 May 2020 17:14:07 -0400
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
1 <tool id="csvtk_awklike_filter" name="csvtk-advanced-filter" version="@VERSION@+@GALAXY_VERSION@">
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
2 <description> rows by awk-like artithmetic/string expressions</description>
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
3 <macros>
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
4 <import>macros.xml</import>
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
5 </macros>
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
6 <expand macro="requirements" />
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
7 <expand macro="version_cmd" />
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
8 <command detect_errors="exit_code"><![CDATA[
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
9
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
10 ###################
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
11 ## Start Command ##
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
12 ###################
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
13 csvtk filter2 --num-cpus "\${GALAXY_SLOTS:-1}"
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
14
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
15 ## Add additional flags as specified ##
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
16 #######################################
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
17 $global_param.illegal_rows
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
18 $global_param.empty_rows
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
19 $global_param.header
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
20 $global_param.lazy_quotes
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
21
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
22 ## Set Tabular input/output flag if first input is tabular ##
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
23 #############################################################
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
24 #if $in_1.is_of_type("tabular"):
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
25 -t -T
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
26 #end if
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
27
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
28 ## Set input files ##
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
29 #####################
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
30 $in_1
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
31
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
32 ## Specify fields to filter ##
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
33 ##############################
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
34 -f '$in_text'
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
35
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
36 ## Specific inputs ##
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
37 #####################
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
38 $line_number
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
39
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
40 ## To output ##
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
41 ###############
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
42 > filtered
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
43
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
44 ]]></command>
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
45 <inputs>
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
46 <expand macro="singular_input"/>
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
47 <param name="in_text" type="text"
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
48 optional="false"
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
49 argument="-f"
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
50 label="Awk-like artithmetic/string expression">
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
51 <help>
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
52 <![CDATA[
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
53 Examples:
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
54 - '$age>12'
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
55 - '$1 > $3'
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
56 - '$name=="abc"'
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
57 - '$1 % 2 == 0'
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
58 More info is available in the help section below. The ' character is invalid and will be replaced, thus you must
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
59 surround strings with double quotes ("string") instead.
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
60 ]]>
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
61 </help>
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
62 <expand macro="text_sanitizer" />
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
63 </param>
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
64 <param name="line_number" type="boolean"
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
65 checked="false"
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
66 truevalue="-n"
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
67 falsevalue=""
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
68 argument="-n"
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
69 label="Print initial line number as the first column"
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
70 />
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
71 <expand macro="global_parameters" />
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
72 </inputs>
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
73 <outputs>
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
74 <data format_source="in_1" from_work_dir="filtered" name="filtered" label="${in_1.name} filtered by ${in_text}" />
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
75 </outputs>
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
76 <tests>
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
77 <test>
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
78 <param name="in_1" value="frequency.tsv" />
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
79 <param name="in_text" value="$3>1" />
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
80 <output name="filtered" file="filtered.tsv" ftype="tabular" />
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
81 </test>
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
82 </tests>
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
83 <help><![CDATA[
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
84
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
85 Csvtk - Filter2 Help
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
86 --------------------
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
87
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
88 Info
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
89 ####
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
90
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
91 Csvtk advanced filter (also called filter2) outputs rows that satisfy the input awk-like artithmetic/string expressions. Please see the
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
92 `documentation <https://github.com/Knetic/govaluate/blob/master/MANUAL.md>`_ for further details and examples on how to write expressions.
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
93
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
94 .. class:: warningmark
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
95
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
96 Single quotes are not allowed in text inputs!
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
97
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
98 .. class:: note
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
99
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
100 If your wanted column header has a space in it, use the column number. Example: Use $1 if column #1 is called "Colony Counts"
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
101
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
102 Supported operators and types:
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
103
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
104 - Modifiers: + - / * & | ^ ** % >> <<
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
105 - Comparators: > >= < <= == != =~ !~
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
106 - Logical ops: || &&
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
107 - Numeric constants, as 64-bit floating point (12345.678)
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
108 - String constants (double quotes: "foobar")
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
109 - Date constants (double quotes)
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
110 - Boolean constants: true false
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
111 - Parenthesis to control order of evaluation ( )
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
112 - Arrays (anything separated by , within parenthesis: (1, 2, "foo"))
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
113 - Prefixes: ! - ~
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
114 - Ternary conditional: ? :
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
115 - Null coalescence: ??
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
116
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
117 ----
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
118
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
119 @HELP_INPUT_DATA@
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
120
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
121
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
122 Usage
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
123 #####
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
124
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
125 **Ex. Filter2 on one column:**
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
126
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
127 Suppose we had the following table:
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
128
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
129 +---------------+------------+----------+
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
130 | Culture Label | Cell Count | Dilution |
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
131 +===============+============+==========+
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
132 | ECo-1 | 2523 | 1000 |
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
133 +---------------+------------+----------+
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
134 | LPn-1 | 100 | 1000000 |
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
135 +---------------+------------+----------+
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
136 | LPn-2 | 4 | 1000 |
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
137 +---------------+------------+----------+
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
138
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
139 If we wanted to find all samples with the label LPn, we could use the filter expression '$1 =~ "LPn*"' to get the following output:
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
140
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
141 +---------------+------------+----------+
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
142 | Culture Label | Cell Count | Dilution |
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
143 +===============+============+==========+
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
144 | LPn-1 | 100 | 1000000 |
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
145 +---------------+------------+----------+
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
146 | LPn-2 | 4 | 1000 |
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
147 +---------------+------------+----------+
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
148
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
149 Note how $1 was used to get column 1 due to it containing a space
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
150
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
151 ----
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
152
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
153 **Ex2. Filter2 with multiple inputs:**
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
154
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
155 Same input table
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
156
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
157 +---------------+------------+----------+
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
158 | Culture Label | Cell Count | Dilution |
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
159 +===============+============+==========+
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
160 | ECo-1 | 2523 | 1000 |
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
161 +---------------+------------+----------+
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
162 | LPn-1 | 100 | 1000000 |
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
163 +---------------+------------+----------+
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
164 | LPn-2 | 4 | 1000 |
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
165 +---------------+------------+----------+
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
166
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
167 Now if we use the expression '$1 =~ "LPn*" && $Dilution > 1000' to filter on, we would pull out the only row that satisfies both conditions:
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
168
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
169 +---------------+------------+----------+
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
170 | Culture Label | Cell Count | Dilution |
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
171 +===============+============+==========+
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
172 | LPn-1 | 100 | 1000000 |
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
173 +---------------+------------+----------+
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
174
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
175 ----
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
176
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
177 @HELP_COLUMNS@
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
178
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
179
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
180 @HELP_END_STATEMENT@
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
181
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
182
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
183 ]]></help>
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
184 <expand macro="citations" />
20e8be1464f5 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
185 </tool>