Question: ncbi-blast+ ThrowNullPointerException() when running inside a Docker container
gravatar for Rob Syme
5.4 years ago by
Rob Syme540
Perth, Western Australia
Rob Syme540 wrote:

NCBI blast+ seems to have trouble parsing some fasta files when running inside a Docker container. Note that I don't see the error when running blast outside the container.

I'm using the sample input file provided by Cegma here as an example, but the problem presists in other files. For the Cegma example, taking the first 82 lines works without issue, but taking the first 83 lines throws the error.

I've created a dockerfile that will replicate the error.

If you have docker installed, you can simply:

docker build -t blasterror .
docker run blasterror

This returns with the error:

Error: NCBI C++ Exception:
    "/home/coremake/release_build/build/PrepareRelease_Linux64-Centos_JSID_01_92_130.14.22.10_9056__PrepareRelease_Linux64-Centos_1386704299/c++/compilers/unix/../../src/corelib/ncbiobj.cpp", line 925: Critical: ncbi::CObject::ThrowNullPointerException() - Attempt to access NULL pointer.

To use only the first 82 lines to run without an error, change the line:




in the file 'Dockerfile' and re-run docker build and docker run as above.

An error is thrown with ncbi-blast versions 2.2.25, 2.2.26, 2.2.27, 2.2.28 and 2.2.29 with 83 lines but not with 82.

Does anybody know why the Docker might be causing problems with ncbi-blast+?


blast cegma software error ncbi • 2.5k views
ADD COMMENTlink modified 5.4 years ago • written 5.4 years ago by Rob Syme540
gravatar for Philipp Bayer
5.4 years ago by
Philipp Bayer6.5k
Philipp Bayer6.5k wrote:

I tried reproducing your bug but it worked for me! First of all, you're linking to two different Dockerfiles, the second mention tries to install Ubuntu 10.04 where udev doesn't work in virtual envs and dies in apt-get upgrade, the first Dockerfile with Ubuntu 14.04 works fine.

These are my commands using your Dockerfile:

sudo build -t blasterror

After blast+ downloads forever, all I get is makeblastdb's warning for the large number of Ns in the reference:

Maximum file size: 1000000000B
Error: (1431.1) FASTA-Reader: Warning: FASTA-Reader: First data line in seq is about 100% ambiguous nucleotides (shouldn't be over 40%)
Adding sequences from FASTA; added 1 sequences in 0.000473022 seconds.

And then I run this:

sudo run blasterror

And get:

Query= foo
                                                                      Score     E
Sequences producing significant alignments:                          (Bits)  Value

  CHROMOSOME_I 1 15072418                                             93.5    1e-23

> CHROMOSOME_I 1 15072418

 Score = 93.5 bits (50),  Expect = 1e-23
 Identities = 50/50 (100%), Gaps = 0/50 (0%)


That looks fine to me! Even when I change LINECOUNT to 82, 83, 200 it works fine.

What OS/version of Docker are you running? I'm running Ubuntu 14.04 with Kernel 3.13.0-24-generic with Ubuntu's slightly old version of docker, version prints:

Client version: 0.9.1
Go version (client): go1.2.1
Git commit (client): 3600720
Server version: 0.9.1
Git commit (server): 3600720
Go version (server): go1.2.1
Last stable version: 0.11.1, please update docker

Edit: I also downloaded the latest version 0.11.1 via

wget -O docker

I can't reproduce the bug with that one either, same output.

ADD COMMENTlink modified 9 days ago by RamRS24k • written 5.4 years ago by Philipp Bayer6.5k

I've upgraded to ubuntu 14.04 (overkill, I know) and upgraded docker to the latest ubuntu package and everything seems to work ok. Very strange.

ADD REPLYlink written 5.4 years ago by Rob Syme540

Yes, very strange - I haven't had much experience with Docker, I thought your situation was what Docker was invented for :P

ADD REPLYlink written 5.4 years ago by Philipp Bayer6.5k
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 703 users visited in the last hour