Problem assigning read group to a sample
0
0
Entering edit mode
2.2 years ago

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

RG_tag popbam bam pooled-seq • 805 views
ADD COMMENT
1
Entering edit mode

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/

@RG  ID:R22  SM:MEL01  PO:MEL
@RG  ID:R25  SM:MEL02  PO:MEL
@RG  ID:R21  SM:SIM01  PO:SIM

try making your readgroups match the above with no other tags, only the ones you see here

ADD REPLY
0
Entering edit mode

Thank you. I have tried it but same error.

ADD REPLY
1
Entering edit mode

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.

ADD REPLY
0
Entering edit mode

This is my bam header

@PG     ID:bwa  PN:bwa  VN:0.7.13-r1126 CL:bwa mem -t 8 -R @RG\tID:HJ77GBB.3\tSM:TAN01\tPL:Illumina\tLB:TAN-Lib -M /data/references/goat2/ARS1/ARS1 Pool_TAN_S7_L003_R1_001_filtered.fastq.gz Pool_TAN_S7_L003_R2_001_filtered.fastq.gz
@PG     ID:GATK IndelRealigner  VN:3.7-0-gcfedb67       CL:knownAlleles=[] targetIntervals=TAN_realigntarget_intervals.list LODThresholdForCleaning=5.0 consensusDeterminationModel=USE_READS entropyThreshold=0.15 maxReadsInMemory=150000 maxIsizeForMovement=3000 maxPositionalMoveAllowed=200 maxConsensuses=30 maxReadsForConsensuses=120 maxReadsForRealignment=20000 noOriginalAlignmentTags=false nWayOut=null generate_nWayOut_md5s=false check_early=false noPGTag=false keepPGTags=false indelsFileForDebugging=null statisticsFileForDebugging=null SNPsFileForDebugging=null
@PG     ID:MarkDuplicates       VN:2.2.1(0256353d7b82ebcf56297abbc510da47a2ddfc0c_1459895860)   CL:picard.sam.markduplicates.MarkDuplicates INPUT=[TAN_realigned.bam] OUTPUT=TAN_dedup.bam METRICS_FILE=TAN_dedup_matrics.txt ASSUME_SORTED=true OPTICAL_DUPLICATE_PIXEL_DISTANCE=2500    MAX_SEQUENCES_FOR_DISK_READ_ENDS_MAP=50000 MAX_FILE_HANDLES_FOR_READ_ENDS_MAP=8000 SORTING_COLLECTION_SIZE_RATIO=0.25 REMOVE_SEQUENCING_DUPLICATES=false TAGGING_POLICY=DontTag REMOVE_DUPLICATES=false DUPLICATE_SCORING_STRATEGY=SUM_OF_BASE_QUALITIES PROGRAM_RECORD_ID=MarkDuplicates PROGRAM_GROUP_NAME=MarkDuplicates READ_NAME_REGEX=<optimized capture of last three ':' separated fields as numeric values> VERBOSITY=INFO QUIET=false VALIDATION_STRINGENCY=STRICT COMPRESSION_LEVEL=5 MAX_RECORDS_IN_RAM=500000 CREATE_INDEX=false CREATE_MD5_FILE=false GA4GH_CLIENT_SECRETS=client_secrets.json  PN:MarkDuplicates
@PG     ID:samtools     PN:samtools     PP:bwa  VN:1.10 CL:samtools addreplacerg -r @RG\tID:A22\tSM:TAN01\tPO:TAN -o TAN_dedupRG.bam TAN_dedup.bam
@PG     ID:samtools.1   PN:samtools     PP:GATK IndelRealigner  VN:1.10 CL:samtools addreplacerg -r @RG\tID:A22\tSM:TAN01\tPO:TAN -o TAN_dedupRG.bam TAN_dedup.bam
@PG     ID:samtools.2   PN:samtools     PP:MarkDuplicates       VN:1.10 CL:samtools addreplacerg -r @RG\tID:A22\tSM:TAN01\tPO:TAN -o TAN_dedupRG.bam TAN_dedup.bam
@PG     ID:samtools.3   PN:samtools     PP:samtools     VN:1.10 CL:samtools addreplacerg -r @RG\tID:A22\tSM:TAN01\tPO:TAN -o TAN_dedupRG.bam TAN_dedup.bam
@PG     ID:samtools.4   PN:samtools     PP:samtools.1   VN:1.10 CL:samtools addreplacerg -r @RG\tID:A22\tSM:TAN01\tPO:TAN -o TAN_dedupRG.bam TAN_dedup.bam
@PG     ID:samtools.5   PN:samtools     PP:samtools.2   VN:1.10 CL:samtools addreplacerg -r @RG\tID:A22\tSM:TAN01\tPO:TAN -o TAN_dedupRG.bam TAN_dedup.bam
@PG     ID:samtools.6   PN:samtools     PP:samtools.3   VN:1.10 CL:samtools view -H TAN_RG.bam
@PG     ID:samtools.7   PN:samtools     PP:samtools.4   VN:1.10 CL:samtools view -H TAN_RG.bam
@PG     ID:samtools.8   PN:samtools     PP:samtools.5   VN:1.10 CL:samtools view -H TAN_RG.bam
@RG     ID:A22  SM:TAN01        PO:TAN
(END)
ADD REPLY

Login before adding your answer.

Traffic: 1460 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6