0
|
1 <?xml version="1.0"?>
|
|
2 <tool id="find_in_reference" name="find in reference" version="0.0.1">
|
|
3 <description>filter peptides that are present in proteins</description>
|
|
4 <command interpreter="python">find_in_reference.py --input "$input"
|
|
5 --reference "$reference"
|
|
6 #if $column.set == 'yes':
|
|
7 --input_column $column.input_column
|
|
8 --reference_column $column.reference_column
|
|
9 #end if
|
1
|
10 $case_insensitive
|
0
|
11 #if 'novel' in $outputs.__str__ or not 'found' in $outputs.__str__:
|
|
12 --output "$novel"
|
|
13 #end if
|
|
14 #if 'found' in $outputs.__str__:
|
|
15 --filtered "$found"
|
|
16 #end if
|
|
17 </command>
|
|
18 <inputs>
|
|
19 <param name="input" type="data" format="tabular" label="Input file to be filtered"
|
1
|
20 help="e.g. a peptide fasta converted to tabular"/>
|
0
|
21 <param name="reference" type="data" format="tabular" label="reference file to search"
|
1
|
22 help="e.g. a protein fasta converted to tabular"/>
|
0
|
23 <conditional name="column">
|
|
24 <param name="set" type="select" label="select columns to compare">
|
|
25 <option value="no" selected="true">Use last column of input and reference</option>
|
|
26 <option value="yes">Choose the column of input and reference to compare</option>
|
|
27 </param>
|
|
28 <when value="no"/>
|
|
29 <when value="yes">
|
|
30 <param name="input_column" type="data_column" data_ref="input" label="column in input (defaults to last column)"
|
|
31 help=""/>
|
|
32 <param name="reference_column" type="data_column" data_ref="reference" label="column in reference (defaults to last column)"
|
|
33 help=""/>
|
|
34 </when>
|
|
35 </conditional>
|
1
|
36 <param name="case_insensitive" type="boolean" truevalue="--case_insensitive" falsevalue="" checked="false" label="Ignore case when comparing"/>
|
0
|
37 <param name="outputs" type="select" multiple="true" display="checkboxes" label="Choose outputs">
|
|
38 <option value="novel" selected="true">lines with no match in reference</option>
|
|
39 <option value="found">lines with match in reference</option>
|
|
40 </param>
|
|
41 </inputs>
|
|
42 <stdio>
|
|
43 <exit_code range="1:" level="fatal" description="Error" />
|
|
44 </stdio>
|
|
45 <outputs>
|
|
46 <data name="found" metadata_source="input" format_source="input" label="${tool.name} on ${on_string}: found">
|
|
47 <filter>'found' in str(outputs)</filter>
|
|
48 </data>
|
|
49 <data name="novel" metadata_source="input" format_source="input" label="${tool.name} on ${on_string}: novel">
|
|
50 <filter>'novel' in str(outputs) or not 'found' in str(outputs)</filter>
|
|
51 </data>
|
|
52 </outputs>
|
|
53 <tests>
|
|
54 <test>
|
|
55 <param name="input" value="human_peptides.tabular" ftype="tabular" dbkey="hg19"/>
|
|
56 <param name="reference" value="human_proteins.tabular" ftype="tabular" dbkey="hg19"/>
|
|
57 <output name="novel" file="novel_peptides.tabular"/>
|
|
58 </test>
|
|
59 </tests>
|
|
60 <help>
|
|
61 **Find in Reference**
|
|
62
|
1
|
63 Filters lines of a tabular input file by checking if the selected input column value
|
0
|
64 is a substring of the selected column of any line in the reference file.
|
|
65
|
|
66 This can be used to check if peptides sequences are present in a set of reference proteins,
|
|
67 as a means of filtering out uninteresting peptide sequences.
|
|
68
|
1
|
69 For Example with::
|
|
70
|
|
71 Input
|
|
72 >pep1 LIL
|
|
73 >pep2 WTF
|
|
74 >pep3 ISK
|
|
75
|
|
76 Reference
|
|
77 >prot1 RLET
|
|
78 >prot2 LLIL
|
|
79 >prot3 LAPSE
|
|
80 >prot3 RISKY
|
|
81
|
|
82 The outputs
|
|
83
|
|
84 Not found in reference
|
|
85 >pep2 WTF
|
|
86
|
|
87 Found in reference
|
|
88 >pep1 LIL
|
|
89 >pep3 ISK
|
|
90
|
|
91
|
0
|
92 </help>
|
|
93 </tool>
|