Hello everyone,
I have a nanopore sequencing file which I am using for de novo assembly.
This is the code I used:
flye --nano-raw Data_pooled_data.fastq --out-dir assembly_outputFlye28CPU --threads 28
It has produced a draft_assembly.fasta file which looks promising (fairly large contigs), but now the code aborts at the consensus step. I will post the Flye and Minimap logs here. Anyone a clue what could cause this abortion and how to fix it? I already have the latest version of minimap installed
The flye log ends with:
[2024-01-04 04:06:15] INFO: Contained seqs: 3246
[2024-01-04 04:06:35] DEBUG: Writing FASTA
[2024-01-04 04:06:44] DEBUG: Peak RAM usage: 211 Gb
-----------End assembly log------------
[2024-01-04 04:07:34] root: DEBUG: Disjointigs length: 1210699194, N50: 14748365
[2024-01-04 04:07:34] root: INFO: >>>STAGE: consensus
[2024-01-04 04:07:34] root: INFO: Running Minimap2
[2024-01-04 04:07:39] root: ERROR: Error running minimap2, terminating. See the alignment error log for details: /home/share/Genome_Assembly_nanopore/assembly_outputFly28CPU/10-consensus/minimap.stderr
[2024-01-04 04:07:39] root: ERROR: Command '['/bin/bash', '-c', "set -eo pipefail; /usr/bin/minimap2 '/home/share/Genome_Assembly_nanopore/assembly_outputFly28CPU/00-assembly/draft_assembly.fasta' '/home/share/Genome_Assembly_nanopore/Data_pooled_data.fastq' -x map-ont -t 28 -a -p 0.5 -N 10 --sam-hit-only -L -K 5G -z 1000 -Q --secondary-seq -I 64G | /usr/bin/samtools view -T '/home/share/Genome_Assembly_nanopore/assembly_outputFly28CPU/00-assembly/draft_assembly.fasta' -u - | /usr/bin/samtools sort -T '/home/share/Genome_Assembly_nanopore/assembly_outputFly28CPU/10-consensus/sort_240104_040734' -O bam -@ 4 -l 1 -m 4G -o '/home/share/Genome_Assembly_nanopore/assembly_outputFly28CPU/10-consensus/minimap.bam'"]' returned non-zero exit status 1.
Looking at the minimap.stderr file I read the following:
[ERROR] unknown option in "/home/share/Genome_Assembly_nanopore/Data_pooled_data.fastq" [main_samview] fail to read the header from "-". samtools sort: failed to read header from "-"
Major thanks in advance!
What do you see if you do
samtools --version
? You may have an old version ofsamtools
.Samtools 1.16.1, which is, according to when I try to update, the newest version, but I also see that 1.19 was published 3 weeks ago. I now updated to 1.19 manually but still the same error.
Versions of the others: Flye 2.9.1 Minimap2 2.24
Just checking, when you run
which samtools
, does that bring up a samtools different from the one Flye is using which is/usr/bin/samtools
? Perhaps the samtools in/usr/bin
is the outdated versionThank you for your response!! Running: /home/share/Genome_Assembly_nanopore$ which samtools Gives: /usr/local/bin/samtools"
Aha see there's the problem!!! In your Flye program, it runs a different samtools:
Might be easiest to delete that
/usr/bin/samtools
and hope that Flye picks up the/usr/local/bin/samtools
. The Flye Makefile also includes building a Flye-local samtools viamake samtools
https://github.com/fenderglass/Flye/blob/flye/MakefileEdit: The main Flye binary (https://github.com/fenderglass/Flye/blob/flye/bin/flye) has some code that modifies Flye's PATH, you might get away by putting /usr/local/bin/ in there, too:
As it's at position 0 of PATH (the first position), it will use /usr/local/bin/samtools first. Hacky but should solve your issue
Great!!! Thanks a lot!! I removed the usr/bin/samtools, and then tried the flye makefile.
I downloaded Flye into my environment (git clone https://github.com/fenderglass/Flye.git)
and then tried to run this code:
I get this error:
Any help on fixing this issue?
Oh that might require a new post. However, since you removed the /usr/bin/samtools version, there's hopefully no need to go the route of the Makefile, perhaps Flye will just work now
Nope it doesn't work unfortunately...
I also tried the sys.path.insert(0, '/usr/local/bin'), but I did not have the permission to change it, so I will try that once more when I do have the permissions.
I also tried to change that line using nano, but then the error came that flye could not be found.
Thanks a lot for helping out!:)