Created
July 27, 2017 18:54
-
-
Save jnhutchinson/9e50e22a7ca2899c08a3cb30ede42f42 to your computer and use it in GitHub Desktop.
Custom GSEA
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# run clusterprofiler | |
all.results.gsea <- all.results[[1]]$stats.eset # these are all the statistical results from running DESeq2 | |
lfcs <- all.results.gsea$log2FoldChange # the log fold changes from the comparison | |
names(lfcs) <- all.results.gsea$entrezID # I previously annotated the stats results with the entrezids using biomart | |
lfcs <- sort(lfcs, decreasing=TRUE) | |
results = GSEA(lfcs, TERM2GENE=set2gene, minGSSize=200, maxGSSize=1700) # my set2gene was just a two column dataframe with the geneset id in the first column and the entrez gene ids in the second |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment