View source: R/25.setup_GSEA.R
setup_GSEA | R Documentation |
output the log2 transformed delta PDUI txt file, chip file, rank file and phynotype label file for GSEA analysis
setup_GSEA( eset, groupList, outdir = getInPASOutputDirectory(), preranked = TRUE, rankBy = c("logFC", "P.value"), rnkFilename = "InPAS.rnk", chipFilename = "InPAS.chip", dataFilename = "dPDUI.txt", PhenFilename = "group.cls" )
eset |
A UTR3eSet object, output of |
groupList |
A list of grouped sample tag names, with the group names as the list's name, such as list(groupA = c("sample_1", "sample_2", "sample_3"), groupB = c("sample_4", "sample_5", "sample_6")) |
outdir |
A character(1) vector, a path with write permission for storing InPAS analysis results. If it doesn't exist, it will be created. |
preranked |
A logical(1) vector, out preranked or not |
rankBy |
A character(1) vector, indicating how the gene list is ranked. It can be "logFC" or "P.value". |
rnkFilename |
A character(1) vector, specifying a filename for the preranked file |
chipFilename |
A character(1) vector, specifying a filename for the chip file |
dataFilename |
A character(1) vector, specifying a filename for the dataset file |
PhenFilename |
A character(1) vector, specifying a filename for the file containing samples' phenotype labels |
Jianhong Ou, Haibo Liu
data formats for GSEA. https://software.broadinstitute.org/cancer/software/gsea/wiki/index.php/Data_formats
library(limma) path <- system.file("extdata", package = "InPAS") load(file.path(path, "eset.MAQC.rda")) tags <- colnames(eset@PDUI) g <- factor(gsub("\\..*$", "", tags)) design <- model.matrix(~ -1 + g) colnames(design) <- c("Brain", "UHR") contrast.matrix <- makeContrasts( contrasts = "Brain-UHR", levels = design ) res <- test_dPDUI( eset = eset, method = "limma", normalize = "none", design = design, contrast.matrix = contrast.matrix ) gp1 <- c("Brain.auto", "Brain.phiX") gp2 <- c("UHR.auto", "UHR.phiX") groupList <- list(Brain = gp1, UHR = gp2) setup_GSEA(res, groupList = groupList, outdir = tempdir(), preranked = TRUE, rankBy = "P.value" )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.