On 17/01/2020 11:57, Andreas Tille wrote:
[...]
Can you please add some kind of example code that enables us to
reproduce the issue?  We could add it to the autopkgtest

   
https://salsa.debian.org/med-team/ncbi-blastplus/blob/master/debian/tests/run-unit-test

to verify that this issue is solved.

Hi, Andreas.

I'm not sure how this can be tested without tracing attempts by "blastn" to stat and read /etc/ncbi/.ncbirc, as I showed in my previous email.

The BUG appears to be caused when the NCBI environment variable is undefined. Setting NCBI to the installed location of the default config file under Ubuntu fixes the problem:

ajt@beluga:~$ export NCBI=/etc/ncbi
ajt@beluga:~$ strace blastn |& fgrep .ncbirc
stat("./.ncbirc", 0x7ffc01d0e2c0)       = -1 ENOENT (No such file or directory)
stat("/home/ajt/.ncbirc", 0x7ffc01d0e2c0) = -1 ENOENT (No such file or 
directory)
stat("/etc/ncbi/.ncbirc", {st_mode=S_IFREG|0644, st_size=1229, ...}) = 0
stat("/etc/ncbi/.ncbirc", {st_mode=S_IFREG|0644, st_size=1229, ...}) = 0
stat("/etc/ncbi/.ncbirc", {st_mode=S_IFREG|0644, st_size=1229, ...}) = 0
lstat("/etc/ncbi/.ncbirc", {st_mode=S_IFREG|0644, st_size=1229, ...}) = 0
openat(AT_FDCWD, "/etc/ncbi/.ncbirc", O_RDONLY) = 3
stat("./.ncbirc", 0x7ffc01d0eae0)       = -1 ENOENT (No such file or directory)
stat("/home/ajt/.ncbirc", 0x7ffc01d0eae0) = -1 ENOENT (No such file or 
directory)
stat("/etc/ncbi/.ncbirc", {st_mode=S_IFREG|0644, st_size=1229, ...}) = 0

This behaviour is consistent to what NCBI describe:

https://www.ncbi.nlm.nih.gov/books/NBK279695/

A unit test would need to know where the deb stores ".ncbirc" and strace the execution of "blastn" to make sure the executable finds the default config file. If NCBI is unset, it looks for "/etc/.ncbirc". However, the default location it is installed to under Ubuntu is "/etc/ncbi/.ncbirc".

HTH,

  Tony.

--
Minke Informatics Limited, Registered in Scotland - Company No. SC419028
Registered Office: 3 Donview, Bridge of Alford, AB33 8QJ, Scotland (UK)
tel. +44(0)19755 63548                    http://minke-informatics.co.uk
mob. +44(0)7985 078324        mailto:tony.tra...@minke-informatics.co.uk

Reply via email to