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

Error when running init(sclvm,Y=Y,tech_noise = tech_noise) #15

Open
zji90 opened this issue Jul 19, 2016 · 10 comments
Open

Error when running init(sclvm,Y=Y,tech_noise = tech_noise) #15

zji90 opened this issue Jul 19, 2016 · 10 comments

Comments

@zji90
Copy link

zji90 commented Jul 19, 2016

Hi,
I have already installed scLVM R package and limix (from anaconda) and is trying to go through the vignette. However, I encountered the following error when running init(sclvm,Y=Y,tech_noise = tech_noise):

Loading required package: rPython
Loading required package: RJSONIO
Error in python.exec(paste(objName, " = scLVM(Y,geneID=geneID,tech_noise=tech_noise)", : name 'scLVM' is not defined

All the previous code are exactly the same as the ones in the vignette. I am wondering why this error occurs and how to fix it. Thanks!

Below is the sessioninfo:

                             R version 3.2.3 (2015-12-10)
                       Platform: x86_64-apple-darwin13.4.0 (64-bit)
                       Running under: OS X 10.11.3 (El Capitan)

                       locale:
                             [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

                       attached base packages:
                             [1] parallel  stats4    stats     graphics  grDevices utils     datasets  methods  
                       [9] base     

                       other attached packages:
                             [1] rPython_0.0-6             RJSONIO_1.3-0             org.Mm.eg.db_3.1.2       
                       [4] RSQLite_1.0.0             DBI_0.3.1                 AnnotationDbi_1.30.1     
                       [7] Biobase_2.28.0            scLVM_0.99.2              DESeq2_1.8.2             
                       [10] RcppArmadillo_0.6.600.4.0 Rcpp_0.12.5               GenomicRanges_1.20.8     
                       [13] GenomeInfoDb_1.4.3        IRanges_2.2.9             S4Vectors_0.6.6          
                       [16] BiocGenerics_0.14.0       gplots_3.0.1              ggplot2_2.1.0            
                       [19] statmod_1.4.24            genefilter_1.50.0        

                       loaded via a namespace (and not attached):
                             [1] RColorBrewer_1.1-2   futile.logger_1.4.1  plyr_1.8.4          
                       [4] XVector_0.8.0        bitops_1.0-6         futile.options_1.0.0
                       [7] tools_3.2.3          rpart_4.1-10         lattice_0.20-33     
                       [10] annotate_1.46.1      gtable_0.2.0         gridExtra_2.2.1     
                       [13] cluster_2.0.3        gtools_3.5.0         caTools_1.17.1      
                       [16] locfit_1.5-9.1       nnet_7.3-12          grid_3.2.3          
                       [19] XML_3.98-1.4         survival_2.38-3      BiocParallel_1.2.22 
                       [22] foreign_0.8-66       latticeExtra_0.6-28  gdata_2.17.0        
                       [25] Formula_1.2-1        geneplotter_1.46.0   lambda.r_1.1.7      
                       [28] scales_0.4.0         Hmisc_3.17-2         splines_3.2.3       
                       [31] rsconnect_0.4.2.2    xtable_1.8-2         colorspace_1.2-6    
                       [34] KernSmooth_2.23-15   acepack_1.3-3.3      munsell_0.4.3       
@emerygoossens
Copy link

I am also having this issue. Any help would be appreciated.

@flophys
Copy link
Member

flophys commented Sep 6, 2016

This seems to be an issue with a specific R-python combination which I couldn't reproduce. Try this workaround:

When attaching the package, this line is normally executed: python.load(system.file("pysrc","init_data.py",package="scLVM“))
It seems this doesn’t happen for you which is why it doesn’t find the scLVM function. Execute this manually after loading the package, this normally solves the problem.

@lrodda
Copy link

lrodda commented Sep 8, 2016

This work around worked well for the init function, but I got a very similar error when trying to run Ycorr = getCorrectedExpression(sclvm)

Error in python.exec(paste("Ycorr = ", objName, ".getCorrectedExpression(rand_eff_ids)", :
name 'sclvm' is not defined

Is there a similar work around?

@emerygoossens
Copy link

I had a similar problem with this. My problem went away when I correctly installed rPython. First, make sure your ~/bash_To do this, download a new rPython package and open your terminal and type these commands

python --version
export RPYTHON_PYTHON_VERSION="whatever python anaconda version such as 2.7.12"
R CMD INSTALL /Users/egoossen/Downloads/rPython_0.0-6.tar.gz

Now go into R and type

library(rPython)
python.exec("import sys; print(sys.version)")

and verify that it is the same. When you load the scLVM package more than once, it doesn't give the same error about differing versions of python between the system and rPython versions.

@BinDuan
Copy link

BinDuan commented May 3, 2017

I have the same problem. I tried set "export RPYTHON_PYTHON_VERSION=2.7.13", and "R CMD INSTALL rPython_0.0-6.tar.gz", but when I check like this:
library(rPython)
python.exec("import sys;print(sys.version)")

I got something like:
"2.7.12 (default, Nov 19 2016, 06:48:10)
[GCC 5.4.0 20160609]
"
I have several python version, and 2.7.13 is in the anaconda. Obviously, set "export" is invalid. Then, how should I do?

@BinDuan
Copy link

BinDuan commented May 8, 2017

I'm sure that my rPython was installed correctly now, but there was something wrong with scLVM like below:

library(scLVM)
[1] "It seems python package deprecated is not installed. Try to install it using 'pip install deprecated ' If the package is installed already, make sure rPyhton is using the correct python version. If you have several versions of python installed, have a look at our installation guide on github."

And when I tried to install deprecated like below:
pip install deprecated
Collecting deprecated
Could not find a version that satisfies the requirement deprecated (from versions: )
No matching distribution found for deprecated
I don't know why, and I'll appreciate if someone can give me a hand.

@Shians
Copy link

Shians commented Jun 9, 2017

Also having this problem with "deprecated". This is caused by the attempt to import limix.deprecated. From what I gather at some point they deprecated a whole version of LIMIX, they then deprecated that whole LIMIX package and made a new one with the same name. Now the new one does not have the deprecated version included and I assume this is the version installed by pip, so scLVM will not find limix.deprecated.

If the new version is backwards compatible then it may be possible to simply import limix rather than limix.deprecated, otherwise one would need to install the deprecated version of limix to get this software to work.

@flophys
Copy link
Member

flophys commented Jun 20, 2017

@BinDuan unfortunately rPython does not work with Anaconda python (also check out the rPython docs), maybe try to use the one that came with your OS? I have fixed the "deprecated" problem though which occurred due to some changes in the latest release of limix.

@BinDuan
Copy link

BinDuan commented Jun 23, 2017 via email

@BinDuan
Copy link

BinDuan commented Jul 9, 2017 via email

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

6 participants