How to fix minimap2 -> samtools sort error (samtools sort: truncated file. Aborting)?
0
0
Entering edit mode
4.0 years ago
O.rka ▴ 740

I'm trying to run the following pipeline: [minimap2] -> [samtools sort] && [samtools index]

In particular, here's the command I'm running:

( minimap2 -a -x map-ont -t 4 Genomes/E_crus-galli_v2.0/EC.fasta reads.nanofilt.fastq | samtools sort -T tmp -o sorted.bam && samtools index sorted.bam )

Here's the error I'm getting:

[M::mm_idx_gen::26.816*1.85] collected minimizers
[M::mm_idx_gen::32.482*2.22] sorted minimizers
[M::main::32.482*2.22] loaded/built the index for 2289 target sequence(s)
[M::mm_mapopt_update::33.938*2.17] mid_occ = 725
[M::mm_idx_stat] kmer size: 15; skip: 10; is_hpc: 0; #seq: 2289
[M::mm_idx_stat::34.924*2.14] distinct minimizers: 67972833 (48.03% are singletons); average occurrences: 3.694; average spacing: 5.339
[M::worker_pipeline::405.636*3.79] mapped 698957 sequences
[M::worker_pipeline::776.285*3.91] mapped 696720 sequences
[W::sam_read1] Parse error at line 3989404
samtools sort: truncated file. Aborting

Here is the exit code: 1

Here's my versions:

(f5c_env) -bash-4.1$ minimap2 --version
2.17-r941

(f5c_env) -bash-4.1$ samtools --version
samtools 1.10
Using htslib 1.10.2
Copyright (C) 2019 Genome Research Ltd.
alignment • 3.5k views
ADD COMMENT
0
Entering edit mode

This may apply : Modify query names longer than 252

Wonder if ONT has started outputting read names > 252 characters of late.

ADD REPLY
0
Entering edit mode

The htslib/samtools “QNAMEs limited to 252 characters instead of 254” bug was fixed in 1.10.

The absence of an additional [E::sam_parse1] query name too long error message is also indicative that this is not the problem.

ADD REPLY

Login before adding your answer.

Traffic: 1902 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6