al-mcintyre / mCaller

A python program to call methylation (m6A in DNA) from nanopore signal data
MIT License
45 stars 16 forks source link

update scikit_learn version to make it work #34

Open aerijman opened 2 years ago

aerijman commented 2 years ago

Hi, I needed to:

pip install "scikit_learn==0.22.2.post1"

to make it run. Since in the README there are no specifications for the versions, here are the versions that work on python=3.8.8:

biopython==1.79
cycler==0.11.0
fonttools==4.28.5
h5py==3.6.0
joblib==1.1.0
kiwisolver==1.3.2
matplotlib==3.5.1
numpy==1.22.0
packaging==21.3
pandas==1.3.5
Pillow==9.0.0
pyparsing==3.0.6
pysam==0.18.0
python-dateutil==2.8.2
pytz==2021.3
scikit-learn==0.22.2.post1
scipy==1.7.3
seaborn==0.11.2
six==1.16.0
threadpoolctl==3.0.0
pms-bio commented 2 years ago

thanx, it helped a lot!

tillea commented 2 years ago

Hi, when trying to build the Debian package against sklearn 1.0.2 I get:

ModuleNotFoundError: No module named 'sklearn.neural_network.multilayer_perceptron'

Seems something has changed inbetween the sklearn versions. Kind regards, Andreas.

emollier commented 2 years ago

Hi,

I managed to get mCaller working with sklearn ≥ 1 with the following patch. However if I recall correctly my python3 conventions, the '_' prefix denotes internal symbols, so it feels more like a work around than a real fix. Besides you might want to implement it in a more flexible way to support both former and later sklearn versions. Any ways, I hope this helps.

Have a nice day, :) Étienne.


--- mcaller.orig/r94_model_NN_6_m6A.pkl
+++ mcaller/r94_model_NN_6_m6A.pkl
@@ -1,7 +1,7 @@
 ccopy_reg
 _reconstructor
 p1
-(csklearn.neural_network.multilayer_perceptron
+(csklearn.neural_network._multilayer_perceptron
 MLPClassifier
 p2
 c__builtin__
@@ -68,7 +68,7 @@
 tbsS'_label_binarizer'
 p20
 g1
-(csklearn.preprocessing.label
+(csklearn.preprocessing._label
 LabelBinarizer
 p21
 g3
--- mcaller.orig/r95_twobase_model_NN_6_m6A.pkl
+++ mcaller/r95_twobase_model_NN_6_m6A.pkl
@@ -4,7 +4,7 @@
 ccopy_reg
 _reconstructor
 p3
-(csklearn.neural_network.multilayer_perceptron
+(csklearn.neural_network._multilayer_perceptron
 MLPClassifier
 p4
 c__builtin__
@@ -71,7 +71,7 @@
 tbsS'_label_binarizer'
 p22
 g3
-(csklearn.preprocessing.label
+(csklearn.preprocessing._label
 LabelBinarizer
 p23
 g5