Learn R Programming

⚠️There's a newer version (1.0.3) of this package.Take me there.

DGCA

The goal of DGCA is to calculate differential correlations across conditions.

It simplifies the process of seeing whether two correlations are different without having to rely solely on parametric assumptions by leveraging non-parametric permutation tests and adjusting the resulting empirical p-values for multiple corrections using the qvalue R package.

It also has several other options including calculating the average differential correlation between groups of genes, gene ontology enrichment analyses of the results, and differential correlation network identification via integration with MEGENA.

Installation

You can install DGCA from CRAN with:

install.packages("DGCA")

You can install the development version of DGCA from github with:

# install.packages("devtools")
devtools::install_github("andymckenzie/DGCA")

Basic Example

library(DGCA)
data(darmanis); data(design_mat)
ddcor_res = ddcorAll(inputMat = darmanis, design = design_mat, compare = c("oligodendrocyte", "neuron"))
head(ddcor_res, 3)
#   Gene1  Gene2 oligodendrocyte_cor oligodendrocyte_pVal neuron_cor neuron_pVal
# 1 CACYBP   NACA        -0.070261455           0.67509118  0.9567267           0
# 2 CACYBP    SSB        -0.055290516           0.74162636  0.9578999           0
# 3 NDUFB9    SSB        -0.009668455           0.95405875  0.9491904           0
#   zScoreDiff     pValDiff     empPVals pValDiff_adj Classes
# 1  10.256977 1.100991e-24 1.040991e-05    0.6404514     0/+
# 2  10.251847 1.161031e-24 1.040991e-05    0.6404514     0/+
# 3   9.515191 1.813802e-21 2.265685e-05    0.6404514     0/+

Vignettes

There are three vignettes available in order to help you learn how to use the package:

  • DGCA Basic: This will get you going quickly.
  • DGCA: This is a more extended version that explains a bit about how the package works and shows several of the options available in the package.
  • DGCA Modules: This will show you how to use the package to perform module-based and network-based analyses.

The second two vignettes can be found in inst/doc.

Applications

You can view the manuscript describing DGCA in detail as well as several applications here:

Material for associated simulations and networks created from MEGENA can be found here:

Copy Link

Version

Install

install.packages('DGCA')

Monthly Downloads

61

Version

1.0.2

License

GPL-3

Maintainer

Andrew McKenzie

Last Published

December 9th, 2019

Functions in DGCA (1.0.2)

extractModuleGO

Extract results from the module GO analysis
makeDesign

Create a design matrix from a character vector.
dCorAvg

Get average empirical differential correlations.
ddcorAll

Calls the DGCA pairwise pipeline.
getGroupsFromDesign

Split input matrix(es) based on the design matrix.
plotModuleGO

Plot extracted results from module-based GO enrichment analysis using ggplot2.
corMats-class

An S4 class to store correlation matrices and associated info.
getCors

Compute matrices necessary for differential correlation calculation.
ddMEGENA

Integration function to use MEGENA to perform network analyses of DGCA results.
findGOTermEnrichment

Find GO enrichment for a gene vector (using GOstats).
ages_darmanis

Brain sample ages vector.
moduleGO

Perform module GO-trait correlation
pairwiseDCor

Calculate pairwise differential correlations.
plotGOTwoGroups

Plot results from a hypergeometric enrichment test to compare two conditions.
matCorSig

Calculate correlation matrix p-values.
matCorr

Calculate a correlation matrix.
plotGOOneGroup

Plot results from a hypergeometric enrichment test for one condition.
dcTopPairs

Creates a data frame for the top differentially correlated gene pairs in your data set.
bigEmpPVals

Use speed-optimized sorting to calculate p-values observed and simulated null test statistic using a reference pool distribution.
ddplot

Create a heatmap showing the correlations in two conditions.
design_mat

Design matrix of cell type specifications of the single-cell RNA-seq samples.
filterGenes

Filter rows out of a matrix.
getDCorPerm

Get permuted groupwise correlations and pairwise differential correlations.
getDCors

Get groupwise correlations and pairwise differential correlations.
plotVals

Creates a dotplot of the overall values for an individual gene in multiple conditions.
switchGenesToHGCN

Switches a gene vector to cleaned HGNC symbols.
matNSamp

Find the number of non-missing values.
permQValue

Calculate q-values from DGCA class objects based on permutation-based empirical null statistics.
moduleDC

Calculate modular differential connectivity (MDC)
plotCors

Plot gene pair correlations in multiple conditions.
topDCGenes

Ranks genes by their total number of differentially correlated gene pairs.
adjustPVals

Adjusts a numeric vector of p-values.
dCorMats

Finds differential correlations between matrices.
dCorrs

Differential correlation between two conditions.
DGCA

DGCA: An R package for Differential Gene Correlation Analysis
dCorClass

Classify differential correlations.
darmanis

Single-cell gene expression data from different brain cell types.
dcPair-class

S4 class for pairwise differential correlation matrices and associated info.
ddcorFindSignificant

Find groups of differentially correlated gene symbols.
ddcorGO

Gene ontology of differential correlation-classified genes.