Unable to install "limma" package on RStudio
3
0
Entering edit mode
jaydengitt • 0
@08c43dc4
Last seen 2.7 years ago
United Kingdom

Hi Guys!

I'm currently trying to perform differential gene expression analysis on Affymetrix microarray data. I'm planning on using the limma package from Bioconductor but it is not working!

I've spent the last two days trying to find a workaround for this. I've updated my R (4.1.2) and have deleted and reinstalled multiple times. I have also deleted the Bioconductor package and reinstalled but this has not worked. I'm using a MacBook Pro M1 (2021).

I have no clue how to properly format a question on here so sorry if it doesn't make sense. But this is the code I have put in and the output that I am getting.

Code:

BiocManager::install("limma")

Output:

'getOption("repos")' replaces Bioconductor standard repositories, see '?repositories' for details

replacement repositories:

CRAN: http://cran.rstudio.com/
Bioconductor version 3.14 (BiocManager 1.30.16), R 4.1.2 (2021-11-01)
Installing package(s) 'limma'
Package which is only available in source form, and may need compilation of C/C++/Fortran: ‘limma’
Do you want to attempt to install these from sources? (Yes/no/cancel)

Please could someone help! Would be eternally grateful. Thanks :)

Bioconductor limma limmaGUI • 9.2k views
ADD COMMENT
1
Entering edit mode
Mike Smith ★ 6.6k
@mike-smith
Last seen 1 day ago
EMBL Heidelberg

I'm answering this as someone who doesn't have access to an M1 Mac. Others may have more pertinent advice.

What happens if you you say "Yes" to the question about installing from sources? Does it do anything? If you have the necessary software e.g. compilers from Xcode I'd expect this to work, but it will require those additional tools.

An alternative is to use the Mac version of R for Intel CPUs and run it with Rosetta. Bioconductor build binary packages for this platform and you should be able to install whatever package you like without requiring any additional software. From what I've read there's no discernible speed difference between using the Arm and Intel versions of R on a M1 processor, so buy picking the Intel version you gain compatibility without really sacrificing anything.

ADD COMMENT
0
Entering edit mode

Thank you so much Mike!

I needed this work done for my thesis and was getting really stressed out. It has worked now.

Thanks again!

ADD REPLY
1
Entering edit mode
@gordon-smyth
Last seen 9 hours ago
WEHI, Melbourne, Australia

Just to add to Mike Smith's answer: the problem is almost certainly that you have installed the arm64 version of R, but Bioconductor does not support binary package builds for that version of R. You will find that you can't install any Bioconductor packages, at least not without becoming a Fortran/C compilation expert. To solve this, you need to install the intel version of R instead. On this page:

you need to choose the first option instead of the second.

One of my PhD students is currently using an M1 Macbook Pro and the intel version of R works fine for him.

ADD COMMENT
0
Entering edit mode

Have just switched to the intel version and it now works! Thanks. It makes sense as it worked on my previous MacBook.

Best, Jayden

ADD REPLY
1
Entering edit mode
@vincent-j-carey-jr-4
Last seen 10 weeks ago
United States

The information at https://cran.r-project.org/bin/macosx/ can help you install Bioconductor packages using the "arm64" version of R if you like. You will need the Xcode toolset installed, and you will have to attend to the following, extracted from the link just given:

This release uses Xcode 12.4 and experimental GNU Fortran 11 arm64 fork. If you wish to compile R packages from sources, you may need to download GNU Fortran for arm64 from https://mac.R-project.org/libs-arm64. Any external libraries and tools are expected to live in /opt/R/arm64 to not conflict with Intel-based software and this build will not use /usr/local to avoid such conflicts.

As the respondents above note, if you use the intel-emulating version of R, you can avoid the xcode/gfortran installation and receive precompiled binaries for Bioconductor packages with BiocManager::install.

0
Entering edit mode

Thank you Vincent. All working now!

Jayden

ADD REPLY

Login before adding your answer.

Traffic: 475 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6