GSEA_ana {anamiR} | R Documentation |
This function will do GSEA analysis through the function
gage
. After obtaining the ranking of
pathways, this function will choose the top five (default)
pathaways, and then find the related miRNAs based on their
gene set.
GSEA_ana(mrna_se, mirna_se, class, compare = "unpaired", eg2sym = TRUE, pathway_num = 5)
mrna_se |
|
mirna_se |
|
class |
string. Choose one features from all rows of phenotype data. |
compare |
character, if the length of case is the same as control, use "paired".Default is "unpaired". |
eg2sym |
logical. conversion between Entrez Gene IDs and official gene symbols for human genes. |
pathway_num |
The number of chosen pathways from the result of GSEA analysis. |
list format containing both selected gene and miRNA expression data for each chosen pathway.
gage
for GSEA analysis.
require(data.table) ## Load example data aa <- system.file("extdata", "GSE19536_mrna.csv", package = "anamiR") mrna <- fread(aa, fill = TRUE, header = TRUE) bb <- system.file("extdata", "GSE19536_mirna.csv", package = "anamiR") mirna <- fread(bb, fill = TRUE, header = TRUE) cc <- system.file("extdata", "pheno_data.csv", package = "anamiR") pheno.data <- fread(cc, fill = TRUE, header = TRUE) ## adjust data format mirna_name <- mirna[["miRNA"]] mrna_name <- mrna[["Gene"]] mirna <- mirna[, -1] mrna <- mrna[, -1] mirna <- data.matrix(mirna) mrna <- data.matrix(mrna) row.names(mirna) <- mirna_name row.names(mrna) <- mrna_name pheno_name <- pheno.data[["Sample"]] pheno.data <- pheno.data[, -1] pheno.data <- as.matrix(pheno.data) row.names(pheno.data) <- pheno_name ## SummarizedExperiment class require(SummarizedExperiment) mirna_se <- SummarizedExperiment( assays = SimpleList(counts=mirna), colData = pheno.data) mrna_se <- SummarizedExperiment( assays = SimpleList(counts=mrna), colData = pheno.data) #table <- GSEA_ana(mrna_se = mrna_se, #mirna_se = mirna_se, class = "ER", #pathway_num = 2)