Tagged with #badcigarfilter
1 documentation article | 0 announcements | 3 forum discussions

Created 2012-07-23 23:54:57 | Updated 2012-07-23 23:54:57 | Tags: badcigarfilter gatkdocs
Comments (0)

A new tool has been released!

Check out the documentation at BadCigarFilter.

No posts found with the requested search criteria.

Created 2014-12-09 12:16:17 | Updated | Tags: badcigarfilter haplotypecaller readfilter
Comments (2)

Dear GATK Team, If I specify a read filter using the -rf option, is that read filter added to the filters applied by default, or will that then be the only filter that is applied (so I would also need to specify the defaults to ensure they were all run.

e.g. I want to add a bad cigar filter...

-rf BadCigar

But I also want the default filters applied, namely: - NotPrimaryAlignmentFilter - FailsVendorQualityCheckFilter - DuplicateReadFilter - UnmappedReadFilter - MappingQualityUnavailableFilter - HCMappingQualityFilter - MalformedReadFilter

Created 2013-05-13 13:56:34 | Updated | Tags: badcigarfilter haplotypecaller
Comments (4)

I'm running into a HaplotypeCaller issue with the latest release (2.5-2) using Novoalign input reads. Here's a small reproducible input file:



java -Xms750m -Xmx3g -jar GenomeAnalysisTK.jar -R GRCh37.fa -I
problem_cigar.bam -L 4:120371315-120371586 -T HaplotypeCaller -o out.vcf
--read_filter BadCigar -debug

Errors out with:

org.broadinstitute.sting.utils.exceptions.ReviewedStingException: START (0) >
(-1) STOP -- this should never happen, please check read:
HWI-ST1124:106:C15APACXX:1:1107:15450:87092 2/2 58b aligned read. (CIGAR: 38H4D58M)

Looking at the read, the CIGAR string appears to be tricking the BadCigar filter, since it has a 0M element between an insertion and deletion:


This patch fixes the BadCigar filter by only considering CIGAR elements with non-zero length:


With this applied, the read will be properly filtered and HaplotypeCaller can continue without a problem. Hope this helps, please let me know if any other detail about the problem would be helpful.

Created 2012-08-16 00:00:19 | Updated 2012-08-16 00:00:19 | Tags: badcigarfilter
Comments (9)


I have a bam file where few reads have CIGAR strings that start with Deletions. For example: 440H1D33M1I1D33M. I am trying to execute BaseRecalibrator (2.0 beta) on this file. However, I see an error below:

"##### ERROR MESSAGE: SAM/BAM file SAMFileReader{/home/datarig/CGP/GatkAnalysis/NG_2012_05_10_v2.6/WithGATK2.0/with_SamV2/NG_R1/test.ordered.sorted.realigned.bam} is malformed: Read starting with de letion. Cigar: 440H1D33M1I1D33M. This is an indication of a malformed file, but the SAM spec allows reads starting in deletion. If you are sure you want to use this read, re-run your analysis with the extra option: -rf BadCigar"

However if I use the -rf BadCigar filter, I still get the same error. The command I used is pasted below.

"java -Xmx4g -jar GenomeAnalysisTK.jar -T BaseRecalibrator -I test.bam -R ucsc.hg19.fasta -knownSites dbsnp_135.hg19.vcf -o recal_data.grp -rf BadCigar"

Could you please let me know what I am doing wrong?