Entering edit mode
3.0 years ago
taniamahmood38
▴
60
Dear all,
I am dealing with a single bam file that consist of 12 individuals. I want to add read group information for every individual. Kindly guide me how to do that? To add, I have currently added the @RG tag using the command
samtools addreplacerg -r "@RG\tID:A22\tSM:TAN01\tPO:TAN\tPL:Illumina\tLB:TAN-Lib" -o output.bam input.bam
Viewing the RG tag in the header looks like this
samtools view -H output.bam | grep '^@RG'
@RG ID:A22 SM:TAN01 PO:TAN PL:Illumina LB:TAN-Lib
Actually, I am using this bam file as an input in popbam. However, it gives me an error that says :-
popbam runtime error:
Problem assigning read group A22 to a sample.
Please check BAM header for correct SM and PO tags
In popbam.cpp on line 239
Exiting program
Please help me out in resolving this issue either its because something wrong in my @RG tag or Is there anything else which I am missing? Any help would be highly appreciated.
Thanks in advance
This is not as much a RG question but a popbam question,
I looked at the documentation, to me it seems that popbam is an old tool and even the example uses what would be invalid readgroups:
http://popbam.sourceforge.net/
try making your readgroups match the above with no other tags, only the ones you see here
Thank you. I have tried it but same error.
can you paste here the whole SAM header? the line that raises the error is unable to parse the readgroup and fails - this the hunch is still it is some sort of header readgroup format error.
This is my bam header