Skip to content

Instantly share code, notes, and snippets.

@mdozmorov
Created September 18, 2019 01:19
Show Gist options
  • Save mdozmorov/50aabcb6f5ada0d9068de3f0904b45f7 to your computer and use it in GitHub Desktop.
Save mdozmorov/50aabcb6f5ada0d9068de3f0904b45f7 to your computer and use it in GitHub Desktop.
# Exploratory data analysis of SCSig collection: Signatures of Single Cell Identities
# http://www.gsea-msigdb.org/gsea/msigdb/supplementary_genesets.jsp
library(dplyr)
library(clusterProfiler)
# Read in gene sets
mtx <- read.gmt("http://software.broadinstitute.org/gsea/msigdb/supplemental/scsig.all.v1.0.symbols.gmt")
# Number of unique gene signatures
mtx$ont %>% unique() %>% length()
# Summary statistics on size of gene signatures
mtx %>% group_by(ont) %>% summarise(size = n()) %>% select(size) %>% summary()
# Check if a specific cell/tissue type is available
mtx %>% select(ont) %>% distinct() %>% filter(., grepl("Brain", ont))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment