summarizeMolecularProfiles: Takes molecular data from a ToxicoSet, and summarises them...

Description Usage Arguments Value Examples

View source: R/summarizeMolecularProfiles.R

Description

Given a ToxicoSet with molecular data, this function will summarize the data into one profile per experimental condition (duration, dose level) using the chosen summary.stat and return a SummarizedExperiment object, with one Assay corresponding to a requested drug.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
summarizeMolecularProfiles(
  tSet,
  mDataType,
  cell_lines = NULL,
  drugs = NULL,
  features = NULL,
  duration = NULL,
  dose = c("Control", "Low", "Middle", "High"),
  summary.stat = c("mean", "median", "first", "last"),
  fill.missing = TRUE,
  summarize = TRUE,
  verbose = TRUE
)

Arguments

tSet

ToxicoSet The ToxicoSet to summarize

mDataType

character which one of the molecular data types to use in the analysis, out of all the molecular data types available for the tSet for example: rna

cell_lines

character The cell lines to be summarized. If any cell.line has no data, missing values will be created

drugs

character The drugs to be summarized

features

character A vector of the feature names to include in the summary

duration

character A vector of durations to summarize across

dose

character The dose level to summarize replicates across

summary.stat

character which summary method to use if there are repeated cell_lines? Choices are "mean", "median", "first", or "last"

fill.missing

boolean should the missing cell lines not in the molecular data object be filled in with missing values?

summarize

A flag which when set to FALSE (defaults to TRUE) disables summarizing and returns the data unchanged as a ExpressionSet

verbose

boolean should messages be printed

Value

SummarizedExperiment A SummarizedExperiment object with the molecular data summarized per cell line.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
data(TGGATESsmall)
summMP <- ToxicoGx::summarizeMolecularProfiles(
  tSet = TGGATESsmall, mDataType = "rna",
  cell_lines=cellNames(TGGATESsmall), drugs = head(drugNames(TGGATESsmall)),
  features = fNames(TGGATESsmall,"rna")[seq_len(100)], duration = "8",
  dose = c("Control", "High"), summary.stat = "median",
  fill.missing = TRUE, verbose=TRUE
  )

#subset into expression matrix for a requested drug
assays <- SummarizedExperiment::assays(summMP)[[drugNames(TGGATESsmall)[1]]]
#summarization of phenoData for requested experiments
phenoData <- SummarizedExperiment::colData(summMP)
#summarization of phenoData for requested experiments
featureData <- SummarizedExperiment::rowData(summMP) #featureData for requested experiments

ToxicoGx documentation built on Nov. 19, 2020, 2 a.m.