IBRAP dependencies

Software Description
R version >=4.0.0 IBRAP dependes on packages that are updated to at this version of R
python version >=3.8 IBRAP also uses python packages to analyse scRNA-seq data
Xcode version version >=11.3.1 ImageMagick is an image processing software and is a dependency for the celda package which contains decontX. If you do not plan on using DecontX then this is not required
ImageMagick version >=6.9.10-86 Xcode installs fundamental compilers (including GCC) which are required for R and Python package installations
devtools any version devtools enables the user to install packages directly from GitHub pages
anaconda version >=4.10.3 anaconda is required for R to access the python coding language

Installing IBRAP

IBRAP installation and its dependencies R-based dependencies is fully automated and can be performed using the following command in R:


install.packages('devtools')
devtools::install_github('connorhknight/IBRAP')

IBRAP automatically installs 44 R-based packages and their dependencies, hence a long installation time is to be expected. This could be anywhere between 30 minutes to to more than 2 hours according to the computational resources available and internet speed.

Now, we have installed the dependencies for IBRAP external to and within R. We now need to install the dependencies for Python.

Installing destiny and celda

To access diffusion maps, we must install celda, a package that is tricky to install automatically, thus it is easier for the user to install it directly using the following command in the R-terminal:


BiocManager::install("destiny")

This should have successfully installed destiny into R. Next, we focus on celda.

Celda requires ImageMagick which some users may experience difficulty in installing, hence we did not list it as a dependency. Please note that if you could not install ImageMagick do not install celda since it will not work. However, if you were successful you can install it manually in the R-terminal:


BiocManager::install("celda")

There is a second package

Installing miniconda

IBRAP not only uses scRNA-seq analytical packages contained in the R programming language, but also packages available in Python. Therefore, we are required to install a package that enables us to access python from within R. For this purpose, we installed Reticulate as one of our dependencies. Reticulate uses a bash-based software called miniconda, which enables a user to access python in a virtual environment from within the R terminal. Indeed, we can install miniconda from our R terminal using the following command in R:

# this command may ask to create a directory, which you can agree to and perhaps note where the package is being installed to. 

reticulate::install_miniconda()

Once we have install miniconda, we must produce a virtual enviornment to install our python packages, as shown in the dependencies table we require the python version to be at least 3.8. We generated a file which automatically installs these dependencies correctly, it can be downloaded using the link prior to conda_create.

# Use this link and command for Intel CPU mac hardware
system('curl -LJO https://raw.githubusercontent.com/connorhknight/IBRAP/main/data/IBRAP.yaml')
reticulate::conda_create(envname = "IBRAP", environment = "IBRAP.yaml")

# Use this link and command for M1 Chip CPU mac hardware
system('curl -LJO https://raw.githubusercontent.com/connorhknight/IBRAP/main/data/IBRAP_M1chip.yaml')
reticulate::conda_create(envname = "IBRAP", environment = "IBRAP_M1chip.yaml")

This will install a fresh virtual environment for us to use. Normally, R will source the general operating systems python or a python package you installed to your system and will not automatically use our python version from our IBRAP environment, therefore we must tell it where to find OUR version of python. Below, we displayed the correct command to tell python where to find our version of Python, whcih requires us to specify the directory lcoation. When you created the virtual environment the pathway where python was installed is usually printed last on your R terminal. However, if you missed it we included a default saving location for MacOS.


reticulate::use_python('~/Library/r-miniconda/envs/IBRAP/bin/python',required = T)
# note that his may not always be the pathway for your specific computer if there some configuration have happened. Therefore, it is always best to check. 

Please note, this command will only work in the current session you are using and R will revert back to the original python when you next use R. You can overcome this by forcing R to use this version of python every time you open R. When R is first initiated it can be told to run a set of commands prior to you using it. These commands are within a file called .Rprofile which is contained in your home directory (~) (note than some users may not have this file, it is completely okay for you to create your own using Nano). To do this, perform the following in bash:

Then you can close the editor using ctrl + x and then enter to save. Now, R will always source our version of python.

In total, 15 python packages are installed and their dependencies. You can repeat this command and it will tell you whether you have the correct versions installed or if any are missing, if it is unable to install the package itself it will tell which packages require manual installation.

Well done for installing IBRAP, that may have been a slightly long progress, but you have now installed a wide range of IBRAP dependencies (61 directly installed packages and their own dependencies) for scRNA-seq analytics that you can not only use in IBRAP, but outside of IBRAP too! Next, you must get to grips with how IBRAP functions, for this we have included some tutorials to explain the process. For example, we have one dedicted to generally using IBRAP with a single sample in getting started tutorial, when the need arises for using multiple samples and integrating them, we have you covered in our integration.

Good luck! And if you need any help, please feel free to leave a comment in our issues page on our GitHub.