Skip to content

Installing infercnv

GeorgescuC edited this page Feb 24, 2021 · 12 revisions

Installing inferCNV

Using a container image

Using Docker

Pull the docker image.

sudo docker pull trinityctat/infercnv:latest

Start the image with the current working directory path bound, not saving changes to the image.

docker run --rm -it -v `pwd`:`pwd` trinityctat/infercnv:latest bash

Using Singularity

Download the pre-built image from https://data.broadinstitute.org/Trinity/CTAT_SINGULARITY/InferCNV/ :

wget https://data.broadinstitute.org/Trinity/CTAT_SINGULARITY/InferCNV/infercnv.X.Y.Z.simg

Or generate a Singularity image from the docker repo:

sudo singularity build infercnv.latest.simg docker://trinityctat/infercnv:latest

Start the image with the current working directory path bound, not saving changes to the image.

singularity shell --writable-tmpfs -e -B `pwd` infercnv.latest.simg

Or run a script directly.

singularity exec -e -B `pwd` infercnv.latest.simg Rscript infercnv_script.R 

Installing locally

Installing pre-requisites:

JAGS

In order to run infercnv, JAGS (Just Another Gibbs Sampler) must be installed.

Install JAGS

Install the JAGS package. This can be installed for Mac, Windows, or Linux. Be sure to download and install the corresponding package matching your OS.

Installing infercnv

There are several options for installing inferCNV. Choose whichever you prefer:

Option A: Install infercnv from BioConductor (preferred)

From within R, run the following:

if (!requireNamespace("BiocManager", quietly = TRUE))
     install.packages("BiocManager")
BiocManager::install("infercnv")

Option B: Install infercnv from BioConductor devel (latest version)

From within R, run the following:

if (!requireNamespace("BiocManager", quietly = TRUE))
     install.packages("BiocManager")
BiocManager::install(version = "devel")
BiocManager::install("infercnv")
Option C: Install infercnv from the Release tar.gz file

If installing using command line, download the latest release of InferCNV. Then use the following command on command line.

R CMD install infercnv.tar.gz
Option D: Install infercnv from within R using devtools

If installing from directly within R, you can instead use the following command from within R.

library("devtools")
devtools::install_github("broadinstitute/infercnv")
Option E: Install inferCNV by pulling the code using git followed by source installation:

Alternatively, you can pull the code from github and install it like so:

git clone https://github.com/broadinstitute/infercnv
cd infercnv
R
> install.packages("./", repos=NULL, type="source")
Clone this wiki locally