| rankSimilarPerturbations {cTRAP} | R Documentation |
Compare differential expression results against CMap perturbations.
rankSimilarPerturbations(diffExprGenes, perturbations,
method = c("spearman", "pearson", "gsea"), geneSize = 150,
cellLineMean = "auto", rankPerCellLine = FALSE)
diffExprGenes |
Numeric: named vector of differentially expressed genes whose names are gene identifiers and respective values are a statistic that represents significance and magnitude of differentially expressed genes (e.g. t-statistics) |
perturbations |
|
method |
Character: comparison method ( |
geneSize |
Number: top and bottom number of differentially expressed
genes for gene set enrichment (only used if |
cellLineMean |
Boolean: add a column with the mean score across cell
lines? If |
rankPerCellLine |
Boolean: when ranking results, also rank them based on
individual cell lines instead of only focusing on the mean score across
cell lines; if |
Data table with correlation or GSEA results comparing differential expression values with those associated with CMap perturbations
Weighted connectivity scores (WTCS) are calculated when method
= "gsea" (https://clue.io/connectopedia/cmap_algorithms).
Other functions related with the ranking of CMap perturbations: [.perturbationChanges,
as.table.similarPerturbations,
dim.perturbationChanges,
dimnames.perturbationChanges,
filterCMapMetadata,
getCMapConditions,
getCMapPerturbationTypes,
loadCMapData,
loadCMapZscores, parseCMapID,
plot.perturbationChanges,
plot.referenceComparison,
plotTargetingDrugsVSsimilarPerturbations,
prepareCMapPerturbations,
print.similarPerturbations
# Example of a differential expression profile
data("diffExprStat")
## Not run:
# Download and load CMap perturbations to compare with
cellLine <- c("HepG2", "HUH7")
cmapMetadataCompounds <- filterCMapMetadata(
"cmapMetadata.txt", cellLine=cellLine, timepoint="24 h",
dosage="5 \u00B5M", perturbationType="Compound")
cmapPerturbationsCompounds <- prepareCMapPerturbations(
cmapMetadataCompounds, "cmapZscores.gctx", "cmapGeneInfo.txt",
"cmapCompoundInfo_drugs.txt", loadZscores=TRUE)
## End(Not run)
perturbations <- cmapPerturbationsCompounds
# Rank similar CMap perturbations (by default, Spearman's and Pearson's
# correlation are used, as well as GSEA with the top and bottom 150 genes of
# the differential expression profile used as reference)
rankSimilarPerturbations(diffExprStat, perturbations)
# Rank similar CMap perturbations using only Spearman's correlation
rankSimilarPerturbations(diffExprStat, perturbations, method="spearman")