0
|
1 <tool id="rna_star" name="RNA-STAR" version="0.2">
|
|
2 <description>Gapped-read mapper for RNA-seq data</description>
|
|
3 <requirements>
|
|
4 <requirement type="package">star</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.
|
|
25 #if $params.settingsType == "full":
|
|
26 --chimSegmentMin $params.chim_segment_min
|
|
27 --chimScoreMin $params.chim_score_min
|
|
28 #end if
|
|
29
|
|
30 ## Needed to generate SAM tags for Cufflinks tools.
|
|
31 --outSAMstrandField intronMotif
|
|
32
|
|
33 ;
|
|
34
|
|
35 ##
|
|
36 ## BAM conversion.
|
|
37 ##
|
|
38
|
|
39 ## Convert aligned reads.
|
|
40 samtools view -Shb Aligned.out.sam | samtools sort - Aligned.out
|
|
41
|
|
42 ## Convert chimeric reads.
|
|
43 #if $params.settingsType == "full" and $params.chim_segment_min > 0:
|
|
44 ; samtools view -Shb Chimeric.out.sam | samtools sort - Chimeric.out
|
|
45 #end if
|
|
46 </command>
|
|
47
|
|
48 <stdio>
|
|
49 <regex match=".*" source="both" level="warning" description="generic stdout/err chatter"/>
|
|
50 </stdio>
|
|
51
|
|
52 <inputs>
|
|
53 <param name="jobName" type="text" size="120" value="rna-star run" label="Job narrative (added to output names)"
|
|
54 help="Only letters, numbers and underscores (_) will be retained in this field>
|
|
55 <sanitizer invalid_char="">
|
|
56 <valid initial="string.letters,string.digits"><add value="_" /> </valid>
|
|
57 </sanitizer>
|
|
58 </param>
|
|
59 <!-- FASTQ input(s) and options specifically for paired-end data. -->
|
|
60 <conditional name="singlePaired">
|
|
61 <param name="sPaired" type="select" label="Single ended or mate-pair ended reads in this library?">
|
|
62 <option value="single" selected="true">Single-end</option>
|
|
63 <option value="paired">Paired-end</option>
|
|
64 </param>
|
|
65 <when value="single">
|
|
66 <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"/>
|
|
67 </when>
|
|
68 <when value="paired">
|
|
69 <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" />
|
|
70 <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" />
|
|
71 </when>
|
|
72 </conditional>
|
|
73
|
|
74 <!-- Genome source. -->
|
|
75 <conditional name="refGenomeSource">
|
|
76 <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">
|
|
77 <option value="indexed">Use a built-in index</option>
|
|
78 <option value="history">Use one from the history</option>
|
|
79 </param>
|
|
80 <when value="indexed">
|
|
81 <param name="index" type="select" label="Select a reference genome">
|
|
82 <options from_data_table="rnastar_indexes">
|
|
83 <filter type="sort_by" column="2"/>
|
|
84 <validator type="no_options" message="No indexes are available for the selected input dataset"/>
|
|
85 </options>
|
|
86 </param>
|
|
87 </when>
|
|
88 <when value="history">
|
|
89 <param name="ownFile" type="data" format="fasta" metadata_name="dbkey" label="Select the reference genome" />
|
|
90 </when>
|
|
91 </conditional>
|
|
92
|
|
93 <!-- Parameter settings. -->
|
|
94 <conditional name="params">
|
|
95 <param name="settingsType" type="select" label="Settings to use" help="You can use the default settings or set custom values for any STAR parameter.">
|
|
96 <option value="preSet" selected="true">Use Defaults</option>
|
|
97 <option value="full">Full parameter list</option>
|
|
98 </param>
|
|
99 <when value="preSet" />
|
|
100 <!-- Full/advanced params. -->
|
|
101 <when value="full">
|
|
102 <param name="chim_segment_min" type="integer" min="0" value="0" label="Minimum chimeric segment length" />
|
|
103 <param name="chim_score_min" type="integer" min="0" value="0" label="Minimum total (summed) score of the chimeric segments" />
|
|
104 </when>
|
|
105 </conditional>
|
|
106 </inputs>
|
|
107
|
|
108 <outputs>
|
|
109 <data format="txt" name="output_log" label="${on_string}_{jobName}.log" from_work_dir="Log.final.out"/>
|
|
110 <data format="interval" name="chimeric_junctions" label="${on_string}_{jobName}_starchimjunc.bed" from_work_dir="Chimeric.out.junction">
|
|
111 <filter>(params['settingsType'] == 'full' and params['chim_segment_min'] > 0)</filter>
|
|
112 <actions>
|
|
113 <conditional name="refGenomeSource.genomeSource">
|
|
114 <when value="indexed">
|
|
115 <action type="metadata" name="dbkey">
|
|
116 <option type="from_data_table" name="star_indexes" column="1" offset="0">
|
|
117 <filter type="param_value" column="0" value="#" compare="startswith" keep="False"/>
|
|
118 <filter type="param_value" ref="refGenomeSource.index" column="0"/>
|
|
119 </option>
|
|
120 </action>
|
|
121 </when>
|
|
122 <when value="history">
|
|
123 <action type="metadata" name="dbkey">
|
|
124 <option type="from_param" name="refGenomeSource.ownFile" param_attribute="dbkey" />
|
|
125 </action>
|
|
126 </when>
|
|
127 </conditional>
|
|
128 </actions>
|
|
129 </data>
|
|
130 <data format="bam" name="chimeric_reads" label="${on_string}_{jobName}_starmappedchim.bam"
|
|
131 from_work_dir="Chimeric.out.bam">
|
|
132 <filter>(params['settingsType'] == 'full' and params['chim_segment_min'] > 0)</filter>
|
|
133 <actions>
|
|
134 <conditional name="refGenomeSource.genomeSource">
|
|
135 <when value="indexed">
|
|
136 <action type="metadata" name="dbkey">
|
|
137 <option type="from_data_table" name="star_indexes" column="1" offset="0">
|
|
138 <filter type="param_value" column="0" value="#" compare="startswith" keep="False"/>
|
|
139 <filter type="param_value" ref="refGenomeSource.index" column="0"/>
|
|
140 </option>
|
|
141 </action>
|
|
142 </when>
|
|
143 <when value="history">
|
|
144 <action type="metadata" name="dbkey">
|
|
145 <option type="from_param" name="refGenomeSource.ownFile" param_attribute="dbkey" />
|
|
146 </action>
|
|
147 </when>
|
|
148 </conditional>
|
|
149 </actions>
|
|
150 </data>
|
|
151 <data format="interval" name="splice_junctions" label="${on_string}_{jobName}_starsplicejunct.bed"
|
|
152 from_work_dir="SJ.out.tab">
|
|
153 <actions>
|
|
154 <conditional name="refGenomeSource.genomeSource">
|
|
155 <when value="indexed">
|
|
156 <action type="metadata" name="dbkey">
|
|
157 <option type="from_data_table" name="star_indexes" column="1" offset="0">
|
|
158 <filter type="param_value" column="0" value="#" compare="startswith" keep="False"/>
|
|
159 <filter type="param_value" ref="refGenomeSource.index" column="0"/>
|
|
160 </option>
|
|
161 </action>
|
|
162 </when>
|
|
163 <when value="history">
|
|
164 <action type="metadata" name="dbkey">
|
|
165 <option type="from_param" name="refGenomeSource.ownFile" param_attribute="dbkey" />
|
|
166 </action>
|
|
167 </when>
|
|
168 </conditional>
|
|
169 </actions>
|
|
170 </data>
|
|
171 <data format="bam" name="mapped_reads" label="${on_string}_{jobName}_starmapped.bam"
|
|
172 from_work_dir="Aligned.out.bam">
|
|
173 <actions>
|
|
174 <conditional name="refGenomeSource.genomeSource">
|
|
175 <when value="indexed">
|
|
176 <action type="metadata" name="dbkey">
|
|
177 <option type="from_data_table" name="star_indexes" column="1" offset="0">
|
|
178 <filter type="param_value" column="0" value="#" compare="startswith" keep="False"/>
|
|
179 <filter type="param_value" ref="refGenomeSource.index" column="0"/>
|
|
180 </option>
|
|
181 </action>
|
|
182 </when>
|
|
183 <when value="history">
|
|
184 <action type="metadata" name="dbkey">
|
|
185 <option type="from_param" name="refGenomeSource.ownFile" param_attribute="dbkey" />
|
|
186 </action>
|
|
187 </when>
|
|
188 </conditional>
|
|
189 </actions>
|
|
190 </data>
|
|
191 </outputs>
|
|
192 <help>
|
|
193
|
|
194 **Attributions**
|
|
195 Note that each component has its own license. Good luck with figuring out your obligations.
|
|
196
|
|
197 rna_star - see the web site at rna_star_
|
|
198
|
|
199 For details, please see the rna_starMS_
|
|
200 "STAR: ultrafast universal RNA-seq aligner"
|
|
201 A. Dobin et al, Bioinformatics 2012; doi: 10.1093/bioinformatics/bts635
|
|
202
|
|
203 Galaxy_ (that's what you are using right now!) for gluing everything together
|
|
204
|
|
205 Most of the work for this wrapper XML is Jeremy Goecks' original STAR_ wrapper
|
|
206
|
|
207 Minor tweaks to output names to suit our downstream purposes, toolshed automated dependencies and odds and ends of other code and documentation comprising this tool was written by Ross Lazarus and
|
|
208 that part is licensed_ the same way as other rgenetics artefacts
|
|
209
|
|
210 .. _STAR: https://bitbucket.org/jgoecks/jeremys-code/raw/fa1930a689b8e2f6b59cc1706e5ba0ed8ad357be/galaxy/tool-wrappers/star.xml
|
|
211 .. _licensed: http://creativecommons.org/licenses/by-nc-nd/3.0/
|
|
212 .. _rna_star: http://code.google.com/p/rna-star/
|
|
213 .. _rna_starMS: http://bioinformatics.oxfordjournals.org/content/29/1/15.full
|
|
214 .. _Galaxy: http://getgalaxy.org
|
|
215
|
|
216 </help>
|
|
217 </tool>
|