Search code examples
pythoncondabiopythonfastaminiconda

Is there a way to fix this error code with DeepVirFinder?


I will try to be as much help as I can, but this is certainly a bit out of my depth.

I am trying to run the metagenomics package 'DeepVirFinder' on my fasta file 'my_seqs.fa' within terminal on my Mac. I have followed the GitHub repository instructions (as found here https://github.com/jessieren/DeepVirFinder). I have created a conda environment with all the necessary packages.

Into my terminal I have inputted

python dvf.py -i ~/Documents/PairwiseANI/my_seqs.fna -o ~/Documents/DeepVirFinder/ -l 1000 -c 2

this receives an output error of

Using Theano backend.
1. Loading Models.
   model directory /data2/joshcole/DeepVirFinder/models
Traceback (most recent call last):
  File "dvf.py", line 131, in <module>
    modDict[contigLengthk] = load_model(os.path.join(modDir, modName))
  File "/home/ggb_joshcole/miniconda3/envs/dvf/lib/python3.6/site-packages/keras/engine/saving.py", line 419, in load_model
    model = _deserialize_model(f, custom_objects, compile)
  File "/home/ggb_joshcole/miniconda3/envs/dvf/lib/python3.6/site-packages/keras/engine/saving.py", line 224, in _deserialize_model
    model_config = json.loads(model_config.decode('utf-8'))
AttributeError: 'str' object has no attribute 'decode'

From the GitHub repository, what it should return upon a successful run (using example template names) is as follows:

Using Theano backend.
1. Loading Models.
   model directory /auto/cmb-panasas2/renj/software/DeepVirFinder/models
2. Encoding and Predicting Sequences.
   processing line 1
   processing line 1389
3. Done. Thank you for using DeepVirFinder.
   output in ./test/crAssphage.fa_gt300bp_dvfpred.txt

Any help for how to fix this error would be greatly appreciated. I have tried to download and jig around with potential conda fixes, but it doesn't appear to be a problem with any dependancies + python is fully up to date.

Thank you for reading


Solution

  • Apologies - I found out it was an error between h5py and tensorflow. Had to downgrade h5py to 2.10.0.