Problem running the tests after completing all instruction

Issue #42 resolved
Former user created an issue

Hello, I have not installed KMA (optional) and when I run the tests these are the following lines

~/resfinder$ python3 tests/functional_tests.py EEEE ====================================================================== ERROR: test_on_data_with_just_acquired_resgene_using_blast (main.ResFinderRunTest)


Traceback (most recent call last): File "tests/functional_tests.py", line 93, in test_on_data_with_just_acquired_resgene_using_blast procs = run(cmd_acquired, shell=True, stdout=PIPE, stderr=PIPE, File "/home/studentman/miniconda3/lib/python3.8/subprocess.py", line 512, in run raise CalledProcessError(retcode, process.args, subprocess.CalledProcessError: Command 'python3 /home/studentman/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/studentman/resfinder/db_resfinder --blastPath /home/studentman/resfinder/cge/blastn' returned non-zero exit status 1.

====================================================================== ERROR: test_on_data_with_just_acquired_resgene_using_kma (main.ResFinderRunTest)


Traceback (most recent call last): File "tests/functional_tests.py", line 151, in test_on_data_with_just_acquired_resgene_using_kma procs = run(cmd_acquired, shell=True, stdout=PIPE, stderr=PIPE, File "/home/studentman/miniconda3/lib/python3.8/subprocess.py", line 512, in run raise CalledProcessError(retcode, process.args, subprocess.CalledProcessError: Command 'python3 /home/studentman/resfinder/run_resfinder.py -ifq data/test_isolate_01_1.fq data/test_isolate_01_2.fq -o running_test/test2 -s 'Escherichia coli' --min_cov 0.6 -t 0.8 --acquired --db_path_res /home/studentman/resfinder/db_resfinder --kmaPath /home/studentman/resfinder/cge/kma/kma' 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 209, in test_on_data_with_just_point_mut_using_blast procs = run(cmd_point, shell=True, stdout=PIPE, stderr=PIPE, File "/home/studentman/miniconda3/lib/python3.8/subprocess.py", line 512, in run raise CalledProcessError(retcode, process.args, subprocess.CalledProcessError: Command 'python3 /home/studentman/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/studentman/resfinder/db_pointfinder --db_path_res /home/studentman/resfinder/db_resfinder --blastPath /home/studentman/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 253, in test_on_data_with_just_point_mut_using_kma procs = run(cmd_acquired, shell=True, stdout=PIPE, stderr=PIPE, File "/home/studentman/miniconda3/lib/python3.8/subprocess.py", line 512, in run raise CalledProcessError(retcode, process.args, subprocess.CalledProcessError: Command 'python3 /home/studentman/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/studentman/resfinder/db_pointfinder --db_path_res /home/studentman/resfinder/db_resfinder --kmaPath /home/studentman/resfinder/cge/kma/kma' returned non-zero exit status 1.


Ran 4 tests in 2.891s

Thanks for your time

FAILED (errors=4)

Comments (5)

  1. CGE Helpdesk

    Dear Mr./Mrs.,

    Thank you for your interest in ResFinder.

    The two kma tests (no. 2 and 4) are expected to fail because you haven’t installed kma.

    When running the test, it is very important to have the all dependencies (blast, and databases) located in the resfinder directory from which you run the test. If this is not the case, please specify the path to the blast and databases using the -b, -db_res and -db_point options:

    #Which outputs:
    usage: functional_tests.py [-res_help] [-db_res DB_PATH_RES] [-b BLAST_PATH]
                               [-k KMA_PATH] [-db_point DB_PATH_POINT]
    
    Options:
      -res_help, --resfinder_help
      -db_res DB_PATH_RES, --db_path_res DB_PATH_RES
                            Path to the databases for ResFinder
      -b BLAST_PATH, --blastPath BLAST_PATH
                            Path to blastn
      -k KMA_PATH, --kmaPath KMA_PATH
                            Path to KMA
      -db_point DB_PATH_POINT, --db_path_point DB_PATH_POINT
                            Path to the databases for PointFinder
    

    When I run the test on my own computer, I get no errors when specifying my blast path with -b.

    Kind regards,
    Karen, CGE Helpdesk

  2. CGE Helpdesk

    Dear Davina,

    Thank you for the interest in our services.

    As my colleague describes, it is important that all paths are corresponding to your local paths. Please try to specify the path to both your pointfinder database and resfinder database.

    If you still receive an error, could you please insert it here? Then I will take a closer look.

    Kind regards,

    Malene, CGE Helpdesk

  3. Peter Cock

    I’m running into similar issues, it appears the default for -b and -k is to look for the binaries under the tool’s own directory?

    This helps if the tools are on the $PATH:

    functional_tests.py -b `which blastn` -k `which kma`

  4. Log in to comment