Mercurial > repos > fubar > microsatbed
annotate microsatbed.xml @ 17:264d79548d19 draft
planemo upload for repository https://github.com/fubar2/microsatbed commit d952bc313f408735456747c3d33e09a3170c8f59-dirty
author | fubar |
---|---|
date | Wed, 17 Jul 2024 06:08:33 +0000 |
parents | ee773bbde3c3 |
children | 607620f93b4c |
rev | line source |
---|---|
16
ee773bbde3c3
planemo upload for repository https://github.com/fubar2/microsatbed commit d952bc313f408735456747c3d33e09a3170c8f59-dirty
fubar
parents:
13
diff
changeset
|
1 <tool name="STR to bed" id="microsatbed" version="1.3.0a" profile="22.05"> |
11 | 2 <description>Short Tandem Repeats to bed features from fasta</description> |
3 <requirements> | |
4 <requirement version="3.12.3" type="package">python</requirement> | |
5 <requirement version="2.1.0" type="package">pyfastx</requirement> | |
6 <requirement version="1.3.0" type="package">pytrf</requirement> | |
7 </requirements> | |
8 <required_files> | |
9 <include path="find_str.py"/> | |
10 </required_files> | |
11 <version_command><![CDATA[python -c "import pytrf; from importlib.metadata import version; print(version('pytrf'))"]]></version_command> | |
12 <command><![CDATA[ | |
13 #if $mode_cond.mode == "NATIVE": | |
14 #if $reference_genome.genome_type_select == "history": | |
17
264d79548d19
planemo upload for repository https://github.com/fubar2/microsatbed commit d952bc313f408735456747c3d33e09a3170c8f59-dirty
fubar
parents:
16
diff
changeset
|
15 pytrf findstr -f '$mode_cond.outformat' -o $bed -r $monomin $dimin $trimin $tetramin $pentamin $hexamin '${reference_genome.fasta}' |
11 | 16 #else: |
17
264d79548d19
planemo upload for repository https://github.com/fubar2/microsatbed commit d952bc313f408735456747c3d33e09a3170c8f59-dirty
fubar
parents:
16
diff
changeset
|
17 pytrf findstr -f '$mode_cond.outformat' -o $bed -r $monomin $dimin $trimin $tetramin $pentamin $hexamin '${reference_genome.fasta.fields.path}' |
11 | 18 #end if |
19 #else: | |
20 python '${__tool_directory__}/find_str.py' | |
21 #if $reference_genome.genome_type_select == "history": | |
22 --fasta '${reference_genome.fasta}' | |
23 #else: | |
24 --fasta '${reference_genome.fasta.fields.path}' | |
25 #end if | |
26 --bed '$bed' | |
27 #if $mode_cond.mode == "SPECIFIC": | |
28 --specific '$mode_cond.specific' | |
17
264d79548d19
planemo upload for repository https://github.com/fubar2/microsatbed commit d952bc313f408735456747c3d33e09a3170c8f59-dirty
fubar
parents:
16
diff
changeset
|
29 --monomin '$monomin' |
264d79548d19
planemo upload for repository https://github.com/fubar2/microsatbed commit d952bc313f408735456747c3d33e09a3170c8f59-dirty
fubar
parents:
16
diff
changeset
|
30 --dimin '$dimin' |
264d79548d19
planemo upload for repository https://github.com/fubar2/microsatbed commit d952bc313f408735456747c3d33e09a3170c8f59-dirty
fubar
parents:
16
diff
changeset
|
31 --trimin '$trimin' |
264d79548d19
planemo upload for repository https://github.com/fubar2/microsatbed commit d952bc313f408735456747c3d33e09a3170c8f59-dirty
fubar
parents:
16
diff
changeset
|
32 --tetramin '$tetramin' |
264d79548d19
planemo upload for repository https://github.com/fubar2/microsatbed commit d952bc313f408735456747c3d33e09a3170c8f59-dirty
fubar
parents:
16
diff
changeset
|
33 --pentamin '$pentamin' |
264d79548d19
planemo upload for repository https://github.com/fubar2/microsatbed commit d952bc313f408735456747c3d33e09a3170c8f59-dirty
fubar
parents:
16
diff
changeset
|
34 --hexamin '$hexamin' |
11 | 35 #else: |
36 #if "MONO" in $mode_cond.subset: | |
37 --mono | |
38 #end if | |
39 #if "DI" in $mode_cond.subset: | |
40 --di | |
41 #end if | |
42 #if "TRI" in $mode_cond.subset: | |
43 --tri | |
44 #end if | |
45 #if "TETRA" in $mode_cond.subset: | |
46 --tetra | |
47 #end if | |
48 #if "PENTA" in $mode_cond.subset: | |
49 --penta | |
50 #end if | |
51 #if "HEXA" in $mode_cond.subset: | |
52 --hexa | |
53 #end if | |
17
264d79548d19
planemo upload for repository https://github.com/fubar2/microsatbed commit d952bc313f408735456747c3d33e09a3170c8f59-dirty
fubar
parents:
16
diff
changeset
|
54 --monomin '$monomin' |
264d79548d19
planemo upload for repository https://github.com/fubar2/microsatbed commit d952bc313f408735456747c3d33e09a3170c8f59-dirty
fubar
parents:
16
diff
changeset
|
55 --dimin '$dimin' |
264d79548d19
planemo upload for repository https://github.com/fubar2/microsatbed commit d952bc313f408735456747c3d33e09a3170c8f59-dirty
fubar
parents:
16
diff
changeset
|
56 --trimin '$trimin' |
264d79548d19
planemo upload for repository https://github.com/fubar2/microsatbed commit d952bc313f408735456747c3d33e09a3170c8f59-dirty
fubar
parents:
16
diff
changeset
|
57 --tetramin '$tetramin' |
264d79548d19
planemo upload for repository https://github.com/fubar2/microsatbed commit d952bc313f408735456747c3d33e09a3170c8f59-dirty
fubar
parents:
16
diff
changeset
|
58 --pentamin '$pentamin' |
264d79548d19
planemo upload for repository https://github.com/fubar2/microsatbed commit d952bc313f408735456747c3d33e09a3170c8f59-dirty
fubar
parents:
16
diff
changeset
|
59 --hexamin '$hexamin' |
11 | 60 #end if |
61 #end if | |
62 ]]></command> | |
63 <inputs> | |
64 <conditional name="reference_genome"> | |
65 <param name="genome_type_select" type="select" label="Select a source for fasta sequences to be searched for STRs" help="Options are to choose a built-in genome, or choose any history fasta file"> | |
66 <option value="indexed">Use a Galaxy server built-in reference genome fasta</option> | |
67 <option value="history" selected="True">Use any fasta file from the current history</option> | |
68 </param> | |
69 <when value="indexed"> | |
70 <param name="fasta" type="select" multiple="false" label="Choose a built-in genome" | |
71 help="If the genome you need is not on the list, upload it and select it as a current history fasta"> | |
72 <options from_data_table="all_fasta"/> | |
73 </param> | |
74 </when> | |
75 <when value="history"> | |
76 <param name="fasta" type="data" format="fasta,fasta.gz" optional="false" multiple="false" label="Choose a fasta file from the current history"/> | |
77 </when> | |
78 </conditional> | |
79 <conditional name="mode_cond"> | |
80 <param name="mode" type="select" label="Select patterns by motif length; or provide a specific motif pattern to report?" help="Choose *By length:* or *By pattern:* to configure STR selection mode"> | |
81 <option selected="True" value="ALL">By length: Report all motifs of one or more specified lengths (1-6nt) as bed features</option> | |
82 <option value="SPECIFIC">By motif: Report one or more specific motifs (such as TCA,GC) as bed features</option> | |
83 <option value="NATIVE">All exact STR: use the pytrf findstr native command to a create csv, tsv or gtf output</option> | |
84 </param> | |
85 <when value="ALL"> | |
86 <param name="subset" type="select" multiple="true" optional="false" label="Select at least 1 specific motif length to report" | |
87 help="Bed features will be output for every motif of the selected length(s) with the minimum required repeats or more"> | |
17
264d79548d19
planemo upload for repository https://github.com/fubar2/microsatbed commit d952bc313f408735456747c3d33e09a3170c8f59-dirty
fubar
parents:
16
diff
changeset
|
88 <option value="DI" selected="true">All dimers (AC,AG,AT,...)</option> |
264d79548d19
planemo upload for repository https://github.com/fubar2/microsatbed commit d952bc313f408735456747c3d33e09a3170c8f59-dirty
fubar
parents:
16
diff
changeset
|
89 <option value="TRI">All trimers (ACG,..)</option> |
264d79548d19
planemo upload for repository https://github.com/fubar2/microsatbed commit d952bc313f408735456747c3d33e09a3170c8f59-dirty
fubar
parents:
16
diff
changeset
|
90 <option value="TETRA">All tetramers (ACGT,..)</option> |
264d79548d19
planemo upload for repository https://github.com/fubar2/microsatbed commit d952bc313f408735456747c3d33e09a3170c8f59-dirty
fubar
parents:
16
diff
changeset
|
91 <option value="PENTA">All pentamers (ACGTC,..)</option> |
264d79548d19
planemo upload for repository https://github.com/fubar2/microsatbed commit d952bc313f408735456747c3d33e09a3170c8f59-dirty
fubar
parents:
16
diff
changeset
|
92 <option value="HEXA">All hexamers (ACGTCG,..)</option> |
264d79548d19
planemo upload for repository https://github.com/fubar2/microsatbed commit d952bc313f408735456747c3d33e09a3170c8f59-dirty
fubar
parents:
16
diff
changeset
|
93 <option value="MONO">All monomers (A,C...). Warning! Can produce overwhelming numbers of bed features</option> |
11 | 94 </param> |
95 </when> | |
96 <when value="SPECIFIC"> | |
97 <param name="specific" type="text" label="Supply a specific motif pattern. Separate multiple patterns with commas such as GA,GC" | |
98 help="Make bed features only for the nominated specific motifs." optional="false"/> | |
99 </when> | |
100 <when value="NATIVE"> | |
101 <param name="outformat" type="select" optional="false" label="Select the required output format" | |
102 help="Pytrf can create GFF, CSV or TSV output files. Documentation is linked in the help section below"> | |
103 <option value="gff" >GFF</option> | |
104 <option value="csv">Comma separated values</option> | |
105 <option value="tsv" selected="true">Tab separated values</option> | |
106 </param> | |
107 </when> | |
108 </conditional> | |
17
264d79548d19
planemo upload for repository https://github.com/fubar2/microsatbed commit d952bc313f408735456747c3d33e09a3170c8f59-dirty
fubar
parents:
16
diff
changeset
|
109 <param type="integer" min="2" name="monomin" value="10"/> |
264d79548d19
planemo upload for repository https://github.com/fubar2/microsatbed commit d952bc313f408735456747c3d33e09a3170c8f59-dirty
fubar
parents:
16
diff
changeset
|
110 <param type="integer" min="1" name="dimin" value="3"/> |
264d79548d19
planemo upload for repository https://github.com/fubar2/microsatbed commit d952bc313f408735456747c3d33e09a3170c8f59-dirty
fubar
parents:
16
diff
changeset
|
111 <param type="integer" min="2" name="trimin" value="2"/> |
264d79548d19
planemo upload for repository https://github.com/fubar2/microsatbed commit d952bc313f408735456747c3d33e09a3170c8f59-dirty
fubar
parents:
16
diff
changeset
|
112 <param type="integer" min="2" name="tetramin" value="2"/> |
264d79548d19
planemo upload for repository https://github.com/fubar2/microsatbed commit d952bc313f408735456747c3d33e09a3170c8f59-dirty
fubar
parents:
16
diff
changeset
|
113 <param type="integer" min="2" name="pentamin" value="2"/> |
264d79548d19
planemo upload for repository https://github.com/fubar2/microsatbed commit d952bc313f408735456747c3d33e09a3170c8f59-dirty
fubar
parents:
16
diff
changeset
|
114 <param type="integer" min="2" name="hexamin" value="2"/> |
11 | 115 </inputs> |
116 <outputs> | |
117 <data name="bed" format="bed" label="STR from $fasta.element_identifier" hidden="false"> | |
118 <change_format> | |
119 <when input="mode_cond.outformat" value="gff" format="gff" /> | |
120 <when input="mode_cond.outformat" value="csv" format="csv" /> | |
121 <when input="mode_cond.outformat" value="tsv" format="tabular" /> | |
122 </change_format> | |
123 </data> | |
124 </outputs> | |
125 <tests> | |
126 <test expect_num_outputs="1"> | |
127 <conditional name="reference_genome"> | |
128 <param name="genome_type_select" value="history"/> | |
129 <param name="fasta" value="humsamp.fa"/> | |
130 </conditional> | |
131 <conditional name="mode_cond"> | |
132 <param name="mode" value="ALL"/> | |
133 <param name="subset" value="DI,TRI,TETRA,PENTA,HEXA"/> | |
134 </conditional> | |
17
264d79548d19
planemo upload for repository https://github.com/fubar2/microsatbed commit d952bc313f408735456747c3d33e09a3170c8f59-dirty
fubar
parents:
16
diff
changeset
|
135 <param name="monomin" value="20"/> |
264d79548d19
planemo upload for repository https://github.com/fubar2/microsatbed commit d952bc313f408735456747c3d33e09a3170c8f59-dirty
fubar
parents:
16
diff
changeset
|
136 <param name="dimin" value="2"/> |
264d79548d19
planemo upload for repository https://github.com/fubar2/microsatbed commit d952bc313f408735456747c3d33e09a3170c8f59-dirty
fubar
parents:
16
diff
changeset
|
137 <param name="trimin" value="2"/> |
264d79548d19
planemo upload for repository https://github.com/fubar2/microsatbed commit d952bc313f408735456747c3d33e09a3170c8f59-dirty
fubar
parents:
16
diff
changeset
|
138 <param name="tetramin" value="2"/> |
264d79548d19
planemo upload for repository https://github.com/fubar2/microsatbed commit d952bc313f408735456747c3d33e09a3170c8f59-dirty
fubar
parents:
16
diff
changeset
|
139 <param name="pentamin" value="2"/> |
264d79548d19
planemo upload for repository https://github.com/fubar2/microsatbed commit d952bc313f408735456747c3d33e09a3170c8f59-dirty
fubar
parents:
16
diff
changeset
|
140 <param name="hexamin" value="2"/> |
11 | 141 <output name="bed" value="bed_sample" compare="diff" lines_diff="0"/> |
142 </test> | |
143 <test expect_num_outputs="1"> | |
144 <conditional name="reference_genome"> | |
145 <param name="genome_type_select" value="history"/> | |
146 <param name="fasta" value="humsamp.fa"/> | |
147 </conditional> | |
148 <conditional name="mode_cond"> | |
149 <param name="mode" value="SPECIFIC"/> | |
150 <param name="specific" value="GC"/> | |
151 </conditional> | |
17
264d79548d19
planemo upload for repository https://github.com/fubar2/microsatbed commit d952bc313f408735456747c3d33e09a3170c8f59-dirty
fubar
parents:
16
diff
changeset
|
152 <param name="monomin" value="20"/> |
264d79548d19
planemo upload for repository https://github.com/fubar2/microsatbed commit d952bc313f408735456747c3d33e09a3170c8f59-dirty
fubar
parents:
16
diff
changeset
|
153 <param name="dimin" value="1"/> |
264d79548d19
planemo upload for repository https://github.com/fubar2/microsatbed commit d952bc313f408735456747c3d33e09a3170c8f59-dirty
fubar
parents:
16
diff
changeset
|
154 <param name="trimin" value="20"/> |
264d79548d19
planemo upload for repository https://github.com/fubar2/microsatbed commit d952bc313f408735456747c3d33e09a3170c8f59-dirty
fubar
parents:
16
diff
changeset
|
155 <param name="tetramin" value="20"/> |
264d79548d19
planemo upload for repository https://github.com/fubar2/microsatbed commit d952bc313f408735456747c3d33e09a3170c8f59-dirty
fubar
parents:
16
diff
changeset
|
156 <param name="pentamin" value="20"/> |
264d79548d19
planemo upload for repository https://github.com/fubar2/microsatbed commit d952bc313f408735456747c3d33e09a3170c8f59-dirty
fubar
parents:
16
diff
changeset
|
157 <param name="hexamin" value="20"/> |
11 | 158 <output name="bed" value="dibed_sample" compare="diff" lines_diff="0"/> |
159 </test> | |
160 <test expect_num_outputs="1"> | |
161 <conditional name="reference_genome"> | |
162 <param name="genome_type_select" value="history"/> | |
163 <param name="fasta" value="mouse.fa"/> | |
164 </conditional> | |
165 <conditional name="mode_cond"> | |
166 <param name="mode" value="NATIVE"/> | |
167 <param name="outformat" value="gff"/> | |
168 </conditional> | |
17
264d79548d19
planemo upload for repository https://github.com/fubar2/microsatbed commit d952bc313f408735456747c3d33e09a3170c8f59-dirty
fubar
parents:
16
diff
changeset
|
169 <param name="monomin" value="20"/> |
264d79548d19
planemo upload for repository https://github.com/fubar2/microsatbed commit d952bc313f408735456747c3d33e09a3170c8f59-dirty
fubar
parents:
16
diff
changeset
|
170 <param name="dimin" value="10"/> |
264d79548d19
planemo upload for repository https://github.com/fubar2/microsatbed commit d952bc313f408735456747c3d33e09a3170c8f59-dirty
fubar
parents:
16
diff
changeset
|
171 <param name="trimin" value="5"/> |
264d79548d19
planemo upload for repository https://github.com/fubar2/microsatbed commit d952bc313f408735456747c3d33e09a3170c8f59-dirty
fubar
parents:
16
diff
changeset
|
172 <param name="tetramin" value="4"/> |
264d79548d19
planemo upload for repository https://github.com/fubar2/microsatbed commit d952bc313f408735456747c3d33e09a3170c8f59-dirty
fubar
parents:
16
diff
changeset
|
173 <param name="pentamin" value="4"/> |
264d79548d19
planemo upload for repository https://github.com/fubar2/microsatbed commit d952bc313f408735456747c3d33e09a3170c8f59-dirty
fubar
parents:
16
diff
changeset
|
174 <param name="hexamin" value="2"/> |
11 | 175 <output name="bed" value="nativegff_sample" compare="diff" lines_diff="0"/> |
176 </test> | |
177 </tests> | |
178 <help><![CDATA[ | |
179 | |
180 **Convert short repetitive sequences to bed features** | |
181 | |
182 Microsatellites are usually defined as repeated short DNA patterns in an unbroken sequence. | |
183 A microsatellite pattern or *motif* can be any combination nucleotides, typically from 1 to 6nt in length. | |
184 | |
185 This tool allows microsatellite and related features to be selected from a fasta sequence input file, and output into a single bed track, suitable for viewing in a genome browser such as JBrowse2. | |
186 | |
187 All motifs of selected lengths can be reported as individual features in the output bed file, or specific motifs can be provided and all | |
188 others will be ignored. In all cases, a minimum required number of repeats can be specified. For example, requiring 2 or more repeats of the trimer *ACG* will report | |
189 every sequence of *ACGACG* or *ACGACGACG* or *ACGACGACGACG* and so on, as individual bed features. Similarly, requiring 3 repeats of any trimer will | |
190 report every distinct 3 nucleotide pattern, including *ACGACGACG* as well as every other unique 3 nucleotide pattern with 3 sequential repeats or more such, as "CTCCTCCTC*. | |
191 | |
192 For other output formats, the pytrf native command line *findstr* can be used to produce a gff, csv or tsv output containing all exact short tandem repeats, as | |
193 described at the end of https://pytrf.readthedocs.io/en/latest | |
194 | |
195 A fasta file must be supplied for processing. A built in genome can be selected, or a fasta file of any kind can be selected from the current history. Note that all | |
196 symbols are treated as valid nucleotides by pytrf, so extraneous characters such as *-* or *N* in the input fasta may appear as unexpected bed features. Lower case fasta symbols will be converted | |
197 to uppercase, to prevent them being reported as distinct motifs. | |
198 | |
199 | |
200 **Select motifs by length** | |
201 | |
202 The default tool form setting is to select all dimer motif patterns. | |
203 | |
204 Additional motif lengths from 1 to 6nt can be selected in the multiple-select drop-down list. All features will be returned in a single bed file. For each selected motif length, | |
205 the minimum number of repeats required for reporting can be adjusted. **Tandem repeats** are defined as at least 2 of any pattern. This tool allows singleton motifs to be reported, | |
206 so is not restricted to short tandem repeats (STR) | |
207 | |
208 **Select motifs by pattern** | |
209 | |
210 This option allows a motif pattern to be specified as a text string such as *CG* or *ATC*. Multiple motifs can be specified as a comma separated string such as *CG,ATC*. | |
211 All features will be returned as a single bed file. | |
212 | |
213 The minimum number of repeats for all motifs can be set to match specific requirements. | |
214 | |
215 For example, technical sequencing read bias may be influenced by the density of specific dimers, whether they are repeated or not | |
216 such as in https://github.com/arangrhie/T2T-Polish/tree/master/pattern | |
217 | |
218 **Select all perfect STR using pytrf findstr in csv, tsv or gff output format** | |
219 | |
220 This selection runs the pytrf *findstr* option to create gff/csv/tsv outputs as described at the end of https://pytrf.readthedocs.io/en/latest/. | |
221 | |
222 Quoted here: | |
223 | |
224 *A Tandem repeat (TR) in genomic sequence is a set of adjacent short DNA sequence repeated consecutively. The core sequence or repeat unit is generally called motif. | |
225 According to the motif length, tandem repeats can be classified as microsatellites and minisatellites. Microsatellites are also known as simple sequence repeats (SSRs) | |
226 or short tandem repeats (STRs) with motif length of 1-6 bp. Minisatellites are also sometimes referred to as variable number of tandem repeats (VNTRs) has longer motif length than microsatellites. | |
227 Pytrf is a lightweight Python C extension for identification of tandem repeats. The pytrf enables to fastly identify both exact or perfect SSRs. | |
228 It also can find generic tandem repeats with any size of motif, such as with maximum motif length of 100 bp. Additionally, it has capability of finding approximate or imperfect tandem repeats* | |
229 | |
230 ]]></help> | |
231 <citations> | |
232 <citation type="bibtex">@misc{pytrf, | |
233 title = {{pytrf} Short tandem repeat finder, Accessed on July 10 2024}, | |
234 howpublished = {\url{https://github.com/lmdu/pytrf}}, | |
235 note = {Accessed on July 10 2024} | |
236 }</citation> | |
237 </citations> | |
238 </tool> | |
239 |