NeoLoopFinder icon indicating copy to clipboard operation
NeoLoopFinder copied to clipboard

AttributeError: module 'rpy2.robjects.numpy2ri' has no attribute 'numpy2ri'

Open YuanlongLiu opened this issue 4 years ago • 4 comments

Dear author,

Thanks for developing this package. I am trying to run calculate-cnv but did not get through. The two issues I met:

(1) bw.stats does not accept np.int so I forced to convert the coordinates as int:

    pos_start = int(table.iloc[i].start)
    pos_end = int(table.iloc[i].end)
    print(i)
    v = bw.stats(chr_name, pos_start, pos_end, type='mean')[0] ## need chr_name here: "chr1"

(2) AttributeError: module 'rpy2.robjects.numpy2ri' has no attribute 'numpy2ri', which I do not know how to update yet. Probably it is a version issue. Which version should I install?

The way I installed neoloop is:

$ conda config --add channels defaults $ conda config --add channels bioconda $ conda config --add channels conda-forge $ conda create -n neoloop python=3.7.1 cython=0.29.13 cooler=0.8.6 numpy=1.17.2 scipy=1.3.1 joblib=0.13.2 scikit-learn=0.20.2 networkx=1.11 pyensembl=1.8.0 matplotlib=3.1.1 pybigwig=0.3.17 pomegranate=0.10.0 $ conda activate neoloop $ conda install -c r r rpy2 r-mgcv $ pip install neoloop TADLib==0.4.2 coolbox==0.1.7

YuanlongLiu avatar Jun 09 '21 16:06 YuanlongLiu

For issue (2), I got it working with rpy2 version 2.9.0. I think this attribute was deprecated in 3.0 :)

cmdoret avatar Jun 09 '21 18:06 cmdoret

Thanks for this information @cmdoret

I just updated the installation guide into::

$ conda install -c r r=3.5.1 rpy2=2.9.4 r-mgcv=1.8_23

XiaoTaoWang avatar Jun 09 '21 19:06 XiaoTaoWang

This is still not fixed on the main page.

mxw010 avatar Jan 10 '22 21:01 mxw010

Dear all, the latest NeoLoopFinder version (v0.4.0) should have solved this issue. Could you please try this new version and let me know if you still encounter the same problem? Thanks!

XiaoTaoWang avatar Sep 17 '22 04:09 XiaoTaoWang