Hello All,
I have bams with multiple samples. I couldnot figure out a way to split them to individual sample bams. Below is the RG tags of my BAM.
According to SM tag, it can be seen that the sample IDs are T9C, T9B, T9A. Can samtools view command do this. Tried with samtools view , but was not successful.
@RG ID:1 PL:ILLUMINA PU:D09B5ACXX.8-BG1.G LB:JV21 DS:capture_id:IS0007,seq_library_id:LID46212,seq_run_id:RD2189A DT:2011-11-21T00:00:00-0500 SM:T9C CN:Center
@RG ID:1.1 PL:ILLUMINA PU:D09B5ACXX.8-BG1.F LB:JV20 DS:capture_id:IS0007,seq_library_id:LID46212,seq_run_id:RD2189A DT:2011-11-21T00:00:00-0500 SM:T9B CN:Center
@RG ID:1.1.1 PL:ILLUMINA PU:D0BK3ACXX.6-BG1.G LB:JV21 DS:capture_id:IS0005-0007,seq_library_id:LID46914,seq_run_id:RD2200B DT:2011-12-02T00:00:00-0500 SM:T9C CN:Center
@RG ID:1.1.2 PL:ILLUMINA PU:D0BK3ACXX.6-BG1.F LB:JV20 DS:capture_id:IS0005-0007,seq_library_id:LID46914,seq_run_id:RD2200B DT:2011-12-02T00:00:00-0500 SM:T9B CN:Center
@RG ID:1.1.3 PL:ILLUMINA PU:D0BK3ACXX.6-BG1.E LB:JV19 DS:capture_id:IS0005-0007,seq_library_id:LID46914,seq_run_id:RD2200B DT:2011-12-02T00:00:00-0500 SM:T9A CN:Center
@RG ID:1.2 PL:ILLUMINA PU:D09B5ACXX.8-BG1.E LB:JV19 DS:capture_id:IS0007,seq_library_id:LID46212,seq_run_id:RD2189A DT:2011-11-21T00:00:00-0500 SM:T9A CN:Center
Help appreciated,
Thanks,
Tinu
Can you print first two lines (nom-header) from your bam file?
Here are the first two non header lines from the bam