Installing STAR aligner on macOS Big Sur

Viewed 284

I have been trying to run the make command and keep getting error codes. I have installed gcc with homebrew. When I run the code from github

if I use

make STARforMacStatic CXX=/usr/bin/gcc

I get the following error

date: illegal option -- -
usage: date [-jnRu] [-d dst] [-r seconds] [-t west] [-v[+|-]val[ymwdHMS]] ... 
            [-f fmt date | [[[mm]dd]HH]MM[[cc]yy][.ss]] [+format]
/usr/bin/gcc -c   -O3 -std=c++11 -fopenmp -D'COMPILATION_TIME_PLACE=" :/Users/elizabethbonner/STAR-2.7.9a/source"' -D'COMPILE_FOR_MAC' -pipe -Wall -Wextra SoloFeature_collapseUMI_Graph.cpp
clang: error: unsupported option '-fopenmp'
make: *** [SoloFeature_collapseUMI_Graph.o] Error 1

I am sure I am missing something simple

1 Answers

The shortest and easiest way to install STAR aligner on a MacOS or Linux machine is to first install conda - I would install miniconda and not anaconda (because anaconda installs bunch of stuff you never need - miniconda is the stripped off version of anaconda):

# download the installer bash script by:
$ wget https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh
# then run the install script by:
$ bash Miniconda3-latest-MacOSX-x86_64.sh

then create a conda environment by:

# create a virtual environment named "star"
conda create --name star
# enter the virtual environment by:
conda activate star # or: source activate star

and then, in the environment, run this command which will install you a fully functional STAR version with all dependencies it needs:

$ conda install -c bioconda star

Conda will take care of all the dependencies and install STAR aligner and you could then immediately begin to run it.

Alternatively, if you insist in installing from source, run

$ conda install -c bioconda start --only-deps

It installs you all dependencies which STAR needs. Then, install your STAR from source whil still in the conda environment - I guess this installation will work (except the dependency versions changed ...).

Related