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