4
|
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" 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.
|
|
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>
|
5
|
109 <data format="txt" name="output_log" label="${on_string}_${jobName}_starchimjunc.bed" from_work_dir="Chimeric.out.junction">
|
4
|
110 <filter>(params['settingsType'] == 'full' and params['chim_segment_min'] > 0)</filter>
|
|
111 <actions>
|
|
112 <conditional name="refGenomeSource.genomeSource">
|
|
113 <when value="indexed">
|
|
114 <action type="metadata" name="dbkey">
|
|
115 <option type="from_data_table" name="star_indexes" column="1" offset="0">
|
|
116 <filter type="param_value" column="0" value="#" compare="startswith" keep="False"/>
|
|
117 <filter type="param_value" ref="refGenomeSource.index" column="0"/>
|
|
118 </option>
|
|
119 </action>
|
|
120 </when>
|
|
121 <when value="history">
|
|
122 <action type="metadata" name="dbkey">
|
|
123 <option type="from_param" name="refGenomeSource.ownFile" param_attribute="dbkey" />
|
|
124 </action>
|
|
125 </when>
|
|
126 </conditional>
|
|
127 </actions>
|
|
128 </data>
|
5
|
129 <data format="bam" name="chimeric_reads" label="${on_string}_${jobName}_starmappedchim.bam"
|
4
|
130 from_work_dir="Chimeric.out.bam">
|
|
131 <filter>(params['settingsType'] == 'full' and params['chim_segment_min'] > 0)</filter>
|
|
132 <actions>
|
|
133 <conditional name="refGenomeSource.genomeSource">
|
|
134 <when value="indexed">
|
|
135 <action type="metadata" name="dbkey">
|
|
136 <option type="from_data_table" name="star_indexes" column="1" offset="0">
|
|
137 <filter type="param_value" column="0" value="#" compare="startswith" keep="False"/>
|
|
138 <filter type="param_value" ref="refGenomeSource.index" column="0"/>
|
|
139 </option>
|
|
140 </action>
|
|
141 </when>
|
|
142 <when value="history">
|
|
143 <action type="metadata" name="dbkey">
|
|
144 <option type="from_param" name="refGenomeSource.ownFile" param_attribute="dbkey" />
|
|
145 </action>
|
|
146 </when>
|
|
147 </conditional>
|
|
148 </actions>
|
|
149 </data>
|
5
|
150 <data format="interval" name="splice_junctions" label="${on_string}_${jobName}_starsplicejunct.bed"
|
4
|
151 from_work_dir="SJ.out.tab">
|
|
152 <actions>
|
|
153 <conditional name="refGenomeSource.genomeSource">
|
|
154 <when value="indexed">
|
|
155 <action type="metadata" name="dbkey">
|
|
156 <option type="from_data_table" name="star_indexes" column="1" offset="0">
|
|
157 <filter type="param_value" column="0" value="#" compare="startswith" keep="False"/>
|
|
158 <filter type="param_value" ref="refGenomeSource.index" column="0"/>
|
|
159 </option>
|
|
160 </action>
|
|
161 </when>
|
|
162 <when value="history">
|
|
163 <action type="metadata" name="dbkey">
|
|
164 <option type="from_param" name="refGenomeSource.ownFile" param_attribute="dbkey" />
|
|
165 </action>
|
|
166 </when>
|
|
167 </conditional>
|
|
168 </actions>
|
|
169 </data>
|
5
|
170 <data format="bam" name="mapped_reads" label="${on_string}_${jobName}_starmapped.bam"
|
4
|
171 from_work_dir="Aligned.out.bam">
|
|
172 <actions>
|
|
173 <conditional name="refGenomeSource.genomeSource">
|
|
174 <when value="indexed">
|
|
175 <action type="metadata" name="dbkey">
|
|
176 <option type="from_data_table" name="star_indexes" column="1" offset="0">
|
|
177 <filter type="param_value" column="0" value="#" compare="startswith" keep="False"/>
|
|
178 <filter type="param_value" ref="refGenomeSource.index" column="0"/>
|
|
179 </option>
|
|
180 </action>
|
|
181 </when>
|
|
182 <when value="history">
|
|
183 <action type="metadata" name="dbkey">
|
|
184 <option type="from_param" name="refGenomeSource.ownFile" param_attribute="dbkey" />
|
|
185 </action>
|
|
186 </when>
|
|
187 </conditional>
|
|
188 </actions>
|
|
189 </data>
|
|
190 </outputs>
|
|
191 <help>
|
|
192
|
|
193 **Attributions**
|
|
194
|
|
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
|
|
208 and odds and ends of other code and documentation comprising this tool was
|
|
209 written by Ross Lazarus and that part is licensed_ the same way as other rgenetics artefacts
|
|
210
|
|
211 .. _STAR: https://bitbucket.org/jgoecks/jeremys-code/raw/fa1930a689b8e2f6b59cc1706e5ba0ed8ad357be/galaxy/tool-wrappers/star.xml
|
|
212 .. _licensed: http://creativecommons.org/licenses/by-nc-nd/3.0/
|
|
213 .. _rna_star: http://code.google.com/p/rna-star/
|
|
214 .. _rna_starMS: http://bioinformatics.oxfordjournals.org/content/29/1/15.full
|
|
215 .. _Galaxy: http://getgalaxy.org
|
|
216
|
|
217 </help>
|
|
218 </tool>
|