NathanSkene / EWCE

Expression Weighted Celltype Enrichment. See the package website for up-to-date instructions on usage.
https://nathanskene.github.io/EWCE/index.html
53 stars 25 forks source link

bin.specificity.into.quantiles NOT in namespace #3

Closed alexandruioanvoda closed 5 years ago

alexandruioanvoda commented 5 years ago
> ctd = prepare.quantile.groups(ctd,specificity_species="human",numberOfBins=40)
Error: 'bin.specificity.into.quantiles' is not an exported object from 'namespace:EWCE'

This hasn't happened before. Must be a consequence of me updating to the last version, as the error is still there after

> devtools::install_github("nathanskene/ewce")
Skipping install of 'EWCE' from a github remote, the SHA1 (50b9fe0c) has not changed since last install.
  Use `force = TRUE` to force installation
> devtools::install_github("nathanskene/ewce", force=TRUE)
[...]
Installing package into *************************
(as ‘lib’ is unspecified)
* installing *source* package ‘EWCE’ ...
** R
** data
*** moving datasets to lazyload DB
** byte-compile and prepare package for lazy loading
** help
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded
* DONE (EWCE)
> library(EWCE)
> ctd = prepare.quantile.groups(ctd,specificity_species="human",numberOfBins=40)
Error: 'bin.specificity.into.quantiles' is not an exported object from 'namespace:EWCE'
NathanSkene commented 5 years ago

Thanks for reporting. I've fixed the namespace now.

blabarre commented 3 years ago

Hi, I know that this issue has been closed (a while now), but I am getting the same error now, whether I force install of the Bioconductor version or direct from the github repo (so, loading as EWCE_1.0.0 or as EWCE_1.1.1). Is there something else I should try?

My guess would be that it is still trying to call "bin.specificity.into.quantiles" when it has been changed to "bin_specificity_into_quantiles"

Al-Murphy commented 3 years ago

Hi,

What version of R are you running? You need to install R 4.1 to use EWCE. Then you can install EWCE from Bioconductor:

BiocManager::install("EWCE")

See the webpage vignette: https://nathanskene.github.io/EWCE/articles/EWCE.html

Note you may need to uninstall whatever version of EWCE you currently have

Thanks, Alan

blabarre commented 3 years ago

Yes, I am running R version 4.1.0, and had tried installing through Bioconductor as you suggest, and also straight from the github repo.

I was able to work around it by just looking into what "prepare.quantile.groups" was doing, made all the interior functions their own functions, and then ran the lapply calls at the end. Also, the "bin.specificityDistance.into.quantiles" function and "bin.expression.into.quantiles" call EWCE::bin.columns.into.quantiles, which needed to be changed to EWCE::bin_columns_into_quantiles. And then the "ctd = lapply(ctd, EWCE::bin.specificity.into.quantiles, numberOfBins = numberOfBins)" needed go be changed to EWCE::bin_specificity_into_quantiles.

Al-Murphy commented 3 years ago

So that function doesn't exist in the new EWCE Bioconductor R package:

> EWCE:::bin.columns.into.quantiles
Error: object 'bin.columns.into.quantiles' not found

You must still have an old version of EWCE installed or loaded. I think you need to uninstall whatever version you have. You can do this in rStudio at the bottom right in the packages tab if you are having difficulty doing this. Then clear all objects from the workspace and then restart the R session. If this doesn't work please try it on a colleagues machine and let me know the results.

The package isn't failing any checks on linux, mac or windows so I don't believe the issue is with the package. If you still have issues perhaps you can try the docker image (https://hub.docker.com/r/nathanskene/ewce) which has been updated with R 4.1 and the bioconductor EWCE package.

Let me know how this all goes.

Thanks, Alan.

blabarre commented 3 years ago

Hrm, that is strange. I had only recently loaded/installed it in new conda environment, so I'm not sure where it would be finding an older version. I'll try and test some things out.

blabarre commented 3 years ago

Okay, so I think that my problem was actually coming from a call from "MAGMA.Celltyping" instead of EWCE itself. I have tried uninstalling and re-installing both packages, and then looked into the "prepare.quantile.groups()" function, which is where the problem was occurring, and this is being called from the namespace of MAGMA.Celltyping, and still had the "." function names instead of the "" function names in those calls. If I allow the EWCE version to be "updated" to the deprecated version (function names still have "." instead of "") when installing MAGMA.Celltyping, everything runs fine because it is still making calls to the EWCE version with the old function names.

So, the problem was occurring because I had individually installed the most updated versions of the both packages, having the older version I am now able to run the MAGMA analysis I was actually trying to run (that was throwing the errors). Thanks for you help!

Al-Murphy commented 3 years ago

Ah okay, that makes sense. So MAGMA.Celltyping currently still depends on the old version of EWCE, available at neurogenomics/EWCE. This will be updated in the future but we have held off initially to give users time to switch to R 4.1 after EWCE was released on Bioconductor last month (since EWCE requires R 4.1, so then too would MAGMA.Celltyping).

Sorry about the confusion around this, I didn't realise you were trying to run MAGMA.Celltyping. We are also trying to deal with the transition to the new EWCE version the best possible way, please bear with us!