Mercurial > repos > jjohnson > find_in_reference
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 |
| rev | line source |
|---|---|
| 0 | 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 | 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 | |
|
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 | 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 #if $annotate.from_ref == 'yes' and str($annotate.annotation_columns) != 'None': | |
| 17 --annotation_columns $annotate.annotation_columns | |
| 18 #if $annotate.annotation_separator != '': | |
| 19 --annotation_separator '$annotate.annotation_separator' | |
| 20 #end if | |
| 21 #if $annotate.annotation_col_sep != '': | |
| 22 --annotation_col_sep '$annotate.annotation_col_sep' | |
| 23 #end if | |
| 24 #end if | |
| 25 #end if | |
| 26 </command> | |
| 27 <inputs> | |
| 28 <param name="input" type="data" format="tabular" label="Input file to be filtered" | |
| 29 help="e.g. a peptide fasta converted to tabular"/> | |
| 30 <param name="reference" type="data" format="tabular" label="reference file to search" | |
| 31 help="e.g. a protein fasta converted to tabular"/> | |
| 32 <conditional name="column"> | |
| 33 <param name="set" type="select" label="select columns to compare"> | |
| 34 <option value="no" selected="true">Use last column of input and reference</option> | |
| 35 <option value="yes">Choose the column of input and reference to compare</option> | |
| 36 </param> | |
| 37 <when value="no"/> | |
| 38 <when value="yes"> | |
| 39 <param name="input_column" type="data_column" data_ref="input" label="column in input (defaults to last column)" | |
| 40 help=""/> | |
| 41 <param name="reference_column" type="data_column" data_ref="reference" label="column in reference (defaults to last column)" | |
| 42 help=""/> | |
| 43 </when> | |
| 44 </conditional> | |
| 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 | 49 <param name="outputs" type="select" multiple="true" display="checkboxes" label="Choose outputs"> |
| 50 <option value="novel" selected="true">lines with no match in reference</option> | |
| 51 <option value="found">lines with match in reference</option> | |
| 52 </param> | |
| 53 <conditional name="annotate"> | |
| 54 <param name="from_ref" type="select" label="Annotate found input entries with columns from reference"> | |
| 55 <option value="no" selected="true">No</option> | |
| 56 <option value="yes">Yes</option> | |
| 57 </param> | |
| 58 <when value="no"/> | |
| 59 <when value="yes"> | |
| 60 <param name="annotation_columns" type="data_column" data_ref="reference" multiple="true" label="columns from reference to append to found input lines" | |
| 61 help=""/> | |
| 62 <param name="annotation_separator" type="text" value=";" optional="true" label="separator to place between annotations from different reference lines" | |
| 63 help="defaults to ;"> | |
| 64 <validator type="regex" message="Single quote character is not allowed">^[^']*$</validator> | |
| 65 <sanitizer> | |
| 66 <valid initial="string.printable"> | |
| 67 <remove value="'"/> | |
| 68 </valid> | |
| 69 <mapping initial="none"> | |
| 70 <add source="'" target=""/> | |
| 71 </mapping> | |
| 72 </sanitizer> | |
| 73 </param> | |
| 74 <param name="annotation_col_sep" type="text" value="," optional="true" label="separator to place between annotation columns from the same reference line" | |
| 75 help="defaults to ,"> | |
| 76 <validator type="regex" message="Single quote character is not allowed">^[^']*$</validator> | |
| 77 <sanitizer> | |
| 78 <valid initial="string.printable"> | |
| 79 <remove value="'"/> | |
| 80 </valid> | |
| 81 <mapping initial="none"> | |
| 82 <add source="'" target=""/> | |
| 83 </mapping> | |
| 84 </sanitizer> | |
| 85 </param> | |
| 86 </when> | |
| 87 </conditional> | |
| 88 </inputs> | |
| 89 <stdio> | |
| 90 <exit_code range="1:" level="fatal" description="Error" /> | |
| 91 </stdio> | |
| 92 <outputs> | |
| 93 <data name="found" metadata_source="input" format_source="input" label="${tool.name} on ${on_string}: found"> | |
| 94 <filter>'found' in str(outputs)</filter> | |
| 95 </data> | |
| 96 <data name="novel" metadata_source="input" format_source="input" label="${tool.name} on ${on_string}: novel"> | |
| 97 <filter>'novel' in str(outputs) or not 'found' in str(outputs)</filter> | |
| 98 </data> | |
| 99 </outputs> | |
| 100 <tests> | |
| 101 <test> | |
| 102 <param name="input" value="human_peptides.tabular" ftype="tabular" dbkey="hg19"/> | |
| 103 <param name="reference" value="human_proteins.tabular" ftype="tabular" dbkey="hg19"/> | |
| 104 <output name="novel" file="novel_peptides.tabular"/> | |
| 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 | 118 </tests> |
| 119 <help> | |
| 120 **Find in Reference** | |
| 121 | |
| 122 Filters lines of a tabular input file by checking if the selected input column value | |
| 123 is a substring of the selected column of any line in the reference file. | |
| 124 | |
| 125 This can be used to check if peptides sequences are present in a set of reference proteins, | |
| 126 as a means of filtering out uninteresting peptide sequences. | |
| 127 | |
| 128 For Example with:: | |
| 129 | |
| 130 Input | |
| 131 >pep1 LIL | |
| 132 >pep2 WTF | |
| 133 >pep3 ISK | |
| 134 | |
| 135 Reference | |
| 136 >prot1 RLET | |
| 137 >prot2 LLIL | |
| 138 >prot3 LAPSE | |
| 139 >prot3 RISKY | |
| 140 | |
| 141 The outputs | |
| 142 | |
| 143 Not found in reference | |
| 144 >pep2 WTF | |
| 145 | |
| 146 Found in reference | |
| 147 >pep1 LIL | |
| 148 >pep3 ISK | |
| 149 | |
| 150 | |
| 151 </help> | |
| 152 </tool> |
