I know there are a few threads on this topic but I can't seem to find the answer to my particular problem!
I am merging BAM files from 8 lanes of sequencing, they are all the same sample, I want to end up with one file with all my sample data in it to use GATK downstream, which requires the RG tags.
So how to I generate the RG tags at samtools merge when all my files are the same sample? The example in the documentation :
perl -e 'print "@RG\tID:ga\tSM:hs\tLB:ga\tPL:Illumina\n@RG\tID:454\tSM:hs\tLB:454\tPL:454\n"' > rg.txt
samtools merge -rh rg.txt - ga.bam 454.bam | samtools rmdup - - | samtools rmdup -s - aln.bam
tags alignments from each input file separately,
where I have lane1_sorted.bam, lane2_sorted.bam... etc
I'm sure its something quite simple, any tips would be appreciated!
Thanks.
I am merging BAM files from 8 lanes of sequencing, they are all the same sample, I want to end up with one file with all my sample data in it to use GATK downstream, which requires the RG tags.
So how to I generate the RG tags at samtools merge when all my files are the same sample? The example in the documentation :
perl -e 'print "@RG\tID:ga\tSM:hs\tLB:ga\tPL:Illumina\n@RG\tID:454\tSM:hs\tLB:454\tPL:454\n"' > rg.txt
samtools merge -rh rg.txt - ga.bam 454.bam | samtools rmdup - - | samtools rmdup -s - aln.bam
tags alignments from each input file separately,
where I have lane1_sorted.bam, lane2_sorted.bam... etc
I'm sure its something quite simple, any tips would be appreciated!
Thanks.
Comment