% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/GSEA_ana.R
\name{GSEA_ana}
\alias{GSEA_ana}
\title{This function will do function driven analysis.}
\usage{
GSEA_ana(mrna_se, mirna_se, class, compare = "unpaired", eg2sym = TRUE,
  pathway_num = 5)
}
\arguments{
\item{mrna_se}{SummarizedExperiment for input format and it contains mRNA information.}

\item{mirna_se}{SummarizedExperiment for input format, and it contains miRNA information.}

\item{class}{string. Choose one features from all rows of phenotype data.}

\item{compare}{character, if the length of case is the same
as control, use "paired".Default is "unpaired".}

\item{eg2sym}{logical. conversion between Entrez Gene IDs
and official gene symbols for human genes.}

\item{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.
}
\description{
This function will do GSEA analysis through the function
\code{\link[gage]{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.
}
\examples{

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)

}
\seealso{
\code{\link[gage]{gage}} for GSEA analysis.
}
