Skip to content

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
zhanghao-njmu committed Dec 18, 2022
2 parents f0d778a + 92ea8d7 commit 4f4f3ef
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
7 changes: 6 additions & 1 deletion R/zzz.R
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
.onAttach <- function(libname, pkgname) {
options(future.globals.maxSize = Inf)
options(expressions = 5e5)
env_exist <- isTRUE(tryCatch("SCP" %in% reticulate::conda_list()$name[grep(reticulate:::conda_info()$conda_prefix, reticulate::conda_list()$python)], error = identity))
conda_exist <- reticulate:::conda_installed()
if (conda_exist) {
env_exist <- file.exists(paste0(reticulate:::conda_info()$conda_prefix, "/envs/SCP"))
} else {
env_exist <- FALSE
}
if (env_exist && (is.null(getOption("SCP_env_init")) || getOption("SCP_env_init") != FALSE)) {
try({
python_path <- reticulate::conda_python("SCP")
Expand Down
2 changes: 1 addition & 1 deletion README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ devtools::install_github("zhanghao-njmu/SCP")

#### Create SCP python environment

In order to run functions such as "RunSCVELO" or "RunPAGA", SCP requires [conda](https://docs.conda.io/en/latest/miniconda.html) to create a separate python environment.
To run functions such as `RunSCVELO` or `RunPAGA`, SCP requires [conda](https://docs.conda.io/en/latest/miniconda.html) to create a separate python environment.

You can use `PrepareEnv()` to automatically download and install a miniconda.

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ devtools::install_github("zhanghao-njmu/SCP")

#### Create SCP python environment

In order to run functions such as RunSCVELO or RunPAGA, SCP requires
To run functions such as `RunSCVELO` or `RunPAGA`, SCP requires
[conda](https://docs.conda.io/en/latest/miniconda.html) to create a
separate python environment.

Expand Down

0 comments on commit 4f4f3ef

Please sign in to comment.