Title: | Quantify Rhythmic Gene Co-Expression Relative to a Reference |
---|---|
Description: | Infer progression of circadian rhythms in transcriptome data in which samples are not labeled with time of day and coverage of the circadian cycle may be incomplete. See Shilts et al. (2018) <doi:10.7717/peerj.4327>. |
Authors: | Jake Hughey [aut, cre], Elliot Outland [aut] |
Maintainer: | Jake Hughey <[email protected]> |
License: | GPL-2 |
Version: | 1.0.4 |
Built: | 2025-01-19 02:59:34 UTC |
Source: | https://github.com/hugheylab/deltaccd |
Quantify the similarity of gene co-expression between a reference and a test dataset. Statistical significance is calculated using permutation of the genes.
calcCCD( refCor, emat, groupVec = NULL, refEmat = NULL, nPerm = 1000, geneNames = NULL, dopar = FALSE, scale = FALSE )
calcCCD( refCor, emat, groupVec = NULL, refEmat = NULL, nPerm = 1000, geneNames = NULL, dopar = FALSE, scale = FALSE )
refCor |
Correlation matrix to be used as the reference, such as comes
from |
emat |
Matrix of expression values, where each row corresponds to a
gene and each column corresponds to a sample. The rownames and colnames of
|
groupVec |
Optional vector indicating the group to which group each sample belongs. If not provided, the function assumes all samples belong to the same group. |
refEmat |
Optional expression matrix for calculating co-expression for
the reference, with the same organization as |
nPerm |
Number of permutations for assessing statistical significance. |
geneNames |
Optional vector indicating a subset of genes in |
dopar |
Logical indicating whether to process features in parallel. Make sure to register a parallel backend first. |
scale |
Logical indicating whether to scale CCD by the number of gene pairs. |
A data.table with columns for group name, CCD, and p-value.
getRefCor()
, calcDeltaCCD()
, plotHeatmap()
set.seed(35813) refCor = getRefCor() ccdResult = calcCCD(refCor, GSE19188$emat, GSE19188$groupVec, nPerm = 100)
set.seed(35813) refCor = getRefCor() ccdResult = calcCCD(refCor, GSE19188$emat, GSE19188$groupVec, nPerm = 100)
Calculate the difference between the clock correlation distances (CCDs), relative to a reference, for two groups of samples. Statistical significance is calculated using permutation of the samples that belong to either of those two groups.
calcDeltaCCD( refCor, emat, groupVec, groupNormal, refEmat = NULL, nPerm = 1000, geneNames = NULL, dopar = FALSE, scale = FALSE )
calcDeltaCCD( refCor, emat, groupVec, groupNormal, refEmat = NULL, nPerm = 1000, geneNames = NULL, dopar = FALSE, scale = FALSE )
refCor |
Correlation matrix to be used as the reference, such as comes
from |
emat |
Matrix of expression values, where each row corresponds to a gene
and each column corresponds to a sample. The rownames and colnames of
|
groupVec |
Vector indicating the group to which group each sample belongs. It's ok for groupVec to have more than two groups. |
groupNormal |
Value indicating the group in groupVec that corresponds to normal or healthy. Other groups will be compared to this group. |
refEmat |
Optional expression matrix for calculating co-expression for
the reference, with the same organization as |
nPerm |
Number of permutations for assessing statistical significance. |
geneNames |
Optional vector indicating a subset of genes in |
dopar |
Logical indicating whether to process features in parallel. Make sure to register a parallel backend first. |
scale |
Logical indicating whether to use scaled CCDs to calculate difference. |
A data.table with columns for group 1, group 2, deltaCCD, and
p-value. In each row, the deltaCCD is the CCD of group 2 minus the CCD of
group 1, so group 1 corresponds to groupNormal
.
getRefCor()
, calcCCD()
, plotHeatmap()
set.seed(35813) refCor = getRefCor() deltaCcdResult = calcDeltaCCD( refCor, GSE19188$emat, GSE19188$groupVec, 'healthy', nPerm = 100)
set.seed(35813) refCor = getRefCor() deltaCcdResult = calcDeltaCCD( refCor, GSE19188$emat, GSE19188$groupVec, 'healthy', nPerm = 100)
The pan-tissue reference matrix is based on a fixed-effects meta-analysis of eight circadian transcriptome datasets from mice, as described in Shilts et al. 2018(doi:10.7717/peerj.4327). The human blood reference matrix is based an analysis of three microarray datasets (manuscript in preparation).
getRefCor( species = c("human", "mouse"), tissue = c("pan", "blood"), useEntrezGeneId = TRUE )
getRefCor( species = c("human", "mouse"), tissue = c("pan", "blood"), useEntrezGeneId = TRUE )
species |
Currently either 'human' or 'mouse'. Only affects the row and column names of the correlation matrix, not the actual values. |
tissue |
One of either 'pan' or 'blood'. |
useEntrezGeneId |
If |
A matrix of Spearman correlation values.
GSE19188, plotRefHeatmap()
, calcCCD()
, calcDeltaCCD()
Data of gene expression measured by microarray for samples from human non-small cell lung cancer.
GSE19188
GSE19188
A list with two objects:
Matrix of normalized expression values, where each row corresponds to a gene (rownames are Entrez Gene IDs) and each column corresponds to a sample. To save space, genes have been downsampled.
Vector of condition (tumor or healthy) for each sample.
https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=GSE19188
getRefCor()
, calcCCD()
, calcDeltaCCD()
Make heatmaps of the co-expression (Spearman correlation) between pairs of selected genes in a dataset.
plotHeatmap(geneNames, emat, groupVec = NULL)
plotHeatmap(geneNames, emat, groupVec = NULL)
geneNames |
Vector indicating the subset of genes in the rownames of
|
emat |
Matrix of expression values, where each row corresponds to a
gene and each column corresponds to a sample. The elements of |
groupVec |
Optional vector indicating the group to which group each sample belongs. If not provided, the function assumes all samples belong to the same group. |
A ggplot
object, which can be saved using ggplot2::ggsave()
.
Heatmap colors will be directly comparable to any heatmaps created by this
function or by plotRefHeatmap()
.
calcCCD()
, calcDeltaCCD()
, plotRefHeatmap()
refCor = getRefCor() pRef = plotRefHeatmap(refCor) pTest = plotHeatmap(rownames(refCor), GSE19188$emat, GSE19188$groupVec)
refCor = getRefCor() pRef = plotRefHeatmap(refCor) pTest = plotHeatmap(rownames(refCor), GSE19188$emat, GSE19188$groupVec)
Make a heatmap of the reference correlation matrix for gene co-expression.
plotRefHeatmap(refCor)
plotRefHeatmap(refCor)
refCor |
Correlation matrix, such as comes from |
A ggplot
object, which can be saved using ggplot2::ggsave()
.
Heatmap colors will be directly comparable to any heatmaps created by this
function or by plotHeatmap()
.
refCor = getRefCor() pRef = plotRefHeatmap(refCor) pTest = plotHeatmap(rownames(refCor), GSE19188$emat, GSE19188$groupVec)
refCor = getRefCor() pRef = plotRefHeatmap(refCor) pTest = plotHeatmap(rownames(refCor), GSE19188$emat, GSE19188$groupVec)