convertSE: Convert the phenotype data of a SummarizedExperiment into a...

Description Usage Arguments Value Examples

View source: R/fct_imports.R

Description

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

Usage

1
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

1
2
3
4
5
6
7
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")

HelBor/wpm documentation built on June 15, 2021, 4:16 p.m.