convertSE {wpm}R Documentation

Convert the phenotype data of a SummarizedExperiment into a dataframe for WPM

Description

Convert the phenotype data of a SummarizedExperiment into a dataframe for WPM

Usage

convertSE(se_object, gp_field = NULL)

Arguments

se_object

a SummarizedExperiment object containing the phenotype data

gp_field

character, corresponding to the phenotype data used to categorize samples into distinct groups if any

Value

a dataframe containing 3 fields: Sample, Group and ID.

Examples

nrows <- 200
ncols <- 6
counts <- matrix(runif(nrows * ncols, 1, 1e4), nrows)
colData <- data.frame(Treatment=rep(c("ChIP", "Input"), 3),
                    row.names=LETTERS[1:6])
se <- SummarizedExperiment::SummarizedExperiment(assays=list(counts=counts), colData=colData)
convertSE(se, "Treatment")

[Package wpm version 1.0.0 Index]