annotate find_in_reference.xml @ 3:2429b413d90a draft default tip

"planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/find_in_reference commit 074e95e1b598ec41f0e18a2798b00cf65e9b399e-dirty"
author jjohnson
date Thu, 12 May 2022 19:30:54 +0000
parents c4fd2ea4f988
children
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"?>
3
2429b413d90a "planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/find_in_reference commit 074e95e1b598ec41f0e18a2798b00cf65e9b399e-dirty"
jjohnson
parents: 2
diff changeset
2 <tool id="find_in_reference" name="find in reference" version="0.1.0">
0
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
2
c4fd2ea4f988 Add the option to test the reversed sequence and the DNA reverse complement of the sequence (ignored if the sequence cannot be interpreted as DNA)
Jim Johnson <jj@umn.edu>
parents: 1
diff changeset
10 $case_insensitive $reverse_find $test_reverse $test_dna_reverse_complement
0
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"/>
1
e83e0ce8fb68 Add option to reverse the search, find reference field in input field
Jim Johnson <jj@umn.edu>
parents: 0
diff changeset
46 <param name="reverse_find" type="boolean" truevalue="--reverse_find" falsevalue="" checked="false" label="reverse search: find the reference in the input" />
2
c4fd2ea4f988 Add the option to test the reversed sequence and the DNA reverse complement of the sequence (ignored if the sequence cannot be interpreted as DNA)
Jim Johnson <jj@umn.edu>
parents: 1
diff changeset
47 <param name="test_reverse" type="boolean" truevalue="--test_reverse" falsevalue="" checked="false" label="Also search for reversed input string in the reference" />
c4fd2ea4f988 Add the option to test the reversed sequence and the DNA reverse complement of the sequence (ignored if the sequence cannot be interpreted as DNA)
Jim Johnson <jj@umn.edu>
parents: 1
diff changeset
48 <param name="test_dna_reverse_complement" type="boolean" truevalue="--test_dna_reverse_complement" falsevalue="" checked="false" label="Also search for the DNA reverse complementof of the input in the reference" />
0
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
49 <param name="outputs" type="select" multiple="true" display="checkboxes" label="Choose outputs">
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
50 <option value="novel" selected="true">lines with no match in reference</option>
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
51 <option value="found">lines with match in reference</option>
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
52 </param>
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
53 <conditional name="annotate">
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
54 <param name="from_ref" type="select" label="Annotate found input entries with columns from reference">
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
55 <option value="no" selected="true">No</option>
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
56 <option value="yes">Yes</option>
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
57 </param>
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
58 <when value="no"/>
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
59 <when value="yes">
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
60 <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
61 help=""/>
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
62 <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
63 help="defaults to ;">
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
64 <validator type="regex" message="Single quote character is not allowed">^[^']*$</validator>
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
65 <sanitizer>
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
66 <valid initial="string.printable">
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
67 <remove value="&apos;"/>
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
68 </valid>
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
69 <mapping initial="none">
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
70 <add source="&apos;" target=""/>
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
71 </mapping>
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
72 </sanitizer>
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
73 </param>
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
74 <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
75 help="defaults to ,">
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
76 <validator type="regex" message="Single quote character is not allowed">^[^']*$</validator>
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
77 <sanitizer>
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
78 <valid initial="string.printable">
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
79 <remove value="&apos;"/>
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
80 </valid>
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
81 <mapping initial="none">
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
82 <add source="&apos;" target=""/>
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
83 </mapping>
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
84 </sanitizer>
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
85 </param>
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
86 </when>
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
87 </conditional>
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
88 </inputs>
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
89 <stdio>
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
90 <exit_code range="1:" level="fatal" description="Error" />
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
91 </stdio>
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
92 <outputs>
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
93 <data name="found" metadata_source="input" format_source="input" label="${tool.name} on ${on_string}: found">
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
94 <filter>'found' in str(outputs)</filter>
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
95 </data>
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
96 <data name="novel" metadata_source="input" format_source="input" label="${tool.name} on ${on_string}: novel">
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
97 <filter>'novel' in str(outputs) or not 'found' in str(outputs)</filter>
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
98 </data>
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
99 </outputs>
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
100 <tests>
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
101 <test>
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
102 <param name="input" value="human_peptides.tabular" ftype="tabular" dbkey="hg19"/>
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
103 <param name="reference" value="human_proteins.tabular" ftype="tabular" dbkey="hg19"/>
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
104 <output name="novel" file="novel_peptides.tabular"/>
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
105 </test>
1
e83e0ce8fb68 Add option to reverse the search, find reference field in input field
Jim Johnson <jj@umn.edu>
parents: 0
diff changeset
106 <test>
e83e0ce8fb68 Add option to reverse the search, find reference field in input field
Jim Johnson <jj@umn.edu>
parents: 0
diff changeset
107 <param name="input" value="human_proteins.tabular" ftype="tabular" dbkey="hg19"/>
e83e0ce8fb68 Add option to reverse the search, find reference field in input field
Jim Johnson <jj@umn.edu>
parents: 0
diff changeset
108 <param name="reference" value="human_peptides.tabular" ftype="tabular" dbkey="hg19"/>
3
2429b413d90a "planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/find_in_reference commit 074e95e1b598ec41f0e18a2798b00cf65e9b399e-dirty"
jjohnson
parents: 2
diff changeset
109 <conditional name="column">
2429b413d90a "planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/find_in_reference commit 074e95e1b598ec41f0e18a2798b00cf65e9b399e-dirty"
jjohnson
parents: 2
diff changeset
110 <param name="set" value="yes"/>
2429b413d90a "planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/find_in_reference commit 074e95e1b598ec41f0e18a2798b00cf65e9b399e-dirty"
jjohnson
parents: 2
diff changeset
111 <param name="input_column" value="2"/>
2429b413d90a "planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/find_in_reference commit 074e95e1b598ec41f0e18a2798b00cf65e9b399e-dirty"
jjohnson
parents: 2
diff changeset
112 <param name="reference_column" value="2"/>
2429b413d90a "planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/find_in_reference commit 074e95e1b598ec41f0e18a2798b00cf65e9b399e-dirty"
jjohnson
parents: 2
diff changeset
113 </conditional>
1
e83e0ce8fb68 Add option to reverse the search, find reference field in input field
Jim Johnson <jj@umn.edu>
parents: 0
diff changeset
114 <param name="reverse_find" value="True"/>
e83e0ce8fb68 Add option to reverse the search, find reference field in input field
Jim Johnson <jj@umn.edu>
parents: 0
diff changeset
115 <param name="outputs" value="found"/>
e83e0ce8fb68 Add option to reverse the search, find reference field in input field
Jim Johnson <jj@umn.edu>
parents: 0
diff changeset
116 <output name="found" file="found_proteins.tabular"/>
e83e0ce8fb68 Add option to reverse the search, find reference field in input field
Jim Johnson <jj@umn.edu>
parents: 0
diff changeset
117 </test>
0
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
118 </tests>
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
119 <help>
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
120 **Find in Reference**
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
121
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
122 Filters lines of a tabular input file by checking if the selected input column value
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
123 is a substring of the selected column of any line in the reference file.
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
124
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
125 This can be used to check if peptides sequences are present in a set of reference proteins,
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
126 as a means of filtering out uninteresting peptide sequences.
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
127
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
128 For Example with::
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
129
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
130 Input
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
131 >pep1 LIL
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
132 >pep2 WTF
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
133 >pep3 ISK
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
134
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
135 Reference
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
136 >prot1 RLET
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
137 >prot2 LLIL
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
138 >prot3 LAPSE
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
139 >prot3 RISKY
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
140
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
141 The outputs
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
142
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
143 Not found in reference
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
144 >pep2 WTF
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
145
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
146 Found in reference
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
147 >pep1 LIL
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
148 >pep3 ISK
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
149
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
150
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
151 </help>
e7e56b51d156 Uploaded
jjohnson
parents:
diff changeset
152 </tool>