This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Adding Read Groups to Merged Bams

Hi all,

I am currently processing my .bam files using Picard and GATK. However, I have come across the missing read group error, and realised that I have either lost, or never assigned read group information when using BWA to map my reads to the reference. I have already merged by .bam files for each individual in my study.

My question is whether it's appropriate to use Picard's AddOrReplaceReadGroups function to add read groups to merged bams? Typically, each individual is made up of read from around 6 different lanes, and it appears that this data was generated using several different sequencing platforms.

Please let me know if more information is necessary to determine whether or not my position is salvageable.

Thanks for your time.

picard rg read group

1 answer

ypically, each individual is made up of read from around 6 different lanes, and it appears that this data was generated using several different sequencing platforms.

I don't think can can do this with picard:

see also Advice On Adding Readgroups

I wrote this : http://lindenb.github.io/jvarkit/Biostar78400.html

I haven't used it much, but it looks like what you need.

Thanks for the speedy response. Damn, such a small oversight on my part to not include '-R' in the BWA script, and weeks of work undone.

Thanks for the tool too, but I think I'm going to go back and map the reads again but with the proper read groups.

If an answer was helpful you should upvote it, if the answer resolved your question you should mark it as accepted. Upvote|Bookmark|Accept

Log in to answer this question.