generate.eset: Generate ExpressionSet Object

View source: R/pipeline_functions.R

generate.esetR Documentation

Generate ExpressionSet Object

Description

generate.eset generates ExpressionSet class object to contain and describe the high-throughput assays. Users need to define its slots, which are expression matrix (required), phenotype information and feature information (optional). It is very useful when only expression matrix is available.

Usage

generate.eset(
  exp_mat = NULL,
  phenotype_info = NULL,
  feature_info = NULL,
  annotation_info = ""
)

Arguments

exp_mat

matrix, the expression data matrix. Each row represents a gene/transcript/probe, each column represents a sample.

phenotype_info

data.frame, the phenotype information for all the samples in exp_mat. In the phenotype data frame, each row represents a sample, each column represents a phenotype feature. The row names must match the column names of exp_mat. If NULL, it will generate a single-column data frame. Default is NULL.

feature_info

data.frame, the feature information for all the genes/transcripts/probes in exp_mat. In the feature data frame, each row represents a gene/transcript/probe and each column represents an annotation of the feature. The row names must match the row names of exp_mat. If NULL, it will generate a single-column data frame. Default is NULL.

annotation_info

character, the annotation set by users for easier reference. Default is "".

Value

Return an ExressionSet object.

Examples

mat1 <- matrix(rnorm(10000),nrow=1000,ncol=10)
colnames(mat1) <- paste0('Sample',1:ncol(mat1))
rownames(mat1) <- paste0('Gene',1:nrow(mat1))
eset <- generate.eset(exp_mat=mat1)

jyyulab/NetBID documentation built on Dec. 23, 2024, 6:34 a.m.