comparison AddOrReplaceReadGroups.xml @ 20:7a6490baa53a draft

Uploaded
author devteam
date Mon, 10 Feb 2014 22:38:23 -0500
parents
children
comparison
equal deleted inserted replaced
19:f1c0e0384c52 20:7a6490baa53a
1 <tool name="Add or Replace Groups" id="picard_ARRG" version="1.106.0">
2 <requirements><requirement type="package" version="1.106.0">picard</requirement></requirements>
3 <command interpreter="java -jar -Xmx8g">
4 $JAVA_JAR_PATH/AddOrReplaceReadGroups.jar
5 INPUT="${inputFile}"
6 RGLB="${rglb}"
7 RGPL="${rgpl}"
8 RGPU="${rgpu}"
9 RGSM="${rgsm}"
10 RGID="${rgid}"
11 #if $readGroupOpts.rgOpts == "full"
12 RGCN="${readGroupOpts.rgcn}"
13 RGDS="${readGroupOpts.rgds}"
14 RGPI="${readGroupOpts.rgpi}"
15 #end if
16 #if $reporting.opt == "full"
17 VALIDATION_STRINGENCY="${reporting.vs}"
18 QUIET="${reporting.verbosity}"
19 #else
20 VALIDATION_STRINGENCY=LENIENT
21 QUIET=True
22 #end if
23 OUTPUT="${outFile}"
24 TMP_DIR="${__new_file_path__}"
25 </command>
26
27 <stdio>
28 <exit_code range="0" level="warning" description="Tool finished correctly" />
29 </stdio>
30
31
32 <inputs>
33 <param format="bam,sam" name="inputFile" type="data" label="SAM/BAM dataset to add or replace read groups in"
34 help="If empty, upload or import a SAM/BAM dataset." />
35 <param name="rgid" value="1" type="text" label="Read group ID (ID tag)" help="The most important read group tag. Galaxy will use a value of '1' if nothing provided." />
36 <param name="rgsm" value="" type="text" label="Read group sample name (SM tag). Required." />
37 <param name="rglb" value="" type="text" label="Read group library (LB tag). Required." />
38 <param name="rgpl" value="Illumina" type="text" label="Read group platform (PL tag). Required." help="illumina, solid, 454, pacbio, helicos" />
39 <param name="rgpu" value="" type="text" label="Read group platform unit. Required." help="like run barcode, etc." />
40 <conditional name="readGroupOpts">
41 <param name="rgOpts" type="select" label="Specify additional (optional) arguments" help="Allows you to set GCN, RGDS, and RGPI">
42 <option value="preSet">Use pre-set defaults</option>
43 <option value="full">Set optional arguments</option>
44 </param>
45 <when value="preSet" />
46 <when value="full">
47 <param name="rgcn" value="" type="text" label="Read group sequencing center name" help="Leave set to &lt;null&gt; for default (none)" />
48 <param name="rgds" value="" type="text" label="Read group description" help="Leave set to &lt;null&gt; for default (none)" />
49 <param name="rgpi" value="" type="text" label="Predicted insert size" help="Leave set to &lt;null&gt; for default (none)" />
50 </when>
51 </conditional>
52
53 <conditional name="reporting">
54 <param name="opt" type="select" label="Change reporting options" help="Allows you to set Validation Stringency and Verbosity">
55 <option value="preSet">Use pre-set defaults</option>
56 <option value="full">Set optional arguments</option>
57 </param>
58 <when value="preSet" />
59 <when value="full">
60 <param name="vs" type="select" label="Set validation stringency">
61 <option value="LENIENT" selected="True">Lenient</option>
62 <option value="STRICT">Strict</option>
63 <option value="SILENT">Silent</option>
64 </param>
65 <param name="verbosity" type="select" label="Enable or supress reporting of job summary to Standard Error">
66 <option value="True" selected="True">Supress</option>
67 <option value="False">Enable</option>
68 </param>
69 </when>
70 </conditional>
71
72 </inputs>
73 <outputs>
74 <data name="outFile" format="bam">
75 </data>
76 </outputs>
77 <tests>
78 <test>
79 <!-- Command for replacing read groups in bam:
80 java -jar AddOrReplaceReadGroups.jar VALIDATION_STRINGENCY=LENIENT INPUT=./test-data/PICARD-in-noHeader.sam OUTPUT=./test-data/PICARD-ARRG-test1.bam RGLB=test1 RGPL=Illumina RGPU=PLAT RGSM=sample1 RGID=test1 QUIET=True
81 -->
82 <param name="inputFile" value="PICARD-in-noHeader.sam" />
83 <param name="rglb" value="test1" />
84 <param name="rgpl" value="Illumina" />
85 <param name="rgpu" value="PLAT" />
86 <param name="rgsm" value="sample1" />
87 <param name="rgid" value="test1" />
88 <param name="rgOpts" value="preSet" />
89 <param name="opt" value="preSet" />
90 <output name="outFile" file="PICARD-ARRG-test1.bam" lines_diff="2" ftype="bam" />
91 </test>
92 <test>
93 <!-- Command for replacing read groups in sam:
94 java -jar AddOrReplaceReadGroups.jar VALIDATION_STRINGENCY=LENIENT INPUT=./test-data/in.sam OUTPUT=./test-data/PICARD-ARRG-test2.bam RGLB=test2 RGPL=Illumina RGPU=PLAT RGSM=sample2 RGID=test2 QUIET=True
95 picard_ARRG_input1.bam can be created from picard_ARRG_input1.sam
96 -->
97 <param name="inputFile" value="PICARD-in.sam" />
98 <param name="rglb" value="test2" />
99 <param name="rgpl" value="Illumina" />
100 <param name="rgpu" value="PLAT" />
101 <param name="rgsm" value="sample2" />
102 <param name="rgid" value="test2" />
103 <param name="rgOpts" value="preSet" />
104 <param name="opt" value="preSet" />
105 <output name="outFile" file="PICARD-ARRG-test2.bam" lines_diff="2" ftype="bam" />
106 </test>
107 <test>
108 <!-- Command for adding read groups in sam:
109 java -jar AddOrReplaceReadGroups.jar VALIDATION_STRINGENCY=LENIENT INPUT=./test-data/in.bam OUTPUT=./test-data/PICARD-ARRG-test3.bam RGLB=test3 RGPL=Illumina RGPU=PLAT RGSM=sample3 RGID=test3 QUIET=True
110 -->
111 <param name="inputFile" value="PICARD-in.bam" />
112 <param name="rglb" value="test3" />
113 <param name="rgpl" value="Illumina" />
114 <param name="rgpu" value="PLAT" />
115 <param name="rgsm" value="sample3" />
116 <param name="rgid" value="test3" />
117 <param name="rgOpts" value="preSet" />
118 <param name="opt" value="preSet" />
119 <output name="outFile" file="PICARD-ARRG-test3.bam" lines_diff="2" ftype="bam" />
120 </test>
121 </tests>
122 <help>
123
124 .. class:: infomark
125
126 **Purpose**
127
128 Add or Replace Read Groups in an input BAM or SAM file.
129
130 **Read Groups are Important!**
131
132 Setting read groups correctly from the start will simplify your life greatly because you can merge multiple BAM files into one significantly reducing the number of analysis steps. Below we provide an explanation of read groups fields taken from GATK FAQ webpage:
133
134 .. csv-table::
135 :header-rows: 1
136
137 Tag,Importance,Definition,Meaning
138 "ID","Required","Read group identifier. Each @RG line must have a unique ID. The value of ID is used in the RG tags of alignment records. Must be unique among all read groups in header section. Read group IDs may be modified when merging SAM files in order to handle collisions.","Ideally, this should be a globally unique identify across all sequencing data in the world, such as the Illumina flowcell + lane name and number. Will be referenced by each read with the RG:Z field, allowing tools to determine the read group information associated with each read, including the sample from which the read came. Also, a read group is effectively treated as a separate run of the NGS instrument in tools like base quality score recalibration (a GATK component) -- all reads within a read group are assumed to come from the same instrument run and to therefore share the same error model."
139 "SM","Sample. Use pool name where a pool is being sequenced.","Required. As important as ID.","The name of the sample sequenced in this read group. GATK tools treat all read groups with the same SM value as containing sequencing data for the same sample. Therefore it's critical that the SM field be correctly specified, especially when using multi-sample tools like the Unified Genotyper (a GATK component)."
140 "PL","Platform/technology used to produce the read. Valid values: ILLUMINA, SOLID, LS454, HELICOS and PACBIO.","Important. Not currently used in the GATK, but was in the past, and may return. The only way to known the sequencing technology used to generate the sequencing data","It's a good idea to use this field."
141 "LB","DNA preparation library identify","Essential for MarkDuplicates","MarkDuplicates uses the LB field to determine which read groups might contain molecular duplicates, in case the same DNA library was sequenced on multiple lanes."
142
143 **Example of Read Group usage**
144
145 Support we have a trio of samples: MOM, DAD, and KID. Each has two DNA libraries prepared, one with 400 bp inserts and another with 200 bp inserts. Each of these libraries is run on two lanes of an illumina hiseq, requiring 3 x 2 x 2 = 12 lanes of data. When the data come off the sequencer, we would create 12 BAM files, with the following @RG fields in the header::
146
147 Dad's data:
148 @RG ID:FLOWCELL1.LANE1 PL:illumina LB:LIB-DAD-1 SM:DAD PI:200
149 @RG ID:FLOWCELL1.LANE2 PL:illumina LB:LIB-DAD-1 SM:DAD PI:200
150 @RG ID:FLOWCELL1.LANE3 PL:illumina LB:LIB-DAD-2 SM:DAD PI:400
151 @RG ID:FLOWCELL1.LANE4 PL:illumina LB:LIB-DAD-2 SM:DAD PI:400
152
153 Mom's data:
154 @RG ID:FLOWCELL1.LANE5 PL:illumina LB:LIB-MOM-1 SM:MOM PI:200
155 @RG ID:FLOWCELL1.LANE6 PL:illumina LB:LIB-MOM-1 SM:MOM PI:200
156 @RG ID:FLOWCELL1.LANE7 PL:illumina LB:LIB-MOM-2 SM:MOM PI:400
157 @RG ID:FLOWCELL1.LANE8 PL:illumina LB:LIB-MOM-2 SM:MOM PI:400
158
159 Kid's data:
160 @RG ID:FLOWCELL2.LANE1 PL:illumina LB:LIB-KID-1 SM:KID PI:200
161 @RG ID:FLOWCELL2.LANE2 PL:illumina LB:LIB-KID-1 SM:KID PI:200
162 @RG ID:FLOWCELL2.LANE3 PL:illumina LB:LIB-KID-2 SM:KID PI:400
163 @RG ID:FLOWCELL2.LANE4 PL:illumina LB:LIB-KID-2 SM:KID PI:400
164
165 Note the hierarchical relationship between read groups (unique for each lane) to libraries (sequenced on two lanes) and samples (across four lanes, two lanes for each library).
166
167 **Picard documentation**
168
169 This is a Galaxy wrapper for AddOrReplaceReadGroups, a part of the external package Picard-tools_.
170
171 .. _Picard-tools: http://www.google.com/search?q=picard+samtools
172
173 ------
174
175 .. class:: infomark
176
177 **Inputs, outputs, and parameters**
178
179 Either a sam file or a bam file must be supplied. If a bam file is used, it must
180 be coordinate-sorted. Galaxy currently coordinate-sorts all bam files.
181
182 The output file is either bam (the default) or sam, according to user selection,
183 and contains the same information as the input file except for the appropraite
184 additional (or modified) read group tags. Bam is recommended since it is smaller.
185
186 From the Picard documentation.
187
188 AddOrReplaceReadGroups REQUIRED parameters::
189
190 Option (Type) Description
191
192 RGLB=String Read Group Library
193 RGPL=String Read Group platform (e.g. illumina, solid)
194 RGPU=String Read Group platform unit (eg. run barcode)
195 RGSM=String Read Group sample name
196 RGID=String Read Group ID; Default value: null (empty)
197
198 AddOrReplaceReadGroups OPTIONAL parameters::
199
200 Option (Type) Description
201
202 RGCN=String Read Group sequencing center name; Default value: null (empty)
203 RGDS=String Read Group description Default value: null (empty)
204
205 AddOrReplaceReadGroups REPORTING parameters::
206
207 Option (Type) Description
208
209 VALIDATION_STRINGENCY=ValidationStringency Validation stringency for all SAM files read by this program.
210 Setting stringency to SILENT can improve performance when
211 processing a BAM file in which variable-length data (read,
212 qualities, tags) do not otherwise need to be decoded.
213 Default value (in Galaxy): LENIENT.
214
215 QUIET=Boolean Whether to suppress job-summary info on System.err.
216 Default value (in Galaxy): True.
217
218
219 .. class:: warningmark
220
221 **Warning on SAM/BAM quality**
222
223 Many SAM/BAM files produced externally and uploaded to Galaxy do not fully conform to SAM/BAM specifications. Galaxy deals with this by using the **LENIENT**
224 flag when it runs Picard, which allows reads to be discarded if they're empty or don't map. This appears
225 to be the only way to deal with SAM/BAM that cannot be parsed.
226
227
228
229 </help>
230 </tool>
231
232
233
234
235
236
237
238
239
240
241
242