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