PageRenderTime 46ms CodeModel.GetById 38ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

/tools/filters/gff/gff_filter_by_attribute.xml

https://bitbucket.org/cistrome/cistrome-harvard/
XML | 53 lines | 41 code | 12 blank | 0 comment | 0 complexity | 40630aee874aa84292d12694fd011d9e MD5 | raw file
 1<tool id="gff_filter_by_attribute" name="Filter GFF data by attribute" version="0.1">
 2  <description>using simple expressions</description>
 3  <command interpreter="python">
 4    gff_filter_by_attribute.py $input $out_file1 "$cond" '${input.metadata.attribute_types}'
 5  </command>
 6  <inputs>
 7    <param format="gff" name="input" type="data" label="Filter" help="Dataset missing? See TIP below."/>
 8    <param name="cond" size="40" type="text" value="gene_id=='uc002loc.1'" label="With following condition" help="Double equal signs, ==, must be used as shown above. To filter for an arbitrary string, use the Select tool.">
 9      <validator type="empty_field" message="Enter a valid filtering condition, see syntax and examples below."/>
10    </param>
11  </inputs>
12  <outputs>
13    <data format="input" name="out_file1" metadata_source="input"/>
14  </outputs>
15  <tests>
16    <test>
17        <param name="input" value="gff_filter_attr_in1.gff"/>
18        <param name="cond" value="conf_lo>0"/>
19        <output name="out_file1" file="gff_filter_by_attribute_out1.gff"/>
20    </test>
21    <test>
22        <param name="input" value="gff_filter_attr_in1.gff"/>
23        <param name="cond" value="conf_lo==0 or conf_hi>125"/>
24        <output name="out_file1" file="gff_filter_by_attribute_out2.gff"/>
25    </test>
26  </tests>
27
28  <help>
29
30.. class:: warningmark
31
32Double equal signs, ==, must be used as *"equal to"* (e.g., **c1 == 'chr22'**)
33
34.. class:: infomark
35
36**TIP:** Attempting to apply a filtering condition may throw exceptions if the data type (e.g., string, integer) in every line of the attribute being filtered is not appropriate for the condition (e.g., attempting certain numerical calculations on strings).  If an exception is thrown when applying the condition to a line, that line is skipped as invalid for the filter condition.  The number of invalid skipped lines is documented in the resulting history item as a "Condition/data issue".
37
38.. class:: infomark
39
40**TIP:** If your data is not TAB delimited, use *Text Manipulation-&gt;Convert*
41
42-----
43
44**Syntax**
45
46The filter tool allows you to restrict the dataset using simple conditional statements.
47
48- Make sure that multi-character operators contain no white space ( e.g., **&lt;=** is valid while **&lt; =** is not valid )
49- When using 'equal-to' operator **double equal sign '==' must be used** ( e.g., **attribute_name=='chr1'** )
50- Non-numerical values must be included in single or double quotes ( e.g., **attribute_name=='XX22'** )
51
52</help>
53</tool>