This basic vignette shows how to perform the most basic DGCA analysis. To learn how to perform the pipeline step-by-step as well as explore some of the different options available in DGCA, please see the extended vignette in the inst/doc folder of the source package.

First, we will load the package and read in some example data from single-cell RNA-sequencing data from neurons and oligodendrocytes, generated in Darmanis et al. [@darmanis2015], cleaned for this analysis, and put in the data folder.

library(DGCA, quietly = TRUE)
data(darmanis)
data(design_mat)

Note that the design matrix is a standard design matrix as used in other packages (e.g., limma, DESEq, MatrixEQTL), and specifies the group indices to be extracted from the original columns.

To run the full differential correlation analysis and extract all of the top differentially correlated pairs, run this:

ddcor_res = ddcorAll(inputMat = darmanis, design = design_mat,
  compare = c("oligodendrocyte", "neuron"),
  adjust = "none", nPerm = 0, nPairs = 100)
head(ddcor_res)

To run the full differential correlation analysis to find the top differentially correlated pairs for one specific gene compared to all of the others, specify one gene for the "splitSet" argument. Here, we specify the gene "RTN4":

ddcor_res = ddcorAll(inputMat = darmanis, design = design_mat,
  compare = c("oligodendrocyte", "neuron"),
  adjust = "perm", nPerm = 5, splitSet = "RTN4")
head(ddcor_res)

To plot the differential correlations between RTN4 and its top target, you can use this function:

plotCors(inputMat = darmanis, design = design_mat,
  compare = c("oligodendrocyte", "neuron"), geneA = "RTN4", geneB = "COX6A1")

As a convenience function, DGCA also offers users the ability to plot the values of individual genes across conditions. For example, for RTN4:

plotVals(inputMat = darmanis, design = design_mat,
  compare = c("oligodendrocyte", "neuron"), gene = "RTN4") 

References



andymckenzie/DGCA documentation built on Sept. 15, 2023, 5:04 a.m.