remove CIGAR strings starting with insertion
1
0
Entering edit mode
23 months ago
drabiza1 ▴ 20

I'm trying to use mutato (https://github.com/annalam/mutato) to perform somatic variant calling on BAM files aligned with BWA.

mutato call --alt-reads=5 --alt-frac=0.05 hg19.fa sample.bam > variants.vcf

I get the follow error:

ERROR: CIGAR strings starting with insertion are not supported

What can I do to change the Bam file to avoid this error?

Variant-Calling cfDNA CIGAR mutato • 1.1k views
ADD COMMENT
0
Entering edit mode

Have you tried asking the author? You might be able to use pysam to filter alignments based on CIGAR strings with insertions (cigarType == 1). You could also probably use bioalcidaejdk, which has methods for parsing CIGAR strings.

ADD REPLY
3
Entering edit mode
23 months ago
cmdcolin ★ 4.0k

I made a small program, kind of reverse engineered from mutato source code itself, that makes a new BAM file free of the "bad" CIGAR strings starting with insertion/deletion. it was fun to learn a little bit of rust to make this work https://github.com/cmdcolin/filter_cigars

i only briefly tested it but seemed like it worked on a basic CIGAR that I provided it with

maybe a fix could be applied to mutato source code directly, it could be worth reporting to them that tools like BWA output this type of thing naturally. that said, "insertions/deletions at the 0 position" seem more like they should be e.g. soft clipping. maybe you could check that you are using the latest bwa for example to see that this wasn't fixed in bwa.

ADD COMMENT
0
Entering edit mode

I see probably this may have been fixed already, but was a fun exercise nonetheless https://github.com/annalam/mutato/issues/1

ADD REPLY

Login before adding your answer.

Traffic: 1953 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6