Holiday Notice:
The Frontline Support team will be slow to respond December 17-18 due to an institute-wide retreat and offline December 22- January 1, while the institute is closed. Thank you for your patience during these next few weeks. Happy Holidays!

bam is malformed depthofcoverage

remimaglioneremimaglione Member
edited May 2013 in Ask the GATK team

Hello,

i have spend many hours trying to run GATK depthofcoverage but it never works.
last try: -T DepthOfCoverage -R /home/remi/Analyse/CNV/ERR125905/bam/Chloroplastgenomebarley.fa -I /home/remi/Analyse/CNV/ERR125905/bam/ERfiltre.bam -L /home/remi/Analyse/CNV/ERR125905/bam/ERfiltre.bed -o /home/remi/Analyse/CNV/FishingCNV_1.5.3/out/ERfiltre.bam.coverage --minMappingQuality 15 --minBaseQuality 10 --omitDepthOutputAtEachBase --logging_level INFO --summaryCoverageThreshold 5 --summaryCoverageThreshold 7 --summaryCoverageThreshold 10 --summaryCoverageThreshold 15 --summaryCoverageThreshold 20 --summaryCoverageThreshold 30 --summaryCoverageThreshold 50

My BAM header seem to be malformed.

ERROR MESSAGE: SAM/BAM file /home/remi/Analyse/CNV/ERR125905/bam/ERfiltre.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

here is the 1rst line of the header:

`@SQ SN:Chloroplastgenomebarley LN:136462

@PG ID:bwa PN:bwa VN:0.5.9-r16
ERR125905.35 99 Chloroplastgenomebarley 69543 29 101M = 69854 412 TTTGATCCCTCTGATCCTGTTCTGGATCCAATGTGGAGACAAGGTATGTTCGTAATTCCCTTCATGACTCGTTTAGGAATAACGGATCCTTGGGGTGGTTG D-:D?BDDDDCC-?ADCBBBDDDDD:BDD= :6 C-4<[email protected]@@<;:?=B??B=DC28=B&?:AA:4
@ [email protected]@DDD?B::@-CA:5?:ADD?ADBB??`

I Have search in the forum and doc about it. I have try to reorder my header with picard:

`@HD VN:1.4 SO:unsorted

@SQ SN:Chloroplastgenomebarley LN:136462 UR:file:/home/remi/Analyse/REFGEN/Chloroplastgenomebarley.fa M5:7a7b36ef01cc1a2af1c8451ca3800f93
@PG ID:bwa PN:bwa VN:0.5.9-r16
ERR125905.35 99 Chloroplastgenomebarley 69543 29 101M = 69854 412 TTTGATCCCTCTGATCCTGTTCTGGATCCAATGTGGAGACAAGGTATGTTCGTAATTCCCTTCATGACTCGTTTAGGAATAACGGATCCTTGGGGTGGTTG D-:D?BDDDDCC-?ADCBBBDDDDD:BDD= :6 C-4<[email protected]@@<;:?=B??B=DC28=B&?:AA:4
@ [email protected]@DDD?B::@-CA:5?:ADD?ADBB??
`
but no more change.

Someone can help me please ?

Regards,
Remi

`

Answers

  • CarneiroCarneiro Charlestown, MAMember admin

    You need to add a read group tag to your BAM to use it with the GATK. During BWA alignment (which you're using a very old version, btw) you could have added it with the -R option. Now you can still use Picard Tools to add a read group to your bam file. Without a Read Group tag, no GATK tool will run on your bam.

  • remimaglioneremimaglione Member

    thank you for your reply,
    you're right, I did not use the-R option on my alignment with BWA.
    I'll go back on it later to tell you if all goes well.

  • remimaglioneremimaglione Member
    edited May 2013

    After a new alignment, i have had manualy the header with picard tools in my SAM (after read filter and before SAM to BAM conversion). I have try a CountRead in order to test if GATK can run my new BAM... and it works FINE. I will try to do a depthOfcoverage and tell later if all goes well.

Sign In or Register to comment.