comparison picard_CollectRnaSeqMetrics.xml @ 0:4419e9980172 draft

Uploaded
author devteam
date Thu, 23 Oct 2014 12:03:34 -0400
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:4419e9980172
1 <tool name="CollectRnaSeqMetrics" id="picard_CollectRnaSeqMetrics" version="1.122.0">
2 <description> collect metrics about the alignment of RNA to various functional classes of loci in the genome</description>
3 <requirements>
4 <requirement type="package" version="1.122.0">picard</requirement>
5 </requirements>
6
7 <macros>
8 <import>picard_macros.xml</import>
9 </macros>
10
11
12 <command>
13
14 ## Set up input files
15
16 ## Reference sequences
17
18 #set $reference_fasta_filename = "localref.fa"
19
20 #if str( $reference_source.reference_source_selector ) == "history":
21 ln -s "${reference_source.ref_file}" "${reference_fasta_filename}" &amp;&amp;
22 #else:
23 #set $reference_fasta_filename = str( $reference_source.ref_file.fields.path )
24 #end if
25
26 ## refFlat data
27 ## The awk line below converts a file obtained from UCSC as specified in the tool help to refFlat format
28
29 grep -v '^#' ${refFlat} | awk '{print $11"\t"$1"\t"$2"\t"$3"\t"$4"\t"$5"\t"$6"\t"$7"\t"$8"\t"$9"\t"$10}' > refFlat.tab &amp;&amp;
30
31 ## Start picard command
32
33 @java_options@
34 java -jar \$JAVA_JAR_PATH/CollectRnaSeqMetrics.jar
35 REF_FLAT=refFlat.tab
36
37 #if str( $ribosomal_intervals ) != "None":
38 RIBOSOMAL_INTERVALS="${ribosomal_intervals}"
39 #end if
40
41 STRAND_SPECIFICITY="${strand_specificity}"
42 MINIMUM_LENGTH="${minimum_length}"
43 CHART_OUTPUT="${pdfFile}"
44
45 #for $sequence_to_ignore in $ignore_list:
46 IGNORE_SEQUENCE="${sequence_to_ignore.sequence}"
47 #end for
48
49 RRNA_FRAGMENT_PERCENTAGE="${rrna_fragment_percentage}"
50 METRIC_ACCUMULATION_LEVEL="${metric_accumulation_level}"
51 INPUT="${inputFile}"
52 OUTPUT="${outFile}"
53 REFERENCE_SEQUENCE="${reference_fasta_filename}"
54 ASSUME_SORTED="${assume_sorted}"
55
56 QUIET=true
57 VERBOSITY=ERROR
58 VALIDATION_STRINGENCY=${validation_stringency}
59
60 </command>
61
62 <inputs>
63 <param format="sam,bam" type="data" name="inputFile" label="Select SAM/BAM dataset or dataset collection" help="If empty, upload or import a SAM/BAM dataset" />
64 <conditional name="reference_source">
65 <param name="reference_source_selector" type="select" label="Load reference genome from">
66 <option value="cached">Local cache</option>
67 <option value="history">History</option>
68 </param>
69 <when value="cached">
70 <param name="ref_file" type="select" label="Using reference genome" help="REFERENCE_SEQUENCE">
71 <options from_data_table="all_fasta"></options>
72 <validator type="no_options" message="A built-in reference genome is not available for the build associated with the selected input file"/>
73 </param>
74 </when>
75 <when value="history">
76 <param name="ref_file" type="data" format="fasta" label="Use the folloing dataset as the reference sequence" help="REFERENCE_SEQUENCE; You can upload a FASTA sequence to the history and use it as reference" />
77 </when>
78 </conditional>
79 <param format="tabular" name="refFlat" type="data" label="Gene annotations in refFlat form" help="See &quot;Obtaining gene annotations in refFlat format&quot; below for help" />
80 <param name="ribosomal_intervals" format="picard_interval_list" type="data" optional="True" label="Location of rRNA sequences in genome, in interval_list format" help="RIBOSOMAL_INTERVALS; If not specified no bases will be identified as being ribosomal. The list of intervals can be geberated from BED or Interval datasets using Galaxy BedToIntervalList tool"/>
81 <param name="strand_specificity" type="select" label="What is the RNA-seq library strand specificity" help="STRAND_SPECIFICITY; For unpaired reads, use FIRST_READ_TRANSCRIPTION_STRAND if the reads are expected to be on the transcription strand.">
82 <option value="NONE" select="True">None</option>
83 <option value="FIRST_READ_TRANSCRIPTION_STRAND">First read transcription strand</option>
84 <option value="SECOND_READ_TRANSCRIPTION_STRAND">Second read transcription strand</option>
85 </param>
86 <param name="minimum_length" type="integer" value="500" label="When calculating coverage based values use only use transcripts of this length or greater" help="MINIMUM_LENGTH; default=500"/>
87 <repeat name="ignore_list" title="Sequences to ignore" min="0" help="You can provide multiple sequences by clicking the button below">
88 <param name="sequence" type="text" size="80" label="Ignore reads matching this sequence"/>
89 </repeat>
90 <param name="rrna_fragment_percentage" type="float" value="0.8" label="This percentage of the length of a fragment must overlap one of the ribosomal intervals for a read or read pair to be considered rRNA." help="RRNA_FRAGMENT_PERCENTAGE; default=0.8"/>
91 <param name="metric_accumulation_level" type="select" label="The level(s) at which to accumulate metrics" multiple="true" help="METRIC_ACCUMULATION_LEVEL">
92 <option value="ALL_READS" selected="True">All reads</option>
93 <option value="SAMPLE">Sample</option>
94 <option value="LIBRARY">Library</option>
95 <option value="READ_GROUP">Read group</option>
96 </param>
97 <param name="assume_sorted" type="boolean" label="Assume the input file is already sorted" checked="true" truevalue="true" falsevalue="false" help="ASSUME_SORTED"/>
98
99 <expand macro="VS" />
100
101 </inputs>
102 <outputs>
103 <data format="pdf" name="pdfFile" label="${tool.name} on ${on_string}: Chart PDF"/>
104 <data format="tabular" name="outFile" label="${tool.name} on ${on_string}: Summary stats"/>
105 </outputs>
106
107 <stdio>
108 <exit_code range="1:" level="fatal"/>
109 </stdio>
110 <tests>
111 <test>
112 <param name="reference_source_selector" value="history"/>
113 <param name="ref_file" value="picard_CollectRnaSeqMetrics_ref.fa" ftype="fasta"/>
114 <param name="inputFile" value="picard_CollectRnaSeqMetrics.bam" ftype="bam"/>
115 <param name="assume_sorted" value="true" />
116 <param name="refFlat" value="picard_CollectRnaSeqMetrics.refFlat" />
117 <param name="metric_accumulation_level" value="ALL_READS" />
118 <param name="minimum_length" value="500" />
119 <param name="strand_specificity" value="NONE" />
120 <param name="rrna_fragment_percentage" value="0.8" />
121 <output name="outFile" file="picard_CollectRnaSeqMetrics_test1.tab" ftype="tabular" lines_diff="4"/>
122 </test>
123
124 </tests>
125 <help>
126
127 .. class:: infomark
128
129 **Purpose**
130
131 Collects metrics about the alignment of RNA to various functional classes of loci in the genome: coding, intronic, UTR, intergenic, ribosomal.
132
133 @dataset_collections@
134
135 -----
136
137 .. class:: warningmark
138
139 **Obtaining gene annotations in refFlat format**
140
141 This tool requires gene annotations in refFlat_ format. These data can be obtained from UCSC table browser directly through Galaxy by following these steps:
142
143 1. Click on **Get Data** in the upper part of left pane of Galaxy interface
144 2. Click on **UCSC Main** link
145 3. Set your genome and dataset of interest. It **must** be the same genome build against which you have mapped the reads contained in the BAM file you are analyzing
146 4. In the **output format** field choose **selected fields from primary and related tables**
147 5. Click **get output** button
148 6. In the first table presented at the top of the page select (using checkboxes) first 11 fields:
149 name
150 chrom
151 strand
152 txStart
153 txEnd
154 cdsStart
155 cdsEnd
156 exonCount
157 exonStarts
158 exonEnds
159 proteinId
160 7. Click **done with selection**
161 8. Click **Send query to Galaxy**
162 9. A new dataset will appear in the current Galaxy history
163 10. Use this dataset as the input for **Gene annotations in refFlat form** dropdown of this tool
164
165 .. _refFlat: http://genome.ucsc.edu/goldenPath/gbdDescriptionsOld.html#RefFlat
166
167 @description@
168
169 REF_FLAT=File Gene annotations in refFlat form. Format described here:
170 http://genome.ucsc.edu/goldenPath/gbdDescriptionsOld.html#RefFlat Required.
171
172 RIBOSOMAL_INTERVALS=File Location of rRNA sequences in genome, in interval_list format. If not specified no bases
173 will be identified as being ribosomal. Format described here:
174 http://picard.sourceforge.net/javadoc/net/sf/picard/util/IntervalList.html and can be
175 generated from BED datasetes using Galaxy's wrapper for picard_BedToIntervalList tool
176
177 STRAND_SPECIFICITY=StrandSpecificity
178 STRAND=StrandSpecificity For strand-specific library prep. For unpaired reads, use FIRST_READ_TRANSCRIPTION_STRAND
179 if the reads are expected to be on the transcription strand. Required. Possible values:
180 {NONE, FIRST_READ_TRANSCRIPTION_STRAND, SECOND_READ_TRANSCRIPTION_STRAND}
181
182 MINIMUM_LENGTH=Integer When calculating coverage based values (e.g. CV of coverage) only use transcripts of this
183 length or greater. Default value: 500.
184
185 IGNORE_SEQUENCE=String If a read maps to a sequence specified with this option, all the bases in the read are
186 counted as ignored bases.
187
188 RRNA_FRAGMENT_PERCENTAGE=Double
189 This percentage of the length of a fragment must overlap one of the ribosomal intervals
190 for a read or read pair by this must in order to be considered rRNA. Default value: 0.8.
191
192 METRIC_ACCUMULATION_LEVEL=MetricAccumulationLevel
193 LEVEL=MetricAccumulationLevel The level(s) at which to accumulate metrics. Possible values: {ALL_READS, SAMPLE,
194 LIBRARY, READ_GROUP} This option may be specified 0 or more times.
195
196 ASSUME_SORTED=Boolean
197 AS=Boolean If true (default), then the sort order in the header file will be ignored. Default
198 value: true. Possible values: {true, false}
199
200 @more_info@
201
202 </help>
203 </tool>