knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)

GAC: Genetic Analysis of Cells


Lifecycle: maturing R build status Codecov test coverage Travis build status CRAN status

GAC is currently in ALPHA-release

R/GAC delivers am end-to-end analysis of single-cell DNA copy number by integrating quantitative genetics, statistics, and evolutionary biology. GAC implements a simple, lightweight, and open-source R framework (Figure 1). Inspired, but unlike Seurat and Scanpy, we integrated the logic of espressioSet/AnnData into relational matrices in native R. This keeps the toolkit light, yet facilitates the integration of algorithms for the downstream analysis of single-cell DNA data wich is so desperately needed. For now GAC facilitates the downstream analyses of segmented data with universal breakpoints by concurrently managing an integer copy number (X), phenotype (Y), and metadata (qc) matrices across all cells or samples. Copy number matrices can be genrated using the output of Varbin/Ginkgo, FACETS, MUMdex, HMMcopy, or SCOPE. The unsegmented bin read counts is not a correct input. GAC incorporates ape for phylogenetic analysis, and ComplexHeatmap, an ultra-powerful tool for heatmaps to help visualize the data.

To implement GAC we require five easy to generate inputs: - a copy number / genotype matrix (X) (bins[i] x cells[j]) - a phenotype matrix (Y) (cells[j] x phenotype[y]) - a qc matrix (technical wet-lab notes) (qc) (cells[j] x qc[c]) - a gene to bin index (gene.index) - the genomic coordinates of the bins or genotypes (chromInfo) - and an optional expression matrix (currently in development) (Ye; for DNA-RNA or same-cell G+T(Macaulay, et al.2015)

Figure 1.

Installation

Dependencies:

## You can install the released version of GAC from [CRAN](https://CRAN.R-project.org) with:
# install.packages("gac")

You can install the development version from GitHub with:

# install.packages("devtools")
devtools::install_github("SingerLab/gac", force = TRUE)

Examples

This is a basic example for drawing a copy number heatmap. For a comprehensive overview of the package please follow the getting_started.Rmd in the vignettes/

library(gac)

## basic example code
data(cnr)
data(segCol)
data(legSeg)

( excl.cells <- cnr$qc$cellID[cnr$qc$qc.status == "FAIL"] )

cnr <- excludeCells(cnr, excl = excl.cells)

aH <- HeatmapCNR(cnr, col = segCol, show_heatmap_legend = FALSE)

draw(aH, annotation_legend_list = list(legSeg))

bH <- HeatmapCNR(cnr, what = "genes",
                 which.genes = c("CDK4", "MDM2", "DSP", "SMOC1"),
                 col = segCol, show_heatmap_legend = FALSE)

draw(bH, annotation_legend_list = list(legSeg))

Motivation and design

The Singer Lab single-cell wet-lab and dry-lab endevours are carried forward by a skeleton crew. The need to have simple tools to help reduce the 85% of the time spent syncronizing bins, to genes, to phenotypes, and QC matrices capable of handling a large data set of >24,000 cells was greatly needed. Knowing the data is growing by the week, I integrated functions to deal with the n+1 problem.

We hope you enjoy !

What's in the works

Licence

GAC framework and code is distributed under a BSD-3 License



SingerLab/gac documentation built on March 23, 2024, 5:15 a.m.