annotate find_in_reference.xml @ 0:e7e56b51d156

Uploaded
author jjohnson
date Wed, 05 Feb 2014 08:12:47 -0500
parents
children e83e0ce8fb68
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
1 <?xml version="1.0"?>
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
2 <tool id="find_in_reference" name="find in reference" version="0.0.1">
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
3 <description>filter peptides that are present in proteins</description>
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
4 <command interpreter="python">find_in_reference.py --input "$input"
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
5 --reference "$reference"
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
6 #if $column.set == 'yes':
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
7 --input_column $column.input_column
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
8 --reference_column $column.reference_column
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
9 #end if
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
10 $case_insensitive
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
11 #if 'novel' in $outputs.__str__ or not 'found' in $outputs.__str__:
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
12 --output "$novel"
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
13 #end if
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
14 #if 'found' in $outputs.__str__:
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
15 --filtered "$found"
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
16 #if $annotate.from_ref == 'yes' and str($annotate.annotation_columns) != 'None':
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
17 --annotation_columns $annotate.annotation_columns
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
18 #if $annotate.annotation_separator != '':
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
19 --annotation_separator '$annotate.annotation_separator'
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
20 #end if
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
21 #if $annotate.annotation_col_sep != '':
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
22 --annotation_col_sep '$annotate.annotation_col_sep'
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
23 #end if
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
24 #end if
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
25 #end if
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
26 </command>
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
27 <inputs>
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
28 <param name="input" type="data" format="tabular" label="Input file to be filtered"
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
29 help="e.g. a peptide fasta converted to tabular"/>
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
30 <param name="reference" type="data" format="tabular" label="reference file to search"
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
31 help="e.g. a protein fasta converted to tabular"/>
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
32 <conditional name="column">
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
33 <param name="set" type="select" label="select columns to compare">
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
34 <option value="no" selected="true">Use last column of input and reference</option>
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
35 <option value="yes">Choose the column of input and reference to compare</option>
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
36 </param>
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
37 <when value="no"/>
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
38 <when value="yes">
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
39 <param name="input_column" type="data_column" data_ref="input" label="column in input (defaults to last column)"
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
40 help=""/>
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
41 <param name="reference_column" type="data_column" data_ref="reference" label="column in reference (defaults to last column)"
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
42 help=""/>
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
43 </when>
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
44 </conditional>
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
45 <param name="case_insensitive" type="boolean" truevalue="--case_insensitive" falsevalue="" checked="false" label="Ignore case when comparing"/>
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
46 <param name="outputs" type="select" multiple="true" display="checkboxes" label="Choose outputs">
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
47 <option value="novel" selected="true">lines with no match in reference</option>
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
48 <option value="found">lines with match in reference</option>
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
49 </param>
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
50 <conditional name="annotate">
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
51 <param name="from_ref" type="select" label="Annotate found input entries with columns from reference">
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
52 <option value="no" selected="true">No</option>
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
53 <option value="yes">Yes</option>
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
54 </param>
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
55 <when value="no"/>
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
56 <when value="yes">
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
57 <param name="annotation_columns" type="data_column" data_ref="reference" multiple="true" label="columns from reference to append to found input lines"
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
58 help=""/>
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
59 <param name="annotation_separator" type="text" value=";" optional="true" label="separator to place between annotations from different reference lines"
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
60 help="defaults to ;">
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
61 <validator type="regex" message="Single quote character is not allowed">^[^']*$</validator>
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
62 <sanitizer>
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
63 <valid initial="string.printable">
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
64 <remove value="&apos;"/>
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
65 </valid>
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
66 <mapping initial="none">
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
67 <add source="&apos;" target=""/>
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
68 </mapping>
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
69 </sanitizer>
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
70 </param>
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
71 <param name="annotation_col_sep" type="text" value="," optional="true" label="separator to place between annotation columns from the same reference line"
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
72 help="defaults to ,">
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
73 <validator type="regex" message="Single quote character is not allowed">^[^']*$</validator>
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
74 <sanitizer>
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
75 <valid initial="string.printable">
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
76 <remove value="&apos;"/>
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
77 </valid>
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
78 <mapping initial="none">
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
79 <add source="&apos;" target=""/>
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
80 </mapping>
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
81 </sanitizer>
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
82 </param>
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
83 </when>
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
84 </conditional>
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
85 </inputs>
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
86 <stdio>
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
87 <exit_code range="1:" level="fatal" description="Error" />
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
88 </stdio>
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
89 <outputs>
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
90 <data name="found" metadata_source="input" format_source="input" label="${tool.name} on ${on_string}: found">
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
91 <filter>'found' in str(outputs)</filter>
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
92 </data>
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
93 <data name="novel" metadata_source="input" format_source="input" label="${tool.name} on ${on_string}: novel">
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
94 <filter>'novel' in str(outputs) or not 'found' in str(outputs)</filter>
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
95 </data>
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
96 </outputs>
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
97 <tests>
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
98 <test>
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
99 <param name="input" value="human_peptides.tabular" ftype="tabular" dbkey="hg19"/>
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
100 <param name="reference" value="human_proteins.tabular" ftype="tabular" dbkey="hg19"/>
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
101 <output name="novel" file="novel_peptides.tabular"/>
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
102 </test>
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
103 </tests>
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
104 <help>
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
105 **Find in Reference**
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
106
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
107 Filters lines of a tabular input file by checking if the selected input column value
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
108 is a substring of the selected column of any line in the reference file.
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
109
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
110 This can be used to check if peptides sequences are present in a set of reference proteins,
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
111 as a means of filtering out uninteresting peptide sequences.
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
112
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
113 For Example with::
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
114
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
115 Input
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
116 >pep1 LIL
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
117 >pep2 WTF
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
118 >pep3 ISK
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
119
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
120 Reference
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
121 >prot1 RLET
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
122 >prot2 LLIL
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
123 >prot3 LAPSE
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
124 >prot3 RISKY
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
125
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
126 The outputs
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
127
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
128 Not found in reference
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
129 >pep2 WTF
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
130
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
131 Found in reference
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
132 >pep1 LIL
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
133 >pep3 ISK
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
134
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
135
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
136 </help>
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
137 </tool>