Visualizing Large-scale Copy Number Variation in Single-Cell RNA-Seq Expression Data

Installation

Required dependencies

inferCNV uses the R packages r CRANpkg("ape"), r Biocpkg("BiocGenerics"), r CRANpkg("binhf"), r CRANpkg("caTools"), r CRANpkg("coda"), r CRANpkg("coin"), r CRANpkg("dplyr"), r CRANpkg("doparallel"), r Biocpkg("edgeR"), r CRANpkg("fastcluster"), r CRANpkg("fitdistrplus"), r CRANpkg("foreach"), r CRANpkg("futile.logger"), r CRANpkg("future"), r CRANpkg("gplots"), r CRANpkg("ggplot2"), r CRANpkg("HiddenMarkov"), r CRANpkg("reshape"), r CRANpkg("rjags"), r CRANpkg("RColorBrewer"), r Biocpkg("SingleCellExperiment"), r Biocpkg("SummarizedExperiment") and imports functions from the archived r CRANpkg("GMD").

Installing

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

Optional extension

If you want to use the interactive heatmap visualization, please check the add-on packge R r Githubpkg ("broadinstitute/inferCNV_NGCHM") after installing the packages r CRANpkg("tibble"), r Githubpkg("bmbroom/tsvio") and r Githubpkg("bmbroom/NGCHMR"). To install optional packages, type the following in an R command window:

install.packages("tibble")

install.packages("devtools")
devtools::install_github("bmbroom/tsvio")
devtools::install_github("bmbroom/NGCHMR", ref="stable")
devtools::install_github("broadinstitute/inferCNV_NGCHM")

And download the NGCHM java application by typing the following in a regular shell: ```{bash, eval = FALSE} wget http://tcga.ngchm.net/NGCHM/ShaidyMapGen.jar

```r
knitr::opts_chunk$set(echo = TRUE)
library(infercnv)

Running InferCNV

Create the InferCNV Object

Reading in the raw counts matrix and meta data, populating the infercnv object

infercnv_obj = CreateInfercnvObject(
  raw_counts_matrix="../inst/extdata/oligodendroglioma_expression_downsampled.counts.matrix.gz",
  annotations_file="../inst/extdata/oligodendroglioma_annotations_downsampled.txt",
  delim="\t",
  gene_order_file="../inst/extdata/gencode_downsampled.EXAMPLE_ONLY_DONT_REUSE.txt",
  ref_group_names=c("Microglia/Macrophage","Oligodendrocytes (non-malignant)"))

Running the full default analysis

out_dir = tempfile()
infercnv_obj_default = infercnv::run(
    infercnv_obj,
    cutoff=1, # cutoff=1 works well for Smart-seq2, and cutoff=0.1 works well for 10x Genomics
    out_dir=out_dir,
    cluster_by_groups=TRUE, 
    plot_steps=FALSE,
    denoise=TRUE,
    HMM=FALSE,
    no_prelim_plot=TRUE,
    png_res=60
)

Basic ouput from running inferCNV.

knitr::include_graphics(paste(out_dir, "infercnv.png", sep="/"))

Additional Information

Online Documentation

For additional explanations on files, usage, and a tutorial please visit the wiki.

TrinityCTAT

This tool is a part of the TrinityCTAT toolkit focused on leveraging the use of RNA-Seq to better understand cancer transcriptomes. To find out more please visit TrinityCTAT

Applications

This methodology was used in:

Anoop P. Patel et al. Single-cell RNA-seq highlights intratumoral heterogeneity in primary glioblastoma. Science. 2014 Jun 20: 1396-1401

Tirosh I et al.Dissecting the multicellular ecosystem of metastatic melanoma by single-cell RNA-seq. Science. 2016 Apr 8;352(6282):189-96

Session info

sessionInfo()


Try the infercnv package in your browser

Any scripts or data that you put into this service are public.

infercnv documentation built on Nov. 8, 2020, 11:10 p.m.