OLC-Bioinformatics / ConFindr

Intra-species bacterial contamination detection
https://olc-bioinformatics.github.io/ConFindr/
MIT License
22 stars 8 forks source link

Error installing DB #55

Closed shlomobl closed 1 month ago

shlomobl commented 1 year ago

Hello,

I am using an Ubuntu 20.02 system in which I installed ConFindr as part of the AQUAMIS pipeline. I am now trying to complete the setup of the DBs following the instructions in the ConFindr site, and I got the following error:

2023-10-30 11:04:04  Downloading BACT000065... 
  2023-10-30 11:04:17  Downloading rMLST profiles... 
  2023-10-30 11:04:18  Combining rMLST files... 
Traceback (most recent call last):
  File "/home/shlomo/Programs/miniconda3/envs/aquamis/bin/confindr_database_setup", line 10, in <module>
    sys.exit(main())
  File "/home/shlomo/Programs/miniconda3/envs/aquamis/lib/python3.7/site-packages/confindr_src/database_setup.py", line 270, in main
    args.secret_file)
  File "/home/shlomo/Programs/miniconda3/envs/aquamis/lib/python3.7/site-packages/confindr_src/database_setup.py", line 209, in setup_confindr_database
    record.seq._data = record.seq._data.replace('-', '').replace('N', '')
TypeError: a bytes-like object is required, not 'str'

Hope someone can help me figure out what's wrong and how to fix. Thanks!

pcrxn commented 1 year ago

Hi @shlomobl,

The pipeline that you're using may be running an older version of ConFindr. If possible, please update the ConFindr version, but if this isn't possible without breaking things, then upgrading the BioPython version to >1.79 should fix this too.