comparison picard_MergeBamAlignment.xml @ 14:ad8b197f7d3a draft

Uploaded
author devteam
date Sat, 01 Feb 2014 20:20:49 -0500
parents
children
comparison
equal deleted inserted replaced
13:11e69ba20b85 14:ad8b197f7d3a
1 <tool id="picard_mergeBAMAlignment" name="Merge BAM Alignment" version="1.106.0">
2 <!-- Documentation: http://picard.sourceforge.net/command-line-overview.shtml#MergeBamAlignment
3 Merges alignment data from a SAM or BAM file with additional data stored in an unmapped BAM file and produces a third SAM or BAM file of aligned and unaligned reads. NOTE that this program expects to find a sequence dictionary in the same directory as REFERENCE_SEQUENCE and expects it to have the same base name as the reference fasta except with the extension '.dict'
4
5 OUTPUT=File Merged SAM or BAM file to write to. Required.
6 REFERENCE_SEQUENCE=File Path to the fasta file for the reference sequence. Required.
7 -->
8 <description>Merges alignment data from a SAM or BAM file with additional data stored in an unmapped BAM file</description>
9 <requirements><requirement type="package" version="1.106.0">picard</requirement></requirements>
10 <command interpreter="bash">
11 mergebamalignment_wrapper.sh $output1 $outformat $REFERENCE_SEQUENCE UNMAPPED_BAM=$UNMAPPED_BAM PAIRED_RUN=$PAIRED_RUN
12
13 ## optional arguments from here
14
15 #if str( $ALIGNED_BAM ):
16 ALIGNED_BAM=$ALIGNED_BAM
17 #end if
18 #for $i in $ALIGNED_BAMs
19 ALIGNED_BAM=${i.ALIGNED_BAM_file}
20 #end for
21
22 #if str( $READ1_ALIGNED_BAM ):
23 READ1_ALIGNED_BAM=$READ1_ALIGNED_BAM
24 #end if
25 #for $i in $READ1_ALIGNED_BAMs
26 READ1_ALIGNED_BAM=${i.READ1_ALIGNED_BAM_file}
27 #end for
28
29 #if str( $ATTRIBUTES_TO_RETAIN ):
30 ATTRIBUTES_TO_RETAIN=$ATTRIBUTES_TO_RETAIN
31 #end if
32 #for $i in $ATTRIBUTES_TO_RETAINs
33 ATTRIBUTES_TO_RETAIN=${i.ATTRIBUTES_TO_RETAIN_extra}
34 #end for
35
36 #if str( $READ2_ALIGNED_BAM ):
37 READ2_ALIGNED_BAM=$READ2_ALIGNED_BAM
38 #end if
39 #for $i in $READ2_ALIGNED_BAMs
40 READ2_ALIGNED_BAM=${i.READ2_ALIGNED_BAM_file}
41 #end for
42
43 #if str( $PROGRAM_RECORD_ID ):
44 PROGRAM_RECORD_ID=$PROGRAM_RECORD_ID
45 #end if
46
47 #if str( $PROGRAM_GROUP_VERSION ):
48 PROGRAM_GROUP_VERSION=$PROGRAM_GROUP_VERSION
49 #end if
50
51 #if str( $PROGRAM_GROUP_COMMAND_LINE ):
52 PROGRAM_GROUP_COMMAND_LINE=$PROGRAM_GROUP_COMMAND_LINE
53 #end if
54
55 #if str( $PROGRAM_GROUP_NAME ):
56 PROGRAM_GROUP_NAME=$PROGRAM_GROUP_NAME
57 #end if
58
59 #if str( $CLIP_ADAPTERS ):
60 CLIP_ADAPTERS=$CLIP_ADAPTERS
61 #end if
62
63 #if str( $IS_BISULFITE_SEQUENCE ):
64 IS_BISULFITE_SEQUENCE=$IS_BISULFITE_SEQUENCE
65 #end if
66
67 #if str( $ALIGNED_READS_ONLY ):
68 ALIGNED_READS_ONLY=$ALIGNED_READS_ONLY
69 #end if
70
71 #if str( $MAX_INSERTIONS_OR_DELETIONS ):
72 MAX_INSERTIONS_OR_DELETIONS=$MAX_INSERTIONS_OR_DELETIONS
73 #end if
74
75 #if str( $READ1_TRIM ):
76 READ1_TRIM=$READ1_TRIM
77 #end if
78
79 #if str( $READ2_TRIM ):
80 READ2_TRIM=$READ2_TRIM
81 #end if
82
83 #if str( $EXPECTED_ORIENTATIONS ):
84 EXPECTED_ORIENTATIONS=$EXPECTED_ORIENTATIONS
85 #end if
86
87 #if str( $SORT_ORDER ):
88 SORT_ORDER=$SORT_ORDER
89 #end if
90
91 #if str( $PRIMARY_ALIGNMENT_STRATEGY ):
92 PRIMARY_ALIGNMENT_STRATEGY=$PRIMARY_ALIGNMENT_STRATEGY
93 #end if
94
95 #if str( $CLIP_OVERLAPPING_READS ):
96 CLIP_OVERLAPPING_READS=$CLIP_OVERLAPPING_READS
97 #end if
98
99 #if str( $INCLUDE_SECONDARY_ALIGNMENTS ):
100 INCLUDE_SECONDARY_ALIGNMENTS=$INCLUDE_SECONDARY_ALIGNMENTS
101 #end if
102
103 VALIDATION_STRINGENCY=LENIENT TMP_DIR=$__new_file_path__
104 2&gt; $outlog
105 ##|| echo "Error running Picard MergeBamAlignment" >&amp;2
106 </command>
107 <inputs>
108 <!-- required arguments below -->
109 <param name="title" label="Name for the output merged BAM or SAM file" type="text" default="Merged.bam" help="This name will appear in your history so use it to remember what the new file in your history contains" />
110 <param name="outformat" type="select" label="Output format" >
111 <option value="bam" selected="True">BAM</option>
112 <option value="sam">SAM</option>
113 </param>
114 <param name="UNMAPPED_BAM" label="Original SAM or BAM file of unmapped reads, which must be in queryname order. Required." type="data" format="bam,sam" />
115 <param name="REFERENCE_SEQUENCE" label="Path to the fasta file for the reference sequence. Required." type="data" format="fasta" />
116 <param name="PAIRED_RUN" value="true" type="boolean" label="Whether this is a paired-end run. Required." truevalue="true" falsevalue="false" checked="yes" />
117
118 <!-- optional arguments below -->
119
120 <param name="ALIGNED_BAM" label="SAM or BAM file(s) with alignment data. This option may be specified 0 or more times. Cannot be used in conjuction with option(s) READ1_ALIGNED_BAM (R1_ALIGNED) READ2_ALIGNED_BAM (R2_ALIGNED)" type="data" format="bam,sam" help="Need to add more files? Use controls below." />
121 <repeat name="ALIGNED_BAMs" title="More ALIGNED_BAMs">
122 <param name="ALIGNED_BAM_file" label="ALIGNED_BAM" type="data" format="bam,sam" />
123 </repeat>
124 <param name="READ1_ALIGNED_BAM" label="SAM or BAM file(s) with alignment data from the first read of a pair. This option may be specified 0 or more times. Cannot be used in conjuction with option(s) ALIGNED_BAM (ALIGNED)" type="data" format="bam,sam" help="Need to add more files? Use controls below." />
125 <repeat name="READ1_ALIGNED_BAMs" title="More READ1_ALIGNED_BAMs">
126 <param name="READ1_ALIGNED_BAM_file" label="READ1_ALIGNED_BAM" type="data" format="bam,sam" />
127 </repeat>
128 <param name="READ2_ALIGNED_BAM" label="SAM or BAM file(s) with alignment data from the second read of a pair. This option may be specified 0 or more times. Cannot be used in conjuction with option(s) ALIGNED_BAM (ALIGNED)" type="data" format="bam,sam" help="Need to add more files? Use controls below." />
129 <repeat name="READ2_ALIGNED_BAMs" title="More READ2_ALIGNED_BAMs">
130 <param name="READ2_ALIGNED_BAM_file" label="READ2_ALIGNED_BAM" type="data" format="bam,sam" />
131 </repeat>
132
133 <param name="PROGRAM_RECORD_ID" label="The program group ID of the aligner (if not supplied by the aligned file)." type="text" default=""
134 <param name="PROGRAM_GROUP_VERSION" label="The version of the program group (if not supplied by the aligned file)." type="text" default="">
135 <param name="PROGRAM_GROUP_COMMAND_LINE" label="The command line of the program group (if not supplied by the aligned file)." type="text" default="">
136 <param name="PROGRAM_GROUP_NAME" label="The name of the program group (if not supplied by the aligned file)." type="text" default="">
137 <param name="CLIP_ADAPTERS" value="true" type="boolean" label="Whether to clip adapters where identified. Default value: true." truevalue="true" falsevalue="false" checked="yes" />
138 <param name="IS_BISULFITE_SEQUENCE" value="false" type="boolean" label="Whether the lane is bisulfite sequence (used when caculating the NM tag)." truevalue="true" falsevalue="false" checked="yes" />
139 <param name="ALIGNED_READS_ONLY" value="false" type="boolean" label="Whether to output only aligned reads." truevalue="true" falsevalue="false" checked="yes" />
140 <param name="MAX_INSERTIONS_OR_DELETIONS" value="1" type="integer"
141 label="The maximum number of insertions or deletions permitted for an alignment to be included."
142 help="Alignments with more than this many insertions or deletions will be ignored. Set to -1 to allow any number of insertions or deletions. Default value: 1." />
143
144 <param name="ATTRIBUTES_TO_RETAIN" label="Reserved alignment attributes (tags starting with X, Y, or Z) that should be brought over from the alignment data when merging. This option may be specified 0 or more times." type="text" default="">
145 <repeat name="ATTRIBUTES_TO_RETAINs" title="More ATTRIBUTES_TO_RETAIN">
146 <param name="ATTRIBUTES_TO_RETAIN_extra" label="ATTRIBUTES_TO_RETAIN" type="text" default="" />
147 </repeat>
148 <param name="READ1_TRIM" value="0" type="integer" label="The number of bases trimmed from the beginning of read 1 prior to alignment"/>
149 <param name="READ2_TRIM" value="0" type="integer" label="The number of bases trimmed from the beginning of read 2 prior to alignment"/>
150 <param name="EXPECTED_ORIENTATIONS" label="The name of the program group (if not supplied by the aligned file)." type="select">
151 <option value="null" selected="True">null</option>
152 <option value="FR">FR</option>
153 <option value="RF">RF</option>
154 <option value="TANDEM">TANDEM</option>
155 </param>
156 <param name="SORT_ORDER" label="The order in which the merged reads should be output. Default value: coordinate." type="select">
157 <option value="coordinate" selected="True">coordinate</option>
158 <option value="queryname">queryname</option>
159 <option value="unsorted">unsorted</option>
160 </param>
161 <param name="PRIMARY_ALIGNMENT_STRATEGY" label="Strategy for selecting primary alignment when the aligner has provided more than one alignment for a pair or fragment, and none are marked as primary, more than one is marked as primary, or the primary alignment is filtered out for some reason." type="select" help="BestMapq expects that multiple alignments will be correlated with HI tag, and prefers the pair of
162 alignments with the largest MAPQ, in the absence of a primary selected by the aligner. EarliestFragment prefers the alignment which maps the earliest base in the read. Note that EarliestFragment may not be used for paired reads. BestEndMapq is appropriate for cases in which the aligner is not pair-aware, and does not output the HI tag. It simply picks the alignment for each end with the highest MAPQ, and makes those alignments primary, regardless of whether the two alignments make sense together.MostDistant is also for a non-pair-aware aligner, and picks the alignment pair with the largest insert size. If all alignments would be chimeric, it picks the alignments for each end with the best MAPQ. For all algorithms, ties are resolved arbitrarily. Default value: BestMapq.">
163 <option value="BestMapq" selected="True">BestMapq</option>
164 <option value="EarliestFragment">EarliestFragment</option>
165 <option value="BestEndMapq">BestEndMapq</option>
166 <option value="MostDistant">MostDistant</option>
167 </param>
168
169 <param name="CLIP_OVERLAPPING_READS" value="true" type="boolean" label="For paired reads, soft clip the 3' end of each read if necessary so that it does not extend past the 5' end of its mate." truevalue="true" falsevalue="false" checked="yes" />
170 <param name="INCLUDE_SECONDARY_ALIGNMENTS" value="true" type="boolean" label="If false, do not write secondary alignments to output." truevalue="true" falsevalue="false" checked="yes" />
171 </inputs>
172
173 <outputs>
174 <data format="bam" name="output1" label="${title}.${outformat}" >
175 <change_format>
176 <when input="outformat" value="sam" format="sam" />
177 </change_format>
178 </data>
179 </outputs>
180 <tests>
181 <!-- note: this test is untested :) -->
182 <test>
183 <param name="REFERENCE_SEQUENCE" value="merger.fasta" />
184 <param name="UNMAPPED_BAM" value="unmapped.sam" />
185 <param name="PAIRED_RUN" value="false" />
186 <param name="outformat" value="sam" />
187 <output name="output1" file="output_mergebamalignment" lines_diff="1"/>
188 </test>
189 </tests>
190 <help>
191
192 **What it does**
193
194 Merges alignment data from a SAM or BAM file with additional data stored in an unmapped BAM file and produces a third SAM or BAM file of aligned and unaligned reads. NOTE that this program expects to find a sequence dictionary in the same directory as REFERENCE_SEQUENCE and expects it to have the same base name as the reference fasta except with the extension '.dict'
195 metadata such as read groups
196
197 .. _Picard: http://picard.sourceforge.net/command-line-overview.shtml#MergeBamAlignment
198
199
200 </help>
201 </tool>