schneebergerlab / syri

Synteny and Rearrangement Identifier
https://schneebergerlab.github.io/syri/
MIT License
323 stars 35 forks source link

ERROR - Incorrect CIGAR string found #196

Closed Jokendo-collab closed 1 year ago

Jokendo-collab commented 1 year ago

I am getting the following error even though I followed the minimap2 aligmnent and sorted my bam file. How can I go around this?

syri -c macOpe2.sorted.bam -r Betta_splendens.fa -q macOpe2.fasta -F B --prefix Betta_macOpe2 --dir syri/
Reading BAM/SAM file - ERROR - Incorrect CIGAR string found. CIGAR string can only have I/D/H/S/X/=. CIGAR STRING: 6879966H441M13805544H
marade commented 1 year ago

Same error here. Note that error continues to happen even if you 'fix' your SAM file with something like this:

awk '{gsub("M","=",$6)}1'

Of course 'M' is perfectly valid CIGAR in the SAM specification, so this error shouldn't happen.

mnshgl0110 commented 1 year ago

Duplicated https://github.com/schneebergerlab/syri/issues/180

asan-emirsaleh commented 5 months ago

error continues to happen

@marade try replacing delimiter to "\t" -F $'\t' did not work but 'BEGIN { FS=OFS="\t" } <expression>' did the job.

mnshgl0110 commented 5 months ago

@asan-emirsaleh this will probably result in incorrect output. Recommended strategy is to run minimap2 with the --eqx option.