davidaknowles / leafcutter

Annotation-free quantification of RNA splicing. Yang I. Li, David A. Knowles, Jack Humphrey, Alvaro N. Barbeira, Scott P. Dickinson, Hae Kyung Im, Jonathan K. Pritchard
http://davidaknowles.github.io/leafcutter/
Apache License 2.0
208 stars 115 forks source link

Unable to install leafcutter R 4.2.1 #239

Open chesi opened 1 year ago

chesi commented 1 year ago

Hi, I cannot install leafcutter on my Mac (M1) on R 4.2.1 following the provided instructions (https://davidaknowles.github.io/leafcutter/articles/Installation.html)

It fails at the last step, at compilation: /Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/StanHeaders/include/stan/math/prim/core/init_threadpool_tbb.hpp:12:10: fatal error: 'tbb/task_scheduler_init.h' file not found

include <tbb/task_scheduler_init.h>

     ^~~~~~~~~~~~~~~~~~~~~~~~~~~

1 error generated. make: *** [stanExports_bb_glm.o] Error 1 ERROR: compilation failed for package ‘leafcutter’

Can you please help?

caballero commented 1 year ago

I have a similar error on Linux x64, I tried using R 3.5, 3.6, 4.0, and 4.2, version <4.0 have a dependency error for Hmisc/foreign, and for version >4.0 the error on StanHeaders is not fixable even using the dev version of Rstan and RstanHeaders.

skywalker51616 commented 1 year ago

I have the same error using Linux x64 R 4.2.2.

Yang-Yingshan commented 1 year ago

I have the same error using Linux x64 R 4.2.0,do you have the answer

jackhump commented 1 year ago

The following worked for me recently on R 4.2 on an M1 macbook:

install.packages("remotes")
remotes::install_github("stan-dev/rstantools")
remotes::install_github("davidaknowles/leafcutter/leafcutter", ref = "psi_2019")
chesi commented 1 year ago

I just tried it, it doesn’t work for me:

clang: error: the clang compiler does not support '-mtune=native' make: *** [RcppExports.o] Error 1 ERROR: compilation failed for package ‘leafcutter’

From: Jack Humphrey @.> Date: Wednesday, August 16, 2023 at 11:00 AM To: davidaknowles/leafcutter @.> Cc: Alessandra @.>, Author @.> Subject: Re: [davidaknowles/leafcutter] Unable to install leafcutter R 4.2.1 (Issue #239)

The following worked for me recently on R 4.2 on an M1 macbook:

install.packages("remotes")

remotes::install_github("stan-dev/rstantools")

remotes::install_github("davidaknowles/leafcutter/leafcutter", ref = "psi_2019")

— Reply to this email directly, view it on GitHubhttps://github.com/davidaknowles/leafcutter/issues/239#issuecomment-1680780914, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ADBMUUBKSMFZQTLWM3N4D5TXVTOABANCNFSM6AAAAAAZRVXM2A. You are receiving this because you authored the thread.Message ID: @.***>

tcashby commented 1 year ago

I make no promises but after about 6 hours of trying to make this work here's the version that finally started working:

mamba install -c conda-forge r-base=4.2.1 r-rcpp=1.0.10 r-rstan=2.21.7 r-stanheaders=2.21.0-7 r-devtools

Then, install the things it's missing, but don't update anything.

Like I say, your mileage may vary, but this is what got it working for me.

CodeOfSascha commented 8 months ago

@tcashby Thanks! It worked.

I'd like to propose the following steps i did:

mamba install -c bioconda bioconductor-biobase mamba install -c bioconda bioconductor-dirichletmultinomial R -e 'devtools::install_github("davidaknowles/leafcutter/leafcutter")'

When asked, i declined updating any packages...

Chasingwind-Z commented 7 months ago

@CodeOfSascha I'd like to know what version of R you have.

angel-bee2018 commented 1 month ago

mamba install -c conda-forge r-base=4.2.1 r-rcpp=1.0.10 r-rstan=2.21.7 r-stanheaders=2.21.0-7 r-devtools

this worked for me in R 4.3.0 I just installed the packages r-rstan=2.21.7 and r-stanheaders=2.21.0-7 using conda and copied them directly into the R library folder.

compilation takes a while though, so i dont know if i broke anything in the process but hey Leafcutter installs.

YichaoOU commented 1 month ago

Hi Guys,

Below seems to work for me:

mamba create -n leafcutter_env8
mamba activate leafcutter_env8
mamba install -c conda-forge r-rstan=2.18.2 #this installs R 3.5.1
mamba install -y -c conda-forge -c bioconda -c davidaknowles r-leafcutter --no-update-deps 
mamba install -y r-rstantools r-shinyjs  --no-update-deps
mamba install -y bioconda::bioconductor-biobase --no-update-deps
install.packages("TailRank")
R CMD INSTALL .

remove "dirichletmultinomial" requirement from DESCRIPTION now leafcutter_ds.R runs OK

zhengchangrendaye commented 6 days ago

mamba install -c conda-forge r-base=4.2.1 r-rcpp=1.0.10 r-rstan=2.21.7 r-stanheaders=2.21.0-7 r-devtools

this worked for me in R 4.3.0 I just installed the packages r-rstan=2.21.7 and r-stanheaders=2.21.0-7 using conda and copied them directly into the R library folder.

compilation takes a while though, so i dont know if i broke anything in the process but hey Leafcutter installs.

Hello, I'm tring build on R 4.3.0, when i run remotes::install_github("davidaknowles/leafcutter/leafcutter", ref = "psi_2019") ,I still face to <tbb/tbb_stddef.h> error, may i have your complete instruction ,thanks

angelbee2018 commented 5 days ago

mamba install -c conda-forge r-base=4.2.1 r-rcpp=1.0.10 r-rstan=2.21.7 r-stanheaders=2.21.0-7 r-devtools

this worked for me in R 4.3.0 I just installed the packages r-rstan=2.21.7 and r-stanheaders=2.21.0-7 using conda and copied them directly into the R library folder. compilation takes a while though, so i dont know if i broke anything in the process but hey Leafcutter installs.

Hello, I'm tring build on R 4.3.0, when i run remotes::install_github("davidaknowles/leafcutter/leafcutter", ref = "psi_2019") ,I still face to <tbb/tbb_stddef.h> error, may i have your complete instruction ,thanks

hi, i didnt specify "psi_2019" branch, i just installed it as normal. essentially i just followed the guide exactly as it was in the Leafcutter user manual but for r-stan and r-stanheaders installation, i used direct directory copy instead of using install commands