last-rna
last-rna copied to clipboard
'std::bad_alloc'
Hi, I was trying to run tandem_genotypes on HG01891 Pacbio long reads of chromosome 1. Based on the website, first I aligned long reads to the reference genome using LAST. I ran lastdb -P8 -uNEAR mydb genome.fa
on my reference genome and then I ran last-train -P8 -Q0 mydb myseq.fq > myseq.par
to generate .par file. These two steps finished successfully.
However when I run lastal -P8 -p myseq.par mydb myseq.fq | last-split > myseq.maf
, I'll get
terminate called after throwing an instance of 'std::bad_alloc' what(): std::bad_alloc terminate called recursively terminate called recursively terminate called recursively
This error is not really informative and I have no idea what is causing that. I would appreciate your help.
Thanks for this clear problem report. I think it means lastal is running out of memory. I'm not sure of the best solution, but here are some recommendations, in roughly descending order:
-
Use the "with repeat-masking" recipe. The initial setup is a bit more tedious, but it makes the alignment much faster and lower-memory.
-
Try a LAST option such as -k8 or -uRY8, as mentioned under "Aligning high-indel-error long DNA reads to a genome" here: https://gitlab.com/mcfrith/last/-/blob/main/doc/last-cookbook.rst
-
Use less memory by reducing lastal's "batch size", as (inadequately) described here: https://gitlab.com/mcfrith/last/-/blob/main/doc/last-parallel.rst The default batch size with muti-threading (-P) is 8M (undocumented!) so e.g. -i1M would use less memory.
Some of these involve re-running lastdb: but it's not necessary to re-run last-train.