Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hostrange() missing 1 required positional argument: 'database_directory' #148

Closed
rpetit3 opened this issue Aug 11, 2023 · 1 comment
Closed

Comments

@rpetit3
Copy link
Contributor

rpetit3 commented Aug 11, 2023

Hello!

Ran into the following issue:

2023-08-11 16:48:51,834 mob_suite.mob_recon INFO: MOB-recon version 3.1.5  [in /usr/local/lib/python3.8/site-packages/mob_suite/mob_recon.py:980]
2023-08-11 16:48:51,834 mob_suite.mob_recon INFO: SUCCESS: Found program blastn at /usr/local/bin/blastn [in /usr/local/lib/python3.8/site-packages/mob_suite/utils.py:592]
2023-08-11 16:48:51,834 mob_suite.mob_recon INFO: SUCCESS: Found program makeblastdb at /usr/local/bin/makeblastdb [in /usr/local/lib/python3.8/site-packages/mob_suite/utils.py:592]
2023-08-11 16:48:51,835 mob_suite.mob_recon INFO: SUCCESS: Found program tblastn at /usr/local/bin/tblastn [in /usr/local/lib/python3.8/site-packages/mob_suite/utils.py:592]
2023-08-11 16:48:51,835 mob_suite.mob_recon INFO: Processing fasta file GCF_000017085.fna [in /usr/local/lib/python3.8/site-packages/mob_suite/mob_recon.py:1007]
2023-08-11 16:48:51,835 mob_suite.mob_recon INFO: Analysis directory results [in /usr/local/lib/python3.8/site-packages/mob_suite/mob_recon.py:1008]
2023-08-11 16:48:58,964 mob_suite.mob_recon INFO: Writing cleaned header input fasta file from GCF_000017085.fna to results/__tmp/fixed.input.fasta [in /usr/local/lib/python3.8/site-packages/mob_suite/mob_recon.py:1103]
2023-08-11 16:48:59,606 root INFO: Blasting replicon sequences /usr/local/lib/python3.8/site-packages/mob_suite/databases/rep.dna.fas against results/__tmp/fixed.input.fasta [in /usr/local/lib/python3.8/site-packages/mob_suite/utils.py:1150]
2023-08-11 16:49:00,609 root INFO: Filtering replicon blast results results/__tmp/replicon_blast_results.txt  [in /usr/local/lib/python3.8/site-packages/mob_suite/utils.py:1155]
2023-08-11 16:49:00,637 root INFO: Blasting relaxase sequences /usr/local/lib/python3.8/site-packages/mob_suite/databases/mob.proteins.faa against results/__tmp/fixed.input.fasta [in /usr/local/lib/python3.8/site-packages/mob_suite/utils.py:1173]
2023-08-11 16:49:29,561 root INFO: Filtering relaxase blast results results/__tmp/mob_blast_results.txt  [in /usr/local/lib/python3.8/site-packages/mob_suite/utils.py:1178]
2023-08-11 16:49:29,577 root INFO: Blasting MPF sequences /usr/local/lib/python3.8/site-packages/mob_suite/databases/mpf.proteins.faa against results/__tmp/fixed.input.fasta [in /usr/local/lib/python3.8/site-packages/mob_suite/utils.py:1197]
2023-08-11 16:49:53,027 root INFO: Filtering MPF blast results results/__tmp/mpf_blast_results.txt  [in /usr/local/lib/python3.8/site-packages/mob_suite/utils.py:1212]
2023-08-11 16:49:53,028 root INFO: Blasting orit sequences /usr/local/lib/python3.8/site-packages/mob_suite/databases/orit.fas against results/__tmp/fixed.input.fasta [in /usr/local/lib/python3.8/site-packages/mob_suite/utils.py:1221]
2023-08-11 16:49:53,230 root INFO: Filtering orit blast results results/__tmp/orit_blast_results.txt  [in /usr/local/lib/python3.8/site-packages/mob_suite/utils.py:1226]
2023-08-11 16:49:53,254 root INFO: Blasting contigs against repetitive sequences db: /usr/local/lib/python3.8/site-packages/mob_suite/databases/repetitive.dna.fas [in /usr/local/lib/python3.8/site-packages/mob_suite/utils.py:1243]
2023-08-11 16:49:53,909 root INFO: Filtering repetitive blast results results/__tmp/repetitive_blast_results.txt  [in /usr/local/lib/python3.8/site-packages/mob_suite/utils.py:1247]
2023-08-11 16:49:53,916 root INFO: Blasting contigs against reference sequence db: /usr/local/lib/python3.8/site-packages/mob_suite/databases/ncbi_plasmid_full_seqs.fas [in /usr/local/lib/python3.8/site-packages/mob_suite/mob_recon.py:1260]
2023-08-11 16:50:00,642 root INFO: Filtering contig blast results: results/__tmp/contig_blast_results.txt [in /usr/local/lib/python3.8/site-packages/mob_suite/mob_recon.py:1265]
2023-08-11 16:50:00,795 root INFO: Assigning contigs to plasmid groups [in /usr/local/lib/python3.8/site-packages/mob_suite/mob_recon.py:1280]
2023-08-11 16:50:03,017 root INFO: b"mash: Relink `/usr/local/bin/../lib/./libgfortran.so.5' with `/lib/x86_64-linux-gnu/librt.so.1' for IFUNC symbol `clock_gettime'\n" [in /usr/local/lib/python3.8/site-packages/mob_suite/wrappers/__init__.py:23]
2023-08-11 16:50:03,623 root INFO: b"mash: Relink `/usr/local/bin/../lib/./libgfortran.so.5' with `/lib/x86_64-linux-gnu/librt.so.1' for IFUNC symbol `clock_gettime'\n" [in /usr/local/lib/python3.8/site-packages/mob_suite/wrappers/__init__.py:23]
2023-08-11 16:50:03,652 root INFO: Writting contig results to results/contig_report.txt [in /usr/local/lib/python3.8/site-packages/mob_suite/mob_recon.py:1382]
2023-08-11 16:50:08,510 root INFO: Writting plasmid sequences to results/plasmid_AA840.fasta [in /usr/local/lib/python3.8/site-packages/mob_suite/utils.py:957]
Traceback (most recent call last):
  File "/usr/local/bin/mob_recon", line 10, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.8/site-packages/mob_suite/mob_recon.py", line 1395, in main
    build_mobtyper_report(contig_memberships['plasmid'], out_dir, mobtyper_report,contig_seqs, ncbi, lit,ETE3DBTAXAFILE)
  File "/usr/local/lib/python3.8/site-packages/mob_suite/utils.py", line 1067, in build_mobtyper_report
    host_range = hostrange(rep_types, relaxase_types, mob_cluster_id, ncbi, lit,ETE3DBTAXAFILE)
TypeError: hostrange() missing 1 required positional argument: 'database_directory'

Command used:

mob_recon \
    --infile GCF_000017085.fna \
    --max_contig_size 310000 --min_length 1000 --max_plasmid_size 350000 \
    --num_threads 4 \
    --outdir results \
    --sample_id GCF_000017085

This was using the Singularity image here: https://depot.galaxyproject.org/singularity/mob_suite:3.1.5--pyhdfd78af_0

The input fasta, GCF_000017085.fna is available here: https://github.com/bactopia/bactopia-tests/blob/main/data/species/staphylococcus_aureus/genome/GCF_000017085.fna

I was able to replicate this on Docker (quay.io/biocontainers/mob_suite:3.1.5--pyhdfd78af_0) and Conda.

I think #149 should fix the issue

@jrober84
Copy link
Collaborator

Thanks so much for your help @rpetit3, it is really appreciated! Your PR has been incorporated and a new release 3.1.6 issued to fix the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants