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