14
|
1 <tool id="Extract genomic DNA 1" name="Extract Genomic DNA" version="3.0.2">
|
0
|
2 <description>using coordinates from assembled/unassembled genomes</description>
|
1
|
3 <requirements>
|
23
|
4 <requirement type="package" version="35x1">faToTwoBit</requirement>
|
10
|
5 <requirement type="package" version="0.7.1">bx-python</requirement>
|
23
|
6 <!-- conda dependencies -->
|
|
7 <requirement type="package" version="324">ucsc-fatotwobit</requirement>
|
1
|
8 </requirements>
|
0
|
9 <command>
|
|
10 <![CDATA[
|
1
|
11 #set genome = $input.metadata.dbkey
|
0
|
12 #set datatype = $input.datatype
|
|
13 mkdir -p output_dir &&
|
|
14 python $__tool_directory__/extract_genomic_dna.py
|
|
15 --input "$input"
|
1
|
16 --genome "$genome"
|
12
|
17 #if $input.is_of_type("gff"):
|
6
|
18 --input_format "gff"
|
|
19 --columns "1,4,5,7"
|
1
|
20 --interpret_features $interpret_features
|
0
|
21 #else:
|
6
|
22 --input_format "interval"
|
0
|
23 --columns "${input.metadata.chromCol},${input.metadata.startCol},${input.metadata.endCol},${input.metadata.strandCol},${input.metadata.nameCol}"
|
|
24 #end if
|
|
25 --reference_genome_source $reference_genome_cond.reference_genome_source
|
|
26 #if str($reference_genome_cond.reference_genome_source) == "cached"
|
|
27 --reference_genome $reference_genome_cond.reference_genome.fields.path
|
|
28 #else:
|
|
29 --reference_genome $reference_genome_cond.reference_genome
|
|
30 #end if
|
14
|
31 --output_format $output_format_cond.output_format
|
|
32 #if str($output_format_cond.output_format) == "fasta":
|
18
|
33 --fasta_header_type $output_format_cond.fasta_header_type_cond.fasta_header_type
|
|
34 #if str($output_format_cond.fasta_header_type_cond.fasta_header_type) == "char_delimited":
|
|
35 --fasta_header_delimiter $output_format_cond.fasta_header_type_cond.fasta_header_delimiter
|
|
36 #end if
|
14
|
37 #end if
|
0
|
38 --output $output
|
|
39 ]]>
|
|
40 </command>
|
|
41 <inputs>
|
10
|
42 <param name="input" type="data" format="gff,interval" label="Fetch sequences for intervals in">
|
1
|
43 <validator type="unspecified_build" />
|
|
44 </param>
|
10
|
45 <param name="interpret_features" type="select" label="Interpret features when possible" help="Applicable only when input dataset format is in the gff family">
|
1
|
46 <option value="yes">Yes</option>
|
|
47 <option value="no">No</option>
|
|
48 </param>
|
0
|
49 <conditional name="reference_genome_cond">
|
|
50 <param name="reference_genome_source" type="select" label="Choose the source for the reference genome">
|
|
51 <option value="cached">locally cached</option>
|
|
52 <option value="history">from history</option>
|
|
53 </param>
|
|
54 <when value="cached">
|
|
55 <param name="reference_genome" type="select" label="Using reference genome">
|
1
|
56 <options from_data_table="twobit">
|
|
57 <filter type="data_meta" key="dbkey" ref="input" column="0"/>
|
0
|
58 </options>
|
|
59 <validator type="no_options" message="A built-in reference genome is not available for the build associated with the selected input file"/>
|
|
60 </param>
|
|
61 </when>
|
|
62 <when value="history">
|
|
63 <param name="reference_genome" type="data" format="fasta" label="Using reference genome">
|
|
64 <options>
|
1
|
65 <filter type="data_meta" key="dbkey" ref="input"/>
|
0
|
66 </options>
|
|
67 <validator type="no_options" message="The current history does not include a fasta dataset with the build associated with the selected input file"/>
|
|
68 </param>
|
|
69 </when>
|
|
70 </conditional>
|
14
|
71 <conditional name="output_format_cond">
|
|
72 <param name="output_format" type="select" label="Select output format">
|
|
73 <option value="fasta" selected="True">fasta</option>
|
|
74 <option value="interval">interval</option>
|
|
75 </param>
|
|
76 <when value="fasta">
|
18
|
77 <conditional name="fasta_header_type_cond">
|
|
78 <param name="fasta_header_type" type="select" label="Select fasta header format">
|
|
79 <option value="bedtools_getfasta_default" selected="True">bedtools getfasta default</option>
|
|
80 <option value="char_delimited">character delimited field values</option>
|
|
81 </param>
|
|
82 <when value="bedtools_getfasta_default"/>
|
|
83 <when value="char_delimited">
|
|
84 <param name="fasta_header_delimiter" type="select" label="Select fasta header field delimiter">
|
|
85 <option value="underscore" selected="True">underscore (_)</option>
|
|
86 <option value="semicolon">semicolon (;)</option>
|
|
87 <option value="comma">comma (,)</option>
|
22
|
88 <option value="tilde">tilde (~)</option>
|
|
89 <option value="vertical_bar">vertical bar (|)</option>
|
18
|
90 </param>
|
|
91 </when>
|
|
92 </conditional>
|
14
|
93 </when>
|
|
94 <when value="interval"/>
|
|
95 </conditional>
|
0
|
96 </inputs>
|
|
97 <outputs>
|
13
|
98 <data format_source="input" name="output" metadata_source="input">
|
0
|
99 <change_format>
|
14
|
100 <when input="output_format_cond.output_format" value="fasta" format="fasta" />
|
0
|
101 </change_format>
|
|
102 </data>
|
|
103 </outputs>
|
|
104 <tests>
|
|
105 <test>
|
23
|
106 <param name="input" value="mm9_input1.gff" dbkey="mm9" ftype="gff" />
|
|
107 <param name="interpret_features" value="no"/>
|
|
108 <param name="reference_genome_source" value="history"/>
|
|
109 <param name="reference_genome" value="mm9.fasta"/>
|
22
|
110 <param name="output_format" value="fasta"/>
|
18
|
111 <param name="fasta_header_type" value="char_delimited"/>
|
23
|
112 <param name="fasta_header_delimiter" value="tilde"/>
|
|
113 <output name="output" file="extract_genomic_dna_out1.fasta" compare="contains" />
|
0
|
114 </test>
|
|
115 <test>
|
23
|
116 <param name="input" value="mm9_input1.gff" dbkey="mm9" ftype="gff" />
|
0
|
117 <param name="interpret_features" value="yes"/>
|
23
|
118 <param name="reference_genome_source" value="history"/>
|
|
119 <param name="reference_genome" value="mm9.fasta"/>
|
|
120 <param name="output_format" value="fasta"/>
|
|
121 <param name="fasta_header_type" value="bedtools_getfasta_default"/>
|
|
122 <output name="output" file="extract_genomic_dna_out2.fasta" compare="contains" />
|
0
|
123 </test>
|
|
124 <test>
|
23
|
125 <param name="input" value="mm9_input1.gff" dbkey="mm9" ftype="gff" />
|
0
|
126 <param name="interpret_features" value="no"/>
|
23
|
127 <param name="reference_genome_source" value="history"/>
|
|
128 <param name="reference_genome" value="mm9.fasta"/>
|
|
129 <param name="output_format" value="interval"/>
|
|
130 <output name="output" file="extract_genomic_dna_out3.gff" compare="contains" />
|
0
|
131 </test>
|
|
132 <test>
|
23
|
133 <param name="input" value="mm9_input1.gff" dbkey="mm9" ftype="gff" />
|
0
|
134 <param name="interpret_features" value="yes"/>
|
23
|
135 <param name="reference_genome_source" value="history"/>
|
|
136 <param name="reference_genome" value="mm9.fasta"/>
|
|
137 <param name="output_format" value="interval"/>
|
|
138 <output name="output" file="extract_genomic_dna_out4.gff" compare="contains" />
|
0
|
139 </test>
|
|
140 </tests>
|
|
141 <help>
|
|
142
|
|
143 .. class:: warningmark
|
|
144
|
7
|
145 This tool requires interval or gff (special tabular formatted data). If your data is not TAB delimited, first use *Text Manipulation->Convert*.
|
|
146
|
|
147 .. class:: warningmark
|
|
148
|
|
149 Make sure that the genome build is specified for the dataset from which you are extracting sequences (click the pencil icon in the history item if it is not specified).
|
|
150
|
|
151 .. class:: warningmark
|
0
|
152
|
7
|
153 All of the following will cause a line from the input dataset to be skipped and a warning generated. The number of warnings and skipped lines is documented in the resulting history item.
|
|
154 - Any lines that do not contain at least 3 columns, a chromosome and numerical start and end coordinates.
|
|
155 - Sequences that fall outside of the range of a line's start and end coordinates.
|
|
156 - Chromosome, start or end coordinates that are invalid for the specified build.
|
|
157 - Any lines whose data columns are not separated by a **TAB** character ( other white-space characters are invalid ).
|
|
158
|
0
|
159 -----
|
|
160
|
|
161 **What it does**
|
|
162
|
7
|
163 This tool uses coordinate, strand, and build information to fetch genomic DNAs in FASTA or interval format.
|
18
|
164
|
19
|
165 If the output format is FASTA, the header format can be specified. Selecting the **bedtools getfasta default**
|
|
166 option produces a FASTA header formatted like the default header produced the the bedtools getfasta tool, and
|
|
167 the "force strandedness" option is assumed. If the input data includes a strand column and the strand is '+'
|
|
168 or '-', it is included in the header. If the input data includes a strand column and the value is anything but
|
|
169 '+' or '-', a '.' is included in the header. If the input data does not include a strand column, a '.' is included
|
|
170 in the header.
|
14
|
171
|
18
|
172 An example FASTA header produced by selecting this option is:
|
|
173
|
|
174 >chr7:127475281-127475310(+)
|
|
175
|
|
176 Selecing the **character delimited field values** option allows selection of a character delimiter that is used
|
|
177 when generating the FASTA header with fields genome, chrom, start, end, strand (name) delimited by the
|
|
178 selected character. For example, selecting an underscore will produce a FASTA header like this:
|
|
179
|
|
180 >mm9_53_550_+ test_chromosome
|
14
|
181
|
20
|
182 while selecting a vertical bar will produce a FASTA header like this:
|
14
|
183
|
18
|
184 >mm9|53|550|+ test_chromosome
|
7
|
185
|
|
186 If strand is not defined, the default value is "+".
|
0
|
187
|
|
188 -----
|
|
189
|
|
190 **Example**
|
|
191
|
|
192 If the input dataset is::
|
|
193
|
|
194 chr7 127475281 127475310 NM_000230 0 +
|
|
195 chr7 127485994 127486166 NM_000230 0 +
|
|
196 chr7 127486011 127486166 D49487 0 +
|
|
197
|
22
|
198 Extracting sequences with **FASTA** output data type, **character delimited field values** as header format and **header field delimiter** set to the underscore character returns::
|
0
|
199
|
|
200 >hg17_chr7_127475281_127475310_+ NM_000230
|
|
201 GTAGGAATCGCAGCGCCAGCGGTTGCAAG
|
|
202 >hg17_chr7_127485994_127486166_+ NM_000230
|
|
203 GCCCAAGAAGCCCATCCTGGGAAGGAAAATGCATTGGGGAACCCTGTGCG
|
|
204 GATTCTTGTGGCTTTGGCCCTATCTTTTCTATGTCCAAGCTGTGCCCATC
|
|
205 CAAAAAGTCCAAGATGACACCAAAACCCTCATCAAGACAATTGTCACCAG
|
|
206 GATCAATGACATTTCACACACG
|
|
207 >hg17_chr7_127486011_127486166_+ D49487
|
|
208 TGGGAAGGAAAATGCATTGGGGAACCCTGTGCGGATTCTTGTGGCTTTGG
|
|
209 CCCTATCTTTTCTATGTCCAAGCTGTGCCCATCCAAAAAGTCCAAGATGA
|
|
210 CACCAAAACCCTCATCAAGACAATTGTCACCAGGATCAATGACATTTCAC
|
|
211 ACACG
|
|
212
|
7
|
213 Extracting sequences with **Interval** output data type returns::
|
|
214
|
|
215 chr7 127475281 127475310 NM_000230 0 + GTAGGAATCGCAGCGCCAGCGGTTGCAAG
|
|
216 chr7 127485994 127486166 NM_000230 0 + GCCCAAGAAGCCCATCCTGGGAAGGAAAATGCATTGGGGAACCCTGTGCGGATTCTTGTGGCTTTGGCCCTATCTTTTCTATGTCCAAGCTGTGCCCATCCAAAAAGTCCAAGATGACACCAAAACCCTCATCAAGACAATTGTCACCAGGATCAATGACATTTCACACACG
|
|
217 chr7 127486011 127486166 D49487 0 + TGGGAAGGAAAATGCATTGGGGAACCCTGTGCGGATTCTTGTGGCTTTGGCCCTATCTTTTCTATGTCCAAGCTGTGCCCATCCAAAAAGTCCAAGATGACACCAAAACCCTCATCAAGACAATTGTCACCAGGATCAATGACATTTCACACACG
|
|
218
|
0
|
219 </help>
|
|
220 <citations>
|
|
221 <citation type="bibtex">
|
|
222 @unpublished{None,
|
22
|
223 author = {Guru Ananda,Greg Von Kuster},
|
0
|
224 title = {None},
|
|
225 year = {None},
|
|
226 eprint = {None},
|
|
227 url = {http://www.bx.psu.edu/~anton/labSite/}
|
|
228 }</citation>
|
|
229 </citations>
|
|
230 </tool>
|