compiling from source, tests fail, issues with kma/blastn path?

Issue #39 resolved
Former user created an issue

I am trying to follow the tutorial and run the tests, but 3 of the 4 tests fail. Here is what I ran so far:

git clone https://git@bitbucket.org/genomicepidemiology/resfinder.git  
cd resfinder 
pip3 install tabulate biopython cgecore gitpython python-dateutil 
git clone https://git@bitbucket.org/genomicepidemiology/resfinder_db.git db_resfinder 
git clone https://bitbucket.org/genomicepidemiology/kma.git  
cd kma && make  
cd db_resfinder 
python3 INSTALL.py 
## must export path for blastn and kma. Note that both must be in the cge folder, even if path is exported 
export kma=$PATH:/home/ewissel/amr-benchmarking/mock_2/resfinder/cge/kma 

cd resfinder/cge 
Wget https://ftp.ncbi.nlm.nih.gov/blast/executables/LATEST/ncbi-blast-2.11.0+-src.zip 
Unzip ncbi* 
export blastn=$PATH/ewissel/amr-benchmarking/mock_2/resfinder/cge/ncbi-blast-2.11.0+-src
## try to run tests 
python3 tests/functional_tests.py -v 

Moving kma and blastn into the cge folder (subdir in resfinder) fixed one of the test fails, but it's not clear to me why the other three are failing, especially because all four tests failed when I only exported the path to kma/blastn when it was outside of the cge folder.

Also of note is that I am able to run blastn locally without any issue, but tried moving it into CGE since it was looking for it there (Even though I exported the path to its initial location).

Here is the output of the failed tests:

test_on_data_with_just_acquired_resgene_using_blast (__main__.ResFinderRunTest) ... ERROR
test_on_data_with_just_acquired_resgene_using_kma (__main__.ResFinderRunTest) ... ok
test_on_data_with_just_point_mut_using_blast (__main__.ResFinderRunTest) ... ERROR
test_on_data_with_just_point_mut_using_kma (__main__.ResFinderRunTest) ... ERROR

======================================================================
ERROR: test_on_data_with_just_acquired_resgene_using_blast (__main__.ResFinderRunTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "tests/functional_tests.py", line 94, in test_on_data_with_just_acquired_resgene_using_blast
    check=True)
  File "/home/ewissel/miniconda3/envs/python3.6/lib/python3.6/subprocess.py", line 438, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command 'python3  /home/ewissel/amr-benchmarking/mock_2/resfinder/run_resfinder.py -ifa data/test_isolate_01.fa -o running_test/test1 -s 'Escherichia coli' --min_cov 0.6 -t 0.8 --acquired --db_path_res /home/ewissel/amr-benchmarking/mock_2/resfinder/db_resfinder --blastPath /home/ewissel/amr-benchmarking/mock_2/resfinder/cge/blastn' returned non-zero exit status 1.

======================================================================
ERROR: test_on_data_with_just_point_mut_using_blast (__main__.ResFinderRunTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "tests/functional_tests.py", line 210, in test_on_data_with_just_point_mut_using_blast
    check=True)
  File "/home/ewissel/miniconda3/envs/python3.6/lib/python3.6/subprocess.py", line 438, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command 'python3 /home/ewissel/amr-benchmarking/mock_2/resfinder/run_resfinder.py -ifa data/test_isolate_05.fa -o running_test/test3 -s 'Escherichia coli' --min_cov 0.6 --threshold 0.8 --point --db_path_point /home/ewissel/amr-benchmarking/mock_2/resfinder/db_pointfinder --db_path_res /home/ewissel/amr-benchmarking/mock_2/resfinder/db_resfinder --blastPath /home/ewissel/amr-benchmarking/mock_2/resfinder/cge/blastn' returned non-zero exit status 1.

======================================================================
ERROR: test_on_data_with_just_point_mut_using_kma (__main__.ResFinderRunTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "tests/functional_tests.py", line 254, in test_on_data_with_just_point_mut_using_kma
    check=True)
  File "/home/ewissel/miniconda3/envs/python3.6/lib/python3.6/subprocess.pytest_on_data_with_just_acquired_resgene_using_blast (__main__.ResFinderRunTest) ... ERROR
test_on_data_with_just_acquired_resgene_using_kma (__main__.ResFinderRunTest) ... ok
test_on_data_with_just_point_mut_using_blast (__main__.ResFinderRunTest) ... ERROR
test_on_data_with_just_point_mut_using_kma (__main__.ResFinderRunTest) ... ERROR

======================================================================
ERROR: test_on_data_with_just_acquired_resgene_using_blast (__main__.ResFinderRunTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "tests/functional_tests.py", line 94, in test_on_data_with_just_acquired_resgene_using_blast
    check=True)
  File "/home/ewissel/miniconda3/envs/python3.6/lib/python3.6/subprocess.py", line 438, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command 'python3  /home/ewissel/amr-benchmarking/mock_2/resfinder/run_resfinder.py -ifa data/test_isolate_01.fa -o running_test/test1 -s 'Escherichia coli' --min_cov 0.6 -t 0.8 --acquired --db_path_res /home/ewissel/amr-benchmarking/mock_2/resfinder/db_resfinder --blastPath /home/ewissel/amr-benchmarking/mock_2/resfinder/cge/blastn' returned non-zero exit status 1.

======================================================================
ERROR: test_on_data_with_just_point_mut_using_blast (__main__.ResFinderRunTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "tests/functional_tests.py", line 210, in test_on_data_with_just_point_mut_using_blast
    check=True)
  File "/home/ewissel/miniconda3/envs/python3.6/lib/python3.6/subprocess.py", line 438, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command 'python3 /home/ewissel/amr-benchmarking/mock_2/resfinder/run_resfinder.py -ifa data/test_isolate_05.fa -o running_test/test3 -s 'Escherichia coli' --min_cov 0.6 --threshold 0.8 --point --db_path_point /home/ewissel/amr-benchmarking/mock_2/resfinder/db_pointfinder --db_path_res /home/ewissel/amr-benchmarking/mock_2/resfinder/db_resfinder --blastPath /home/ewissel/amr-benchmarking/mock_2/resfinder/cge/blastn' returned non-zero exit status 1.

======================================================================
ERROR: test_on_data_with_just_point_mut_using_kma (__main__.ResFinderRunTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "tests/functional_tests.py", line 254, in test_on_data_with_just_point_mut_using_kma
    check=True)
  File "/home/ewissel/miniconda3/envs/python3.6/lib/python3.6/subprocess.py", line 438, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command 'python3 /home/ewissel/amr-benchmarking/mock_2/resfinder/run_resfinder.py -ifq data/test_isolate_05_1.fq data/test_isolate_05_2.fq -o running_test/test4 -s 'Escherichia coli' --min_cov 0.6 --threshold 0.8 --point --db_path_point /home/ewissel/amr-benchmarking/mock_2/resfinder/db_pointfinder --db_path_res /home/ewissel/amr-benchmarking/mock_2/resfinder/db_resfinder --kmaPath /home/ewissel/amr-benchmarking/mock_2/resfinder/cge/kma/kma' returned non-zero exit status 1.

----------------------------------------------------------------------
Ran 4 tests in 6.253s

FAILED (errors=3)
", line 438, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command 'python3 /home/ewissel/amr-benchmarking/mock_2/resfinder/run_resfinder.py -ifq data/test_isolate_05_1.fq data/test_isolate_05_2.fq -o running_test/test4 -s 'Escherichia coli' --min_cov 0.6 --threshold 0.8 --point --db_path_point /home/ewissel/amr-benchmarking/mock_2/resfinder/db_pointfinder --db_path_res /home/ewissel/amr-benchmarking/mock_2/resfinder/db_resfinder --kmaPath /home/ewissel/amr-benchmarking/mock_2/resfinder/cge/kma/kma' returned non-zero exit status 1.

----------------------------------------------------------------------
Ran 4 tests in 6.253s

FAILED (errors=3)

Please let me know if there is an obvious issue in how I've directed resfinder to kma/blastn or if there is a goal date for when the docker container will be updated!

Comments (4)

  1. CGE Helpdesk

    Dear user,

    Thank you for the interest in our services.

    Could you try to run one the command lines that the test tries to execute? E.g.:

    python3  /home/ewissel/amr-benchmarking/mock_2/resfinder/run_resfinder.py -ifa data/test_isolate_01.fa -o running_test/test1 -s 'Escherichia coli' --min_cov 0.6 -t 0.8 --acquired --db_path_res /home/ewissel/amr-benchmarking/mock_2/resfinder/db_resfinder --blastPath /home/ewissel/amr-benchmarking/mock_2/resfinder/cge/blastn
    

    Then we might get a more explanatory error in stead of the subprocess.CalledProcessError error.

    Kind regards,

    Malene, CGE helpdesk

  2. CGE Helpdesk

    With regards to the Docker, a new version will be uploaded soon, hopefully during the week.

    Kind regards,

    Malene

  3. CGE Helpdesk

    Dear User,

    A new docker version has been released.

    Did you manage to solve the issues with the solution suggested above?

    Kind regards

    Malene, CGE Helpdesk

  4. Log in to comment