#' Extract expression data from ESet object
#'
#' @param gse_ESet ExpressionSet S4 object that contains expression data along with an array of relevent
#' metadata for your chosen GSE dataset
#'
#' @return list[expr_data, num_data] both objects are needed for downstream analysis. Often, expr_data
#' will have relevant gene names, or some other gene identifier of interest while num_data is just a
#' table of expression values with sample names (e.g. GSM2886523) as column headers.
#' @export
#'
#' @examples
#' gene_expression_tables <- list()
#'
#' gse <- download_gse_data("GSE108000")
#'
#' gene_expression_table <- extract_expr_data(gse)
extract_expr_data <- function(gse_ESet = NULL) {
expr_data <- Biobase::exprs(gse_ESet)
num_data <- apply(expr_data, 2, as.numeric)
return(num_data)
on.exit(cat("Expression data successfully extracted!\n"))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.