Mykrobe-tools/mykrobe

Trouble running Mykrobe with a custom species

Danderson123 opened this issue · 0 comments

Hey @martinghunt

I'm trying to use the singularity container of mykrobe for AMR genotyping in 24 E. coli using a custom set of probes (all of the alleles in the NCBI AMR database) but I get the following error:

INFO:    Using cached SIF image
/home/daniel/.local/lib/python3.8/site-packages/requests/__init__.py:109: RequestsDependencyWarning: urllib3 (2.0.7) or chardet (None)/charset_normalizer (2.0.12) doesn't match a supported version!
  warnings.warn(
[mykrobe 2024-05-22T14:24:49 INFO] Start runnning mykrobe predict. Command line: /usr/local/bin/mykrobe predict -s GCA_027945055.1_ASM2794505v1_genomic -t 6 -S custom --custom_probe_set_path /home/daniel/Documents/GitHub/thesis_figures/AMR_genotyping_with_mykrobe/ncbi_converted.fa --custom_variant_to_resistance_json /home/daniel/Documents/GitHub/thesis_figures/AMR_genotyping_with_mykrobe/ncbi_converted.json -i /home/daniel/Documents/GitHub/thesis_figures/AMR_genotyping_with_resfinder/reference_assemblies/GCA_027945055.1_ASM2794505v1_genomic.fna -o /home/daniel/Documents/GitHub/thesis_figures/AMR_genotyping_with_mykrobe/assembly_results/GCA_027945055.1_ASM2794505v1_genomic/mykrobe_results.csv
Traceback (most recent call last):
  File "/usr/local/bin/mykrobe", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.8/site-packages/mykrobe/cli.py", line 9, in main
    args.func(parser, args)
  File "/usr/local/lib/python3.8/site-packages/mykrobe/parser.py", line 53, in run_subtool
    run(parser, args)
  File "/usr/local/lib/python3.8/site-packages/mykrobe/cmds/amr.py", line 267, in run
    ref_data = ref_data_from_args(args)
  File "/usr/local/lib/python3.8/site-packages/mykrobe/cmds/amr.py", line 177, in ref_data_from_args
    if ref_data[f"{key}_json"] is None:
KeyError: 'ncbi_names_json'

The command I am running is:

singularity exec docker://quay.io/biocontainers/mykrobe:0.13.0--py38h2214202_0 mykrobe predict -s GCA_027945055.1_ASM2794505v1_genomic -t 6 -S custom --custom_probe_set_path ncbi_converted.fa --custom_variant_to_resistance_json ncbi_converted.json -i GCA_027945055.1_ASM2794505v1_genomic.fna -o assembly_results/GCA_027945055.1_ASM2794505v1_genomic/mykrobe_results.csv

I have attached the probes, variant to resistance JSON and the assembly. Any idea what's going wrong? Have I just not set up the probes correctly?

Thanks,
Daniel
mykrobe_data.tar.gz