ncbi-blast+ ThrowNullPointerException() when running inside a Docker container
1
2
Entering edit mode
10.5 years ago
Rob Syme ▴ 540

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:

wget https://gist.githubusercontent.com/robsyme/8d6e20966db2d967bb51/raw/a494a6fbf4268dc36d1019a543d60c83a58cd081/Dockerfile
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:

ENV LINECOUNT 83

to

ENV LINECOUNT 82

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+?

cegma software-error ncbi blast • 3.9k views
ADD COMMENT
2
Entering edit mode
10.4 years ago

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 docker.io 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 docker.io run blasterror

And get:

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

  CHROMOSOME_I 1 15072418                                             93.5    1e-23

> CHROMOSOME_I 1 15072418
Length=4100

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

Query  1     GTATATTTTTACGTAATAGCTTCTTTGACATCAATAAGTATTTGCCTATA  50
             ||||||||||||||||||||||||||||||||||||||||||||||||||
Sbjct  1351  GTATATTTTTACGTAATAGCTTCTTTGACATCAATAAGTATTTGCCTATA  1400

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, docker.io 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 https://get.docker.io/builds/Linux/x86_64/docker-latest -O docker

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

ADD COMMENT
0
Entering edit mode

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

ADD REPLY
0
Entering edit mode

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

ADD REPLY

Login before adding your answer.

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