You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wanted to ask how MergeBamAlignment deals with conflicting header information. Specifically if the unmapped BAM and mapped BAM have different @rg tags in the header then how does it resolve? I do not see this in documentation.
My issue is that I add @rg tag information during alignment with BWA-MEM. But when I use mergebamalignment while the reads retain the @rg ID the header changes the @rgid to the unmapped BAM. Therefore the read group IDs of the actual reads is different than the header. I have three screen shots below of this.
I don't see any documentation of how to deal with conflicting headers - I know a workaround is to change the readgroups with AddOrReplace read groups after MergeBamAlignmnet but I would rather do this at the level of MergeBamAlignment
MergeBamAlignment should throw an error message when the BAM files have conflicting @rg tags in the headers.
This request was created from a contribution made by TA on March 04, 2022 15:13 UTC.
Link: https://gatk.broadinstitute.org/hc/en-us/community/posts/4532746666523-MergeBamAlignment-conflicting-headers-between-mapped-and-unmapped
--
Hi,
I wanted to ask how MergeBamAlignment deals with conflicting header information. Specifically if the unmapped BAM and mapped BAM have different @rg tags in the header then how does it resolve? I do not see this in documentation.
My issue is that I add @rg tag information during alignment with BWA-MEM. But when I use mergebamalignment while the reads retain the @rg ID the header changes the @rgid to the unmapped BAM. Therefore the read group IDs of the actual reads is different than the header. I have three screen shots below of this.
I don't see any documentation of how to deal with conflicting headers - I know a workaround is to change the readgroups with AddOrReplace read groups after MergeBamAlignmnet but I would rather do this at the level of MergeBamAlignment
This question is similar but doesn't say how it resolves this conflict: https://gatk.broadinstitute.org/hc/en-us/community/posts/4406765311515-Read-group-info-in-mapped-and-unmapped-bam-files?input\_string=MergeBamAlignment%20conflicting%20headers%20between%20mapped%20and%20unmapped
Thank you!
After merge bam alignment RG
BWA-MEM mapped RG
Unmapped read group
My version of GATK is 4.2.1.0
My MergeBamAlignment command was
gatk MergeBamAlignment Aligned=sorted_mapped_group"$read_batch_num".bam UNMAPPED=sorted_unmapped_group"$read_batch_num".bam o=bam_aligned_"$read_batch_num".bam R=~/evronylab/reference-files/hg38-gatk/Homo_sapiens_assembly38.fasta
(created from Zendesk ticket #275269)
gz#275269
The text was updated successfully, but these errors were encountered: