SPAdes error: finished abnormally, OS return value: 21
1
0
Entering edit mode
12 months ago
jiyoung ▴ 20

I'm having trouble using SPAdes. I'm using SPAdes to do paired end data assembly and I'm getting an unusual stop.

error code: finished abnormally, OS return value: 21

Do you know how to resolve this issue?

Environment: conda, SPAdes genome assembler v3.15.5 WSL, ubuntu RAM: 16GB

below is the error code

** 10:12:50.465 1M / 12G INFO General (kmer_index_builder.hpp : 260) K-mer counting done. There are 2075359224 kmers in total. 10:12:50.503 1M / 12G INFO K-mer Index Building (kmer_index_builder.hpp : 395) Building perfect hash indices 10:51:33.992 1481M / 12G INFO K-mer Index Building (kmer_index_builder.hpp : 431) Index built. Total 2075359224 kmers, 1498969344 bytes occupied (5.77816 bits per kmer). 10:51:34.013 1481M / 12G ERROR K-mer Counting (kmer_data.cpp : 349) The reads contain too many k-mers to fit into available memory. You need approx. 77.3132GB of free RAM to assemble your dataset

== Error == system call for: "['/home/default1/miniconda3/envs/spades/bin/spades-hammer', '/mnt/d/raw/2023nudi/01.RawData/De-SPAdes/spades_output/corrected/configs/config.info']" finished abnormally, OS return value: 21 None**

SPAdes • 2.0k views
ADD COMMENT
3
Entering edit mode
12 months ago

Did you read the error message? You ran out of memory. You can resolve this by providing more memory or performing preprocessing to reduce spurious kmers.

Depending on your project, you can do adapter-trimming, quality-trimming, contaminant-removal, normalization, and error-correction which will all allow SPAdes to use much less memory. I suggest you consult BBTools' bbmap/pipelines/assemblyPipeline.sh (it includes instructions for SPAdes).

ADD COMMENT
0
Entering edit mode

Can you explain the preprocessing to reduce spurious kmers in more detail?

ADD REPLY
2
Entering edit mode

Well, yes, I can. But I'd prefer that you read bbmap/pipelines/assemblyPipeline.sh since it explains all of that. Hopefully.

Anyway, when you do genome assembly via De Bruijn graphs, there are two kinds of kmers: Those from the genome, and those from sequencing errors. Technically it's also possible to get cancer kmers but those tend to be in low volume so you can ignore them unless you are a liquid-biopsy company.

When you do genome assembly, you want to assemble the abundant kmers, because those are most likely to be correct (rather than caused by an error in the sequencing platform). So, preprocessing to remove artifact kmers is useful to get a good assembly. And it also drastically reduces memory requirements.

You have not mentioned any of your preprocessing steps so I assume you are just using raw reads, which is a no-go. Just follow the guidance and you might get a good assembly.

ADD REPLY

Login before adding your answer.

Traffic: 2313 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