Compute Cell Type Enrichments Using panglaoDB Cell Markers
Source:R/downstream.R
compute_panglaoDB_enrichment.Rd
compute cell type enrichments using panglaoDB cell markers using Fisher test.
Usage
compute_panglaoDB_enrichment(
membership_matrix,
K = 100,
memb_cut = 0.65,
pangDB = data.table::fread(pangDB_link),
prolif = prolif_names,
p_cut = 0.001
)
Arguments
- membership_matrix
a community membership (kME) matrix with genes as rows and communities as columns. Often
community_membership
orfull_community_membership
output fromicwgcna()
- K
cutoff for top community genes to include for computing enrichment. Used in an AND condition with memb_cut.
- memb_cut
cutoff as a membership score threshold for determining top community genes for computing enrichment. Used in an AND condition with K.
- pangDB
panglaoDB cell markers database. Default is to read data from t he url pangDB_link
- prolif
list of proliferation genes to check. Default is to use prolif_names
- p_cut
p value cutoff for determining importance. If all p values are below
p_cut
for a community, no cell type is selected
Value
Returns a list with the following items:
top_enr
- the most significant cell type from the enrichment scores.full_enr
- all panglaoDB cell type enrichment scores for all communities.
Examples
if (FALSE) { # \dontrun{
library("UCSCXenaTools")
luad <- getTCGAdata(
project = "LUAD", mRNASeq = TRUE, mRNASeqType = "normalized",
clinical = FALSE, download = TRUE
)
ex <- as.matrix(data.table::fread(luad$destfiles), rownames = 1)
results <- icwgcna(ex)
pangDB <- data.table::fread(pangDB_link)
compute_panglaoDB_enrichment(results$community_membership, pangDB = pangDB)
} # }