I'm having trouble running a BAM file through GATK. I got this error:
##### ERROR MESSAGE: SAM/BAM file reanalysis.bam is malformed: SAM file doesn't have any read groups defined in the header. The GATK no longer supports SAM files without read groups
So i figure I need to replace the header. I checked the header with samtools view -h, and I see an extremely long list that starts like this:
@HD VN:1.0 SO:unsorted
@PG ID:novoalign PN:novoalign VN:V2.08.02 CL:novoalign -o SAM -d ./reference/chok1ref.nix -f ./cho9/reads.fq
@SQ SN:gi|351517969|ref|NW_003613580.1| AS:chok1ref.nix LN:8779783
and continues with many @SQ lines
I tried fixing the header with Picard using
But that didn't seem to generate an output file, and I did just put the same thing in every field there, so I'm a little unsure about it.
So, is it possible to fix the header? If so, what am I missing? If not, do I just need to do the alignment over again and properly set the header using something like:
Help is greatly appreciated!
##### ERROR MESSAGE: SAM/BAM file reanalysis.bam is malformed: SAM file doesn't have any read groups defined in the header. The GATK no longer supports SAM files without read groups
So i figure I need to replace the header. I checked the header with samtools view -h, and I see an extremely long list that starts like this:
@HD VN:1.0 SO:unsorted
@PG ID:novoalign PN:novoalign VN:V2.08.02 CL:novoalign -o SAM -d ./reference/chok1ref.nix -f ./cho9/reads.fq
@SQ SN:gi|351517969|ref|NW_003613580.1| AS:chok1ref.nix LN:8779783
and continues with many @SQ lines
I tried fixing the header with Picard using
Code:
java -jar picard/AddOrReplaceReadGroups.jar INPUT=cho9/cho9output.bam OUTPUT=cho9/cho9outputH.bam RGID=RSNS002 RGLB=RSNS002 RGPL=illumina RGPU=RSNS002 RGSM=RSNS002
So, is it possible to fix the header? If so, what am I missing? If not, do I just need to do the alignment over again and properly set the header using something like:
Code:
bwa samse -f out.sam -r "@RQ\tID:<ID>\tLB:<LIBRARY_NAME>\tSM:<SAMPLE_NAME>\tPL:ILLUMINA" hg19 input1.sai input2.sai input1.fq input2.fq
Comment