blast Segmentation fault
1
0
Entering edit mode
8 months ago

I am writing to seek your assistance regarding an issue I encountered while attempting to run blastn locally on my computer. I have downloaded and installed blast+ on my machine and all nt_euk* files from the blast_db. Onece the db files were all downloaded I decompressed them in a directory I have called blastdb and create the .ncbirc config file as:

[BLAST] 
BLASTDB=path_to_blastdb
DATA_LOADERS=blastdb

To launch the program I used the command line:

blastn -db nt_euk -query /mnt/adna/work/blast-test/empty-N0C0.fasta  -strand plus -outfmt "6 qacc qlen sacc evalue score length qcovus pident" -sorthits 0 -max_target_seqs 3

But I got the following error:

Error message: Segmentation Fault (core dumped)

Gdb stack trace:

(gdb) bt
#0  0x0000000000f56381 in ncbi::CSeqDBVol::x_GetSequence(int, char const**) const ()
#1  0x0000000000f48599 in ncbi::CSeqDBImpl::GetSequence(int, char const**) const ()
#2  0x0000000000ed339e in ?? ()
#3  0x0000000000dc2bc1 in BLAST_PreliminarySearchEngine ()
#4  0x0000000000dc3832 in Blast_RunPreliminarySearchWithInterrupt ()
#5  0x0000000000e7c55f in ncbi::blast::CBlastPrelimSearch::Run() ()
#6  0x0000000000e4a8e7 in ncbi::blast::CLocalBlast::Run() ()
#7  0x0000000000b15246 in CBlastnApp::x_RunMTBySplitDB() ()
#8  0x0000000000b17520 in CBlastnApp::Run() ()
#9  0x00000000016bfdc3 in ncbi::CNcbiApplicationAPI::x_TryMain(ncbi::EAppDiagStream, char const*, int*, bool*) ()
#10 0x00000000016c2478 in ncbi::CNcbiApplicationAPI::AppMain(int, char const* const*, char const* const*, ncbi::EAppDiagStream, char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) ()
#11 0x0000000000ae33b7 in main ()

Can someone help me resolve this issue?

Thank you very much for your attention to this matter.

blastn fasta local-blast • 1.4k views
ADD COMMENT
1
Entering edit mode

Please use the formatting bar (especially the code option) to present your post better. You can use backticks for inline code (`text` becomes text), or use one of (a) the option highlighted in the image below/ (b) fenced code blocks for multi-line code. Fenced code blocks are useful in syntax highlighting. If your code has long lines with a single command, break those lines into multiple lines with proper escape sequences so they're easier to read and still run when copy-pasted. I've done it for you this time. You'd used the double quote button this time and that is not the right way to format code.
code_formatting

ADD REPLY
0
Entering edit mode

thank you!

ADD REPLY
0
Entering edit mode

While executing blastn, I encountered a segmentation fault issue. The error message displayed was 'Segmentation Fault'. Despite attempting to address it by adjusting the -num_threads parameter (6, 8, 10) and setting it to unlimited (enter link description here), the error persisted.

blastn -query /staging/tsailab/Blast/Input/HBV/TLCN-HBV-NV0045-01-001T.excl.prok.seq.a100.fasta -db /staging/tsailab/Blast/Database/NT/euk/nt_euk -task blastn -evalue 1e-6 -max_hsps 1 -max_target_seqs 500 -outfmt "6 qseqid qlen qstart qend sseqid slen sstart send length nident pident mismatch gaps gapopen qcovs evalue bitscore stitle sskingdoms staxids sscinames sblastnames qseq sseq" -num_threads 6 -out /staging/tsailab/Blast/Output/HBV/TLCN-HBV-NV0045-01-001T.blast.euk.aa.original.txt

The following is the RAM information:

 free -h

enter image description here

Thank you very much for your attention to this matter.

ADD REPLY
0
Entering edit mode

What kind of sequences are in your input query file (length/number)? Do you get the seg fault immediately after starting the job? You are using the correct binary that supports the operating system you are using?

ADD REPLY
0
Entering edit mode

My input query file ranges from 75 to 150 base pairs in length and contains 100 sequences. It runs for 10 minutes before encountering a segmentation fault. I use the appropriate binary that is compatible with the operating system.

I have input the same query file to align with nt_human, nt_prok, and nt_nt_viruses files, all of which ran correctly. However, only the alignment with nt_euk resulted in an error message.

Thank you.

ADD REPLY
0
Entering edit mode

Try using -task blastn-short if your sequences are 150 bp or less.

ADD REPLY
0
Entering edit mode

Thank you for your assistance. However, "blastn-short" is optimized for sequences of less than 30 nucleotides (enter link description here). Can it still be applied to data of 75-150 base pairs?

Thank you.

ADD REPLY
0
Entering edit mode

Since you are getting a seg fault otherwise, there is no harm in trying. Have you verified that your indexes are not corrupt with a simple query i.e. the problem is not in index files (you downloaded the indexes from NCBI?).

ADD REPLY
0
Entering edit mode

I used 'blastn-short', but it still resulted in a segmentation fault. I downloaded the 'nt_euk' index from NCBI.

Thank you.

ADD REPLY
0
Entering edit mode
8 months ago
Mensur Dlakic ★ 28k

Most segmentation errors indicate memory problems. How quickly did the error pop up? What is your available RAM and did you monitor its use? It appears you are running this on a Windows-based computer, which is generally more problematic in terms of memory management.

I suggest you run your command with a short nucleotide sequence, say an 18S rRNA from a eukaryote of your choice. Then type in the whole path to the database and use time to measure how long the command runs and its resource use:

time blastn -db /path/to/nt_euk -query /mnt/adna/work/blast-test/empty-N0C0.fasta ...

Make sure that you have properly formatted /path/to/nt_euk files and let us know about the output of the above command.

ADD COMMENT
0
Entering edit mode

It takes just a few seconds to return the error. I'm running it on a Linux-based computer.

I'm having doubts about whether I formatted the database correctly. How should I have done it? I simply downloaded all gzip files named nt_euk from the NCBI FTP and then unzipped each file.

ADD REPLY
0
Entering edit mode

I'm running it on a Linux-based computer.

That's quite vague. How much RAM does this machine have? Is it a local machine (laptop/desktop) or a server?

ADD REPLY

Login before adding your answer.

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