digitalcytometry / cytotrace2

CytoTRACE 2 is an interpretable AI method for predicting cellular potency and absolute developmental potential from scRNA-seq data.
Other
85 stars 6 forks source link

Error of installing cytotrace2 R #10

Closed LiuCanidk closed 5 months ago

LiuCanidk commented 5 months ago

I was trying to install the CytoTRACE2 as the tutorial guide shows but encountered an error:

image

Any solution would be greatly appreciated!

savagyan00 commented 5 months ago

Hi and thank you for your interest in CytoTRACE 2!

Given the error message you've received, the problem seems to be connected to the devtools' install_github function, and might be platform-specific, related to the R version you're using, or due to firewall/proxy settings on your system. I’d recommend manually installing the repository instead—you can refer to "Manual download and installation" section in our README. If you’d prefer to troubleshoot the devtools error instead, here are some suggestions you might try:

  1. Update R and devtools package to their latest versions if possible.
  2. If you're behind a proxy or firewall, setting the download method to libcurl can help: options(download.file.method = "libcurl")
  3. In some cases, increasing the timeout for downloads can help if the issue is related to a slow connection: options(timeout = 300) # i.e. set to 5 minutes

Let us know if any of the recommendations work for you or if we can provide any further guidance!

LiuCanidk commented 5 months ago

Hi @savagyan00 Thanks for your reply. I tried to install the package locally. It worked with "git clone" plus "devtools::load_all", but I found it worked only once, which means I have to devtools::load_all every time I start a new session.

So can I understand that the "library" function was substituted by "devtools::load_all" function if I install it locally?

Becasue I never met the condition of installing the github package from a sub-directory (cytotrace2_r) of the repository, I wonder if there is any approach to install it locally by generating the github zip files and use "devtools::install_local" function? It can permenantly install the package and use the more familar function "library".

savagyan00 commented 5 months ago

Hello,

I'm glad to hear that our suggestion worked for you! You’re right in noting that devtools::load_all() is similar to library(), as both load package functions into the current session's environment. To install and load the package using the library() function after cloning, you can also use the devtools::install_local() function you mentioned, with the path to the "cytotrace2_r" subdirectory. devtools::install_local("./cytotrace2_r") # if you are inside the cloned cytotrace2 folder After installation, you should be able to load the package with library(CytoTRACE2).

Let us know if we can assist further!

LiuCanidk commented 5 months ago

Thank you for your detailed reply!