ngmlr
ngmlr copied to clipboard
Bugs when mapping reads with number of CIGAR operations > 64k
Hi philres:
I am using NGMLR for maping ultro long nanopore reads. here is my NGMLR and SAMTOOLS version
ngmlr --version
ngmlr 0.2.7 (build: Jul 2 2018 10:32:15, start: 2018-09-10.12:02:26)
Contact: [email protected]
samtools --version
samtools 1.9
Using htslib 1.9
Copyright (C) 2018 Genome Research Ltd.
And here is my commands to run ngmlr:
ngmlr -q input.fastq -r ref.hg38.fa -t 28 -x ont --bam-fix | samtools sort -@ 28 -o sorted.bam -
log
Skipping alignment 0 for 914f8a2b-6215-49f9-9be3-941e86ad35d1: number of CIGAR operations 72571 > 64k.
samtools sort error
[E::sam_parse1] incomplete aux field
[W::sam_read1] Parse error at line 3369
samtools sort: truncated file. Aborting
I have tried to output BAM when I run NGMLR and then sort the BAM file by samtools, get the same ERROR as above
Hi!
Could you send me the reads or a couple of reads that cause this problem?
Thanks, Philipp
Have you tried the --bam-fix flag?
Best,
Mike
On Tue, Sep 11, 2018 at 2:23 PM Philipp Rescheneder < [email protected]> wrote:
Hi!
Could you send me the reads or a couple of reads that cause this problem?
Thanks, Philipp
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/philres/ngmlr/issues/51#issuecomment-420372013, or mute the thread https://github.com/notifications/unsubscribe-auth/AAL985WN3yjF-eOeZvx-ybBYUXp1S4-Kks5uZ_-agaJpZM4WgtZV .
Yeah its included in his call. Could you check if your output sam file from NGMLR has \t at the end of the line?
Thanks Fritz
Philipp: Can I sent the reads to this email? [email protected]
You can just attach it here if you press "selecting them" below the text box.
Alternatively, please send it to [email protected]. My old university address doesn't work anymore (I'll have to update the address here).
Thanks, Philipp
Hi Philipp: I attach the read cause the problem here. 914f8a2b-6215-49f9-9be3-941e86ad35d1.txt
Thanks, Archie
Hi Fritz: No \t was found at end of the output sam file
Thanks, Archie
Hi, I get the exact same samtools error.
I found that it is caused by SAM records with all the bases soft-clipped so that the CIGAR is just 405324S
or similar. I don't know whether that is the intended behaviour of --bamfix
but I could get around the samtools error by removing all these records with:
sed -E '/\t[0-9]+S\t/d' failing.sam > better.sam