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

ValueError when postprocessing #4

Open
Sofia-GMT opened this issue Dec 19, 2023 · 0 comments
Open

ValueError when postprocessing #4

Sofia-GMT opened this issue Dec 19, 2023 · 0 comments

Comments

@Sofia-GMT
Copy link

Sofia-GMT commented Dec 19, 2023

Describe the bug

Good morning!

I'm trying to run defmap using the volumes of EMD-4054 and the atomic model of 5lij. When I try to postprocess the output with rmsf_map2model_for_defmap.py, it raises a ValueError if I indicate a threshold different than 0.

To Reproduce

You can download the files from this google drive folder https://drive.google.com/drive/folders/1BMWRu0OwjAZj8S2tALvK8a9h0u4nmDzX?usp=sharing

  1. Create the conda environment
conda install python=3.8 moleculekit=1.5.6 -c acellera -c conda-forge -y 
conda install -c anaconda tensorflow=2.9.1 -y
conda install -c conda-forge scikit-learn -y
conda install -c conda-forge matplotlib -y
  1. Create the dataset
cd preprocessing
python prep_dataset.py -m "/home/usuario/Descargas/emd_4054.mrc" -o "../sample.jbl" -p -t 0.020000

  1. Infer
python 3dcnn_main.py infer -t "sample.jbl" -p "prediction.jbl" -o "./model/model_res5A.h5"
  1. Postprocess with voxel
cd postprocessing
python rmsf_map2grid.py -m "/home/usuario/Descargas/emd_4054.mrc" -p "../prediction.jbl" -t 0.020000
  1. Postprocess with atomic model
cd ..
ln -s /home/usuario/Descargas/emd_4054.mrc volumes.mrc
ln -s /home/usuario/Descargas/5lij.pdb 5lij.pdb
cd postprocessing
python rmsf_map2model_for_defmap.py -l "../sample_for_visual.list" -p "../prediction.jbl" -n

It raises this error

Traceback (most recent call last):
  File "rmsf_map2model_for_defmap.py", line 101, in <module>
    main()
  File "rmsf_map2model_for_defmap.py", line 97, in main
    map_pred_vals(mol, pred, info, args)
  File "rmsf_map2model_for_defmap.py", line 77, in map_pred_vals
    mol.set('beta', np.round(norm_log10rmsf.flatten(), 5))
  File "/home/usuario/workspace/miniconda3/envs/defmap-1.0.1/lib/python3.8/site-packages/moleculekit/molecule.py", line 610, in set
    self.__dict__[field][s] = value
ValueError: NumPy boolean array indexing assignment cannot assign 70 input values to the 761 output values where the mask is true

The content of sample_for_visual.list is this line:
5lij.pdb volumes.mrc

Expected behavior
To return a pdb file to visualize in pymol

Environments:

  • OS: Ubuntu
  • Version 22.4.3 LTS
  • CUDA Toolkit version 12.2 in base, 11.7 in python environment and outside conda
  • NVIDIA driver version 535.54.03
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

1 participant