Error in sam output

Issue #67 resolved
brbloemen created an issue

Hi,

In a recent run I encountered an error in the sam output of the kma tool, when using a nanopore read fastq dataset.

kma -i input.fastq -o output -t_db $Resfinderdb -tmp $workdir -mem_mode -bc 0.7 -bcNano -ID 0.0 -ef -proxi 0.9 -na -nc -nf -ca -verbose 2 -t 20 -sam > $output_filename.sam

When viewing the file with samtools, I get the following error:
[E::sam_parse1] CIGAR and query sequence are of different length
[W::sam_read1] Parse error at line 2011353
[main_samview] truncated file.

As you can see, the CIGAR is quite strange. For reference, here is line 2011353 of the sam file:
6c0f6be1-bc81-466a-a86e-e42d5607f833 runid=0434f31a022f62bd20d64be228573a158fbf03a6 sampleid=no_sample read=510619 ch=14 start_time=2022-07-02T19:15:34Z 0 ant(6)-Ia_5_AB247327 21 169 154546484S * 0 293 GATGGATTTAGTACTTTTAGCAGAACAGGATGAACGTATTCGAATTGTGACCCTTGAGGGGTCACGCGCAAATATTAATATACCTAAGGATGAATTCCAGGATTATGATGTCACATACTTCGTAATAGATGTGGAATCCTTTACTTTAAAGGATGTTCACTGCATGAAAGCTTCGGGAATATTATAATGATGCAAAACCGGAGGATATGGAACTATTCCCGGCTGAAGAGAAGCGTCACTCCTATAATACTTTTGATGATTATAATAAAATAATAGACCTACCTTATTGCC * ET:i:3 AS:i:140

Do you have any idea what caused this problem?

Many thanks,

Bram

Update: I noticed that running the same command with addition of the -1t1 option doesn’t produce the error.

Comments (6)

  1. ptlcc

    Hi Bram

    It seems that there were a bug in the softclipping of alignments in the sam-output, it should be fixed in version 1.4.4.

    I have also added an ONT preset option (“-ont“) for gene finding in nanopore data.

    Best,
    Philip

  2. brbloemen reporter

    Hi Philip,

    Thank you!

    I will update to the latest version, and try again.

    Thank you,

    Bram

  3. Log in to comment