This is a test version of Biostars. For the public version, visit https://www.biostars.org.
.bam format is not enough for mapped long reads

Hello,

After mapping Nanopore reads to reference genome with ngmlr, I converted the output to .bam with samtools and found that some part of information about mapping in CIGAR string was lost.

I tried to map again with using --bam-fix function of ngmlr, and now I don't really understand how to process my output .sam files (I am going to search for structural variations).

I tried to convert these fixed .sam files to .bam with samtools, and received an error:

[W::sam_read1] Parse error at line 347854
[main_samview] truncated file.

Which software I can proceed my data? Maybe there is another data format for long read data I don't know?

Many thanks, Anastasiia

alignment

Did the suggestion solve the problem? If so please mark the answer as accepted.

1 answer

Make sure you're using the most recent version of samtools, as support for very high numbers (>64k) of CIGAR operations was only relatively recently added to the BAM specification. Alternatively, use the CRAM format.

Log in to answer this question.