convertSE {wpm} | R Documentation |
Convert the phenotype data of a SummarizedExperiment into a dataframe for WPM
convertSE(se_object, gp_field = NULL)
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 |
a dataframe containing 3 fields: Sample, Group and ID.
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")