GSEA_ana: This function will do function driven analysis.

Description Usage Arguments Value See Also Examples

View source: R/GSEA_ana.R

Description

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.

Usage

1
2
GSEA_ana(mrna_se, mirna_se, class, compare = "unpaired", eg2sym = TRUE,
  pathway_num = 5)

Arguments

mrna_se

SummarizedExperiment for input format and it contains mRNA information.

mirna_se

SummarizedExperiment for input format, and it contains miRNA information.

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.

Value

list format containing both selected gene and miRNA expression data for each chosen pathway.

See Also

gage for GSEA analysis.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
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)

anamiR documentation built on Oct. 31, 2019, 8:55 a.m.