|
From: Martin, J. L. <Jes...@tu...> - 2014-12-09 04:08:01
|
Hello, I have a bunch of bam files with read groups that I am hoping to merge with the goal of using GATK in the next steps. I have been using this command to merge them: samtools merge -rh rg.txt merge.bam *_q20_sort.bam where rg.txt is a tab delimited file that contains the read group information for each of the bam files. (I am following instructions found in the Simple Fool's Guide to Population Genomics at http://sfg.stanford.edu/guide.html) However, when I do this, there are no read groups in the header of the merged file, and GATK consequently doesn't work. (GATK gives me the error message "SAM/BAM file merged.bam is malformed: SAM file doesn't have any read groups defined in the header.") Any advice would be much appreciated! Thanks, Jessie |