eldariont / svim-asm

Structural Variant Identification Method using Genome Assemblies
GNU General Public License v3.0
92 stars 11 forks source link

error: CIGAR length too long at position 1 #8

Closed atongsa closed 3 years ago

atongsa commented 3 years ago

i get this error from

minimap2 -a -x asm10  --cs -r2k -t $n_thr $ref_fa $query_fa > o.sam
samtools sort  o.sam

may i add the -L option in minimap2 to solve the problem

eldariont commented 3 years ago

Hi,

sure, the -L option solves some problems with long CIGAR strings so you can try. If problems persist you might want to contact the developers of samtools or minimap2 as this is not a SVIM-asm issue as far as I can tell.

Best David

WimSpee commented 2 years ago

Hi,

Thank you for the very nice SVIM-ASM tool. I ran into the same issue. This is also not considered a minimap2 issue, just a limitation of the BAM format. https://github.com/lh3/minimap2/issues/440

I did not try the -L option yet with minimap2. I will try that.

I tried to find if CRAM format would be a workaround. Since the alignments are stored differently in CRAM then in BAM. But CRAM is not yet supported by SVIM-ASM as far as I can tell.

Maybe you know if CRAM format fixes this issue and if CRAM support in SVIM-ASM would be possible?

Thank you.

Wim

WimSpee commented 2 years ago

Or maybe a SAM reader could be add to SVIM-ASM? This for example has been done in Syri. https://github.com/schneebergerlab/syri

WimSpee commented 2 years ago

CRAM also seems to not have this issue. https://github.com/lh3/minimap2/issues/16

WimSpee commented 2 years ago

@eldariont Could you please have a look if it is possible to have SVIM-ASM read in SAM or CRAM files to fix the "too long CIGAR" issue? See also the above comments and links.

Thank you.