15
|
1 <tool id="rna_star" name="RNA-STAR" version="0.23">
|
|
2 <description>Gapped-read mapper for RNA-seq data</description>
|
|
3 <requirements>
|
19
|
4 <requirement type="package" version="2.3.0e">rnastar</requirement>
|
|
5 <requirement type="package" version="0.1.19">samtools</requirement>
|
21
|
6 <requirement type="package" version="2.3.0e">starwrapper</requirement>
|
15
|
7 </requirements>
|
|
8 <command>
|
|
9 ##
|
|
10 ## Run STAR.
|
|
11 ##
|
|
12
|
|
13 STAR
|
|
14 ## Can adjust this as appropriate for the system.
|
|
15 --genomeLoad NoSharedMemory
|
|
16
|
|
17 --genomeDir ${refGenomeSource.index.fields.path}
|
|
18 --readFilesIn $input1
|
|
19 #if $singlePaired.sPaired == "paired"
|
|
20 $singlePaired.input2
|
|
21 #end if
|
|
22 --runThreadN 4
|
|
23 #if $params.settingsType == "full":
|
|
24 --chimSegmentMin $params.chim_segment_min
|
|
25 --chimScoreMin $params.chim_score_min
|
|
26 #end if
|
|
27
|
|
28 ## may or may not need to generate SAM tags and handle non-canonicals for Cufflinks tools.
|
|
29 ${outSAMstrandField} ${outFilterIntronMotifs} ${outSAMattributes}
|
|
30
|
|
31 ;
|
|
32
|
|
33 ##
|
|
34 ## BAM conversion.
|
|
35 ##
|
|
36
|
|
37 ## Convert aligned reads.
|
|
38 samtools view -Shb Aligned.out.sam | samtools sort - Aligned.out
|
|
39
|
|
40 ## Convert chimeric reads.
|
|
41 #if $params.settingsType == "full" and $params.chim_segment_min > 0:
|
|
42 ; samtools view -Shb Chimeric.out.sam | samtools sort - Chimeric.out
|
|
43 #end if
|
|
44 </command>
|
|
45
|
|
46 <stdio>
|
|
47 <regex match=".*" source="both" level="warning" description="generic stdout/err chatter"/>
|
|
48 </stdio>
|
|
49
|
|
50 <inputs>
|
|
51 <param name="jobName" type="text" size="120" value="rna-star run" label="Job narrative (added to output names)"
|
|
52 help="Only letters, numbers and underscores (_) will be retained in this field">
|
|
53 <sanitizer invalid_char="">
|
|
54 <valid initial="string.letters,string.digits"><add value="_" /> </valid>
|
|
55 </sanitizer>
|
|
56 </param>
|
|
57 <!-- FASTQ input(s) and options specifically for paired-end data. -->
|
|
58 <conditional name="singlePaired">
|
|
59 <param name="sPaired" type="select" label="Single ended or mate-pair ended reads in this library?">
|
|
60 <option value="single" selected="true">Single-end</option>
|
|
61 <option value="paired">Paired-end</option>
|
|
62 </param>
|
|
63 <when value="single">
|
|
64 <param format="fastqsanger,fastq,fasta" name="input1" type="data" label="RNA-Seq FASTQ file" help="Nucleotide-space: Must have Sanger-scaled quality values with ASCII offset 33"/>
|
|
65 </when>
|
|
66 <when value="paired">
|
|
67 <param format="fastqsanger,fastq,fasta" name="input1" type="data" label="RNA-Seq FASTQ file, forward reads" help="Nucleotide-space: Must have Sanger-scaled quality values with ASCII offset 33" />
|
|
68 <param format="fastqsanger,fastq,fasta" name="input2" type="data" label="RNA-Seq FASTQ file, reverse reads" help="Nucleotide-space: Must have Sanger-scaled quality values with ASCII offset 33" />
|
|
69 </when>
|
|
70 </conditional>
|
|
71
|
|
72 <!-- Genome source. -->
|
|
73 <conditional name="refGenomeSource">
|
|
74 <param name="genomeSource" type="select" label="Will you select a reference genome from your history or use a built-in index?" help="Built-ins were indexed using default options">
|
|
75 <option value="indexed">Use a built-in index</option>
|
|
76 <option value="history">Use one from the history</option>
|
|
77 </param>
|
|
78 <when value="indexed">
|
|
79 <param name="index" type="select" label="Select a reference genome">
|
|
80 <options from_data_table="rnastar_indexes">
|
|
81 <filter type="sort_by" column="2"/>
|
|
82 <validator type="no_options" message="No indexes are available for the selected input dataset"/>
|
|
83 </options>
|
|
84 </param>
|
|
85 </when>
|
|
86 <when value="history">
|
|
87 <param name="ownFile" type="data" format="fasta" metadata_name="dbkey" label="Select the reference genome" />
|
|
88 </when>
|
|
89 </conditional>
|
|
90 <param name="outSAMattributes" type="select" label="Include extra sam attributes for downstream processing">
|
|
91 <option value="--outSAMattributes Standard">Standard - eg for old Samtools downstream</option>
|
|
92 <option value="--outSAMattributes All" selected="true">All modern Samtools attributes - see below</option>
|
|
93 </param>
|
|
94 <param name="outSAMstrandField" type="select" label="Include extra sam attributes for downstream processing">
|
|
95 <option value="--outSAMstrandField intronMotif" selected="true">Add XS for cufflinks</option>
|
|
96 <option value="">No XS added to sam output</option>
|
|
97 </param>
|
|
98 <param name="outFilterIntronMotifs" type="select" label="Canonical junction preparation for unstranded data">
|
|
99 <option value="">No special handling - all non-canonical junctions passed through</option>
|
|
100 <option value="--outFilterIntronMotifs RemoveNoncanonical" selected="true">Remove all non-canonical junctions for eg cufflinks</option>
|
|
101 <option value="--outFilterIntronMotifs RemoveNoncanonicalUnannotated">Remove only unannotated non-canonical junctions for eg cufflinks</option>
|
|
102 </param>
|
|
103 <!-- Parameter settings. -->
|
|
104 <conditional name="params">
|
|
105 <param name="settingsType" type="select" label="Settings to use" help="You can use the default settings or set custom values for any STAR parameter.">
|
|
106 <option value="preSet" selected="true">Use Defaults</option>
|
|
107 <option value="full">Full parameter list</option>
|
|
108 </param>
|
|
109 <when value="preSet" />
|
|
110 <!-- Full/advanced params. -->
|
|
111 <when value="full">
|
|
112 <param name="chim_segment_min" type="integer" min="0" value="0" label="Minimum chimeric segment length" />
|
|
113 <param name="chim_score_min" type="integer" min="0" value="0" label="Minimum total (summed) score of the chimeric segments" />
|
|
114
|
|
115 </when>
|
|
116 </conditional>
|
|
117 </inputs>
|
|
118
|
|
119 <outputs>
|
|
120 <data format="txt" name="output_log" label="${on_string}_{jobName}.log" from_work_dir="Log.final.out"/>
|
|
121 <data format="interval" name="chimeric_junctions" label="${on_string}_{jobName}_starchimjunc.bed" from_work_dir="Chimeric.out.junction">
|
|
122 <filter>(params['settingsType'] == 'full' and params['chim_segment_min'] > 0)</filter>
|
|
123 <actions>
|
|
124 <conditional name="refGenomeSource.genomeSource">
|
|
125 <when value="indexed">
|
|
126 <action type="metadata" name="dbkey">
|
|
127 <option type="from_data_table" name="star_indexes" column="1" offset="0">
|
|
128 <filter type="param_value" column="0" value="#" compare="startswith" keep="False"/>
|
|
129 <filter type="param_value" ref="refGenomeSource.index" column="0"/>
|
|
130 </option>
|
|
131 </action>
|
|
132 </when>
|
|
133 <when value="history">
|
|
134 <action type="metadata" name="dbkey">
|
|
135 <option type="from_param" name="refGenomeSource.ownFile" param_attribute="dbkey" />
|
|
136 </action>
|
|
137 </when>
|
|
138 </conditional>
|
|
139 </actions>
|
|
140 </data>
|
|
141 <data format="bam" name="chimeric_reads" label="${on_string}_${jobName}_starmappedchim.bam"
|
|
142 from_work_dir="Chimeric.out.bam">
|
|
143 <filter>(params['settingsType'] == 'full' and params['chim_segment_min'] > 0)</filter>
|
|
144 <actions>
|
|
145 <conditional name="refGenomeSource.genomeSource">
|
|
146 <when value="indexed">
|
|
147 <action type="metadata" name="dbkey">
|
|
148 <option type="from_data_table" name="star_indexes" column="1" offset="0">
|
|
149 <filter type="param_value" column="0" value="#" compare="startswith" keep="False"/>
|
|
150 <filter type="param_value" ref="refGenomeSource.index" column="0"/>
|
|
151 </option>
|
|
152 </action>
|
|
153 </when>
|
|
154 <when value="history">
|
|
155 <action type="metadata" name="dbkey">
|
|
156 <option type="from_param" name="refGenomeSource.ownFile" param_attribute="dbkey" />
|
|
157 </action>
|
|
158 </when>
|
|
159 </conditional>
|
|
160 </actions>
|
|
161 </data>
|
|
162 <data format="interval" name="splice_junctions" label="${on_string}_${jobName}_starsplicejunct.bed"
|
|
163 from_work_dir="SJ.out.tab">
|
|
164 <actions>
|
|
165 <conditional name="refGenomeSource.genomeSource">
|
|
166 <when value="indexed">
|
|
167 <action type="metadata" name="dbkey">
|
|
168 <option type="from_data_table" name="star_indexes" column="1" offset="0">
|
|
169 <filter type="param_value" column="0" value="#" compare="startswith" keep="False"/>
|
|
170 <filter type="param_value" ref="refGenomeSource.index" column="0"/>
|
|
171 </option>
|
|
172 </action>
|
|
173 </when>
|
|
174 <when value="history">
|
|
175 <action type="metadata" name="dbkey">
|
|
176 <option type="from_param" name="refGenomeSource.ownFile" param_attribute="dbkey" />
|
|
177 </action>
|
|
178 </when>
|
|
179 </conditional>
|
|
180 </actions>
|
|
181 </data>
|
|
182 <data format="bam" name="mapped_reads" label="${on_string}_${jobName}_starmapped.bam"
|
|
183 from_work_dir="Aligned.out.bam">
|
|
184 <actions>
|
|
185 <conditional name="refGenomeSource.genomeSource">
|
|
186 <when value="indexed">
|
|
187 <action type="metadata" name="dbkey">
|
|
188 <option type="from_data_table" name="star_indexes" column="1" offset="0">
|
|
189 <filter type="param_value" column="0" value="#" compare="startswith" keep="False"/>
|
|
190 <filter type="param_value" ref="refGenomeSource.index" column="0"/>
|
|
191 </option>
|
|
192 </action>
|
|
193 </when>
|
|
194 <when value="history">
|
|
195 <action type="metadata" name="dbkey">
|
|
196 <option type="from_param" name="refGenomeSource.ownFile" param_attribute="dbkey" />
|
|
197 </action>
|
|
198 </when>
|
|
199 </conditional>
|
|
200 </actions>
|
|
201 </data>
|
|
202 </outputs>
|
|
203 <help>
|
|
204
|
|
205 **What it does**
|
|
206 Runs the rna star gapped aligner. Suited to paired or single end rna-seq.
|
|
207
|
|
208 8.2: SAM alignments
|
|
209
|
|
210 The number of loci Nmap a read maps to (multi-mapping) is given by NH:i: field.
|
|
211 The mapping quality MAPQ (column 5) is 255 for uniquely mapping reads, and int(-10*log10(1-1/Nmap)) for
|
|
212 multi-mapping reads. This scheme is same as the one used by Tophat and is compatible with Cufflinks.
|
|
213
|
|
214 For multi-mappers, all alignments except one are marked with 0x100 (secondary alignment) in the FLAG
|
|
215 column 2. The un-marked alignment is either the best one (i.e. highest scoring), or is randomly selected from
|
|
216 the alignments of equal quality.
|
|
217
|
|
218 8.2.1: Standard SAM attributes
|
|
219 With default --outSAMattributes Standard option the following SAM attributes will be generated:
|
|
220
|
|
221 Column 12: NH: number of loci a read (pair) maps to
|
|
222 Column 13: IH: alignment index for all alignments of a read
|
|
223 Column 14: aS: alignment score
|
|
224 Column 15: nM: number of mismatches (does not include indels)
|
|
225
|
|
226 8.2.2: Extra SAM attrbiutes
|
|
227 If --outSAMattributes All option is used, the following additional attributes will be output:
|
|
228
|
|
229 Column 16: jM:B:c,M1,M2,... Intron motifs for all junctions (i.e. N in CIGAR):
|
|
230 0: non-canonical; 1:GT/AG, 2: CT/AC, 3: GC/AG, 4: CT/GC, 5: AT/AC, 6: GT/AT.
|
|
231
|
|
232 If splice junctions database is used, and a junction is annotated, 20 is added to its motif value.
|
|
233 Column 17: jI:B:I,Start1,End1,Start2,End2,... Start and End of introns for all junctions (1-based)
|
|
234
|
|
235 Note, that samtools 0.1.18 or later have to be used with these extra attributes.
|
|
236
|
|
237
|
|
238 8.2.3: XS SAM strand attribute for Cufflinks/Cuffdiff
|
|
239
|
|
240 If you have un-stranded RNA-seq data, and wish to run Cufflinks/Cuffdiff on STAR alignments, you will
|
|
241 need to run STAR with --outSAMstrandField intronMotif option, which will generate the XS
|
|
242 strand attribute for all alignments that contain splice junctions. The spliced alignments that have undefined
|
|
243 strand (i.e. containing only non-canonical junctions) will be suppressed.
|
|
244
|
|
245 If you have stranded RNA-seq data, you do not need to use any specific STAR options. Instead, you need
|
|
246 to run Cufflinks with the library option --library-type options. For example, cufflinks with
|
|
247 library-type fr-firststrand should be used for the “standard” dUTP protocol.
|
|
248 This option has to be used only for Cufflinks runs and not for STAR runs.
|
|
249
|
|
250 It is recommended to remove the non-canonical junctions for Cufflinks runs using –
|
|
251
|
|
252 --outFilterIntronMotifs RemoveNoncanonical
|
|
253 filter out alignments that contain non-canonical junctions
|
|
254
|
|
255 OR
|
|
256
|
|
257 --outFilterIntronMotifs RemoveNoncanonicalUnannotated
|
|
258 filter out alignments that contain non-canonical unannotated junctions
|
|
259 when using annotated splice junctions database. The annotated non-
|
|
260 canonical junctions will be kept.
|
|
261
|
|
262
|
|
263 **Attributions**
|
|
264
|
|
265 Note that each component has its own license. Good luck with figuring out your obligations.
|
|
266
|
|
267 rna_star - see the web site at rna_star_
|
|
268
|
|
269 For details, please see the rna_starMS_
|
|
270 "STAR: ultrafast universal RNA-seq aligner"
|
|
271 A. Dobin et al, Bioinformatics 2012; doi: 10.1093/bioinformatics/bts635
|
|
272
|
|
273 Galaxy_ (that's what you are using right now!) for gluing everything together
|
|
274
|
|
275 Most of the work for this wrapper XML is Jeremy Goecks' original STAR_ wrapper
|
|
276
|
|
277 Minor tweaks to output names to suit our downstream purposes, toolshed automated dependencies
|
|
278 and odds and ends of other code and documentation comprising this tool was
|
|
279 written by Ross Lazarus and that part is licensed_ the same way as other rgenetics artefacts
|
|
280
|
|
281 .. _STAR: https://bitbucket.org/jgoecks/jeremys-code/raw/fa1930a689b8e2f6b59cc1706e5ba0ed8ad357be/galaxy/tool-wrappers/star.xml
|
|
282 .. _licensed: http://creativecommons.org/licenses/by-nc-nd/3.0/
|
|
283 .. _rna_star: http://code.google.com/p/rna-star/
|
|
284 .. _rna_starMS: http://bioinformatics.oxfordjournals.org/content/29/1/15.full
|
|
285 .. _Galaxy: http://getgalaxy.org
|
|
286
|
|
287 </help>
|
|
288 </tool>
|