You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While running the run_py_capsid_report function from pyCapsid package, an invalid parameter error related to the radius_neighbours_graph function of the scikit-learn package is thrown, as follows:
Error message:
Fetching file 1 / 1 (4oq8)...
Done
Number of protein chains in full structure: 60
Number of protein chains in asymmetric unit: 1
# of residues: 8640
Building hessian for model preset: U-ENM
Model parameters: {'cutoff': 7.5, 'gnm': False, 'fanm': 0.1, 'wfunc': 'power', 'base_dist': 1, 'd_power': 0, 'backbone': False, 'k_backbone': 1, 'l_backbone': 1, 'chain_starts': None, 'save_hessian': True, 'save_kirchhoff': False, 'save_cg_path': './4oq8/'}
Finding neighbors within 7.5Å
Traceback (most recent call last):
File "<string>", line 1, in<module>
File "/Users/selasisedalo/anaconda3/envs/pycapsid/lib/python3.10/site-packages/pyCapsid/__init__.py", line 149, in run_capsid_report
kirch, hessian = buildENMPreset(coords, **params_dict['CG'])
File "/Users/selasisedalo/anaconda3/envs/pycapsid/lib/python3.10/site-packages/pyCapsid/CG.py", line 31, in buildENMPreset
return buildENM(coords, cutoff=cutoff, fanm=fanm, **kwargs)
File "/Users/selasisedalo/anaconda3/envs/pycapsid/lib/python3.10/site-packages/pyCapsid/CG.py", line 80, in buildENM
distGraph = radius_neighbors_graph(tree, cutoff, mode='distance', n_jobs=-1)
File "/Users/selasisedalo/anaconda3/envs/pycapsid/lib/python3.10/site-packages/sklearn/utils/_param_validation.py", line 203, in wrapper
validate_parameter_constraints(
File "/Users/selasisedalo/anaconda3/envs/pycapsid/lib/python3.10/site-packages/sklearn/utils/_param_validation.py", line 95, in validate_parameter_constraints
raise InvalidParameterError(
sklearn.utils._param_validation.InvalidParameterError: The 'X' parameter of radius_neighbors_graph must be an array-like or an instance of 'sklearn.neighbors._base.RadiusNeighborsMixin'. Got <sklearn.neighbors._ball_tree.BallTree object at 0x11ac41210> instead.
[PDB]pdb = '4oq8' # PDB ID of structuresave_all_path = './4oq8' # where to save the results[CG]preset = 'U-ENM' # Model Preset To Usesave_hessian = true # Whether to save the hessian matrix[NMA]n_modes = 200 # Number of low frequency modes to calculateeigen_method = 'eigsh' # eigen method to use[b_factors]fit_modes = true # Whether to select the number of modes used to maximize correlation[QRC][VIS]method = 'chimerax'chimerax_path = 'C:\Program Files\ChimeraX\bin\ChimeraX.exe'
I suggest either locking the scikit-learn version to <1.4 or refactoring how the neighbor graph is computed to use scikit-learns API in a way that isn't version dependent.
Issue description
While running the
run_py_capsid_report
function from pyCapsid package, an invalid parameter error related to theradius_neighbours_graph
function of the scikit-learn package is thrown, as follows:Steps to reproduce the error (prior commands)
Installation process
config file content
pyCapsid execution
python -c “from pyCapsid import run_capsid_report;run_capsid_report(‘config.toml’)”
Software versions
The text was updated successfully, but these errors were encountered: