| Title: | Analysis of Large-Scale Radio-Genomic Data |
|---|---|
| Description: | Computational tool box for radio-genomic analysis which integrates radio-response data, radio-biological modelling and comprehensive cell line annotations for hundreds of cancer cell lines. The 'RadioSet' class enables creation and manipulation of standardized datasets including information about cancer cells lines, radio-response assays and dose-response indicators. Included methods allow fitting and plotting dose-response data using established radio-biological models along with quality control to validate results. Additional functions related to fitting and plotting dose response curves, quantifying statistical correlation and calculating area under the curve (AUC) or survival fraction (SF) are included. For more details please see the included documentation, references, as well as: Manem, V. et al (2018) <doi:10.1101/449793>. |
| Authors: | Venkata Manem [aut], Petr Smirnov [aut], Ian Smith [aut], Meghan Lambie [aut], Christopher Eeles [aut], Scott Bratman [aut], Jermiah Joseph [aut], Benjamin Haibe-Kains [aut, cre] |
| Maintainer: | Benjamin Haibe-Kains <[email protected]> |
| License: | GPL-3 |
| Version: | 2.17.0 |
| Built: | 2026-05-30 07:01:58 UTC |
| Source: | https://github.com/bioc/RadioGx |
'['
## S4 method for signature 'RadioSet,ANY,ANY,ANY' x[i, j, ..., drop = FALSE]## S4 method for signature 'RadioSet,ANY,ANY,ANY' x[i, j, ..., drop = FALSE]
x |
object |
i |
Cell lines to keep in object |
j |
Drugs to keep in object |
... |
further arguments |
drop |
A boolean flag of whether to drop single dimensions or not |
Returns the subsetted object
data(clevelandSmall) clevelandSmall[sampleNames(clevelandSmall)[1], treatmentNames(clevelandSmall)[1]]data(clevelandSmall) clevelandSmall[sampleNames(clevelandSmall)[1], treatmentNames(clevelandSmall)[1]]
The function fetches a table of all RadioSets available for download from the PharmacoGx server. The table includes the names of the PharamcoSet, the types of data available in the object, and the date of last update.
availableRSets( saveDir = tempdir(), fileName = "availableRadioSets.csv", verbose = TRUE )availableRSets( saveDir = tempdir(), fileName = "availableRadioSets.csv", verbose = TRUE )
saveDir |
|
fileName |
|
verbose |
|
A data.frame with details about the available RadioSet objects
if (interactive()){ availableRSets() }if (interactive()){ availableRSets() }
This function checks the structure of a PharamcoSet, ensuring that the correct annotations are in place and all the required slots are filled so that matching of cells and radiations can be properly done across different types of data and with other studies.
checkRSetStructure(object, plotDist = FALSE, result.dir = tempdir())checkRSetStructure(object, plotDist = FALSE, result.dir = tempdir())
object |
A |
plotDist |
Should the function also plot the distribution of molecular data? |
result.dir |
The path to the directory for saving the plots as a string, defaults to 'tempdir()“ |
Prints out messages whenever describing the errors found in the structure of the pset object passed in.
checkRSetStructure(clevelandSmall)checkRSetStructure(clevelandSmall)
Documentation for this dataset will be added at a later date. For now I just need this package to pass the CRAN checks! This dataset powers the exampe usage in the roxygen2 documentation for CoreGx.
data(clevelandSmall)data(clevelandSmall)
RadioSet object
Lamb et al. The Connectivity Map: using gene-expression signatures to connect small molecules, genes, and disease. Science, 2006.
This function computes the area under a dose-response curve of the form survival fraction SF = exp(-alpha * D - beta * D ^ 2).
computeAUC( D, SF, pars, lower, upper, trunc = TRUE, SF_as_log = FALSE, area.type = c("Fitted", "Actual"), verbose = TRUE )computeAUC( D, SF, pars, lower, upper, trunc = TRUE, SF_as_log = FALSE, area.type = c("Fitted", "Actual"), verbose = TRUE )
D |
vector of dosages |
SF |
vector of survival fractions |
pars |
parameters (alpha, beta) in equation y = exp(-alpha * x - beta * x ^ 2) |
lower |
lower bound of dose region to compute AUC over |
upper |
upper bound of dose region to compute AUC over |
trunc |
should survival fractions be truncated downward to 1 if they exceed 1? |
SF_as_log |
A boolean indicating whether survival fraction is displayed on a log axis. Defaults to FALSE |
area.type |
should the AUC of the raw (D, SF) points be returned, or should the AUC of a curve fit to said points be returned instead? |
verbose |
how detailed should error and warning messages be? See details. |
If lower and/or upper are missing, the function assumes their values to be the minimum and maximum D-values, respectively. For all warnings to be silent, set trunc = FALSE. For warnings to be output, set trunc = TRUE. For warnings to be output along with the arguments that triggered them, set trunc = 2.
numeric The area under the ROC curve
computeAUC(D=c(0.1, 0.5, 0.7, 0.9), pars=c(0.2, 0.1), lower = 0, upper = 1) # Returns 0.7039296computeAUC(D=c(0.1, 0.5, 0.7, 0.9), pars=c(0.2, 0.1), lower = 0, upper = 1) # Returns 0.7039296
This function computes the radiation dose at which only 10 cancer cells survive under the exponential model SF = exp(-alpha * D - beta * D ^ 2) given alpha and beta, where D is the radiation dose given and SF is the fraction of cells surviving
computeD10(pars)computeD10(pars)
pars |
parameters (alpha, beta) in equation y = exp(-alpha * x - beta * x ^ 2) |
The units of the returned dose are the inverses of the units of the alpha and beta passed in.
numeric The D10 value
computeD10(c(0.2, 0.1))computeD10(c(0.2, 0.1))
This function computes the survival fraction after administering 2 units of radiation, given alpha and beta in the equation SF = exp(-alpha * D - beta * D ^ 2).
computeSF2(pars)computeSF2(pars)
pars |
parameters (alpha, beta) in equation y = exp(-alpha * x - beta * x ^ 2) |
numeric The survival fraction
computeSF2(c(0.2, 0.1))computeSF2(c(0.2, 0.1))
Get the dimensions of a RadioSet
## S4 method for signature 'RadioSet' dim(x)## S4 method for signature 'RadioSet' dim(x)
x |
RadioSet |
A named vector with the number of Cells and Drugs in the RadioSet
data(clevelandSmall) dim(clevelandSmall)data(clevelandSmall) dim(clevelandSmall)
Given a list of RadioSets, the function will plot the drug_response curve, for a given drug/cell pair. The y axis of the plot is the viability percentage and x axis is the log transformed Ds. If more than one rSet is provided, a light gray area would show the common concentration range between rSets. User can ask for type of sensitivity measurment to be shown in the plot legend. The user can also provide a list of their own Ds and viability values, as in the examples below, and it will be treated as experiments equivalent to values coming from a pset. The names of the concentration list determine the legend labels.
doseResponseCurve( rad.type = "radiation", cellline, rSets = list(), Ds = list(), SFs = list(), trunc = TRUE, legends.label = c("alpha", "beta", "rsquared"), ylim = c(0, 100), xlim, mycol, title, plot.type = c("Fitted", "Actual", "Both"), summarize.replicates = TRUE, lwd = 1, cex = 0.7, cex.main = 0.9, legend.loc = "topright", verbose = TRUE )doseResponseCurve( rad.type = "radiation", cellline, rSets = list(), Ds = list(), SFs = list(), trunc = TRUE, legends.label = c("alpha", "beta", "rsquared"), ylim = c(0, 100), xlim, mycol, title, plot.type = c("Fitted", "Actual", "Both"), summarize.replicates = TRUE, lwd = 1, cex = 0.7, cex.main = 0.9, legend.loc = "topright", verbose = TRUE )
rad.type |
'character(1)' The type(s) of radiation dosage to be plotted. If the plot is desirable for more than one radioset, A unique drug id should be provided. |
cellline |
'character(1)' A cell line name for which the radiation response curve should be plotted. If the plot is desirable for more than one radioset, a unique cell id should be provided. |
rSets |
'list' a list of RadioSet objects, for which the function should plot the curves. |
Ds, SFs
|
'list' A list of Doses and SFs to plot, the function assumes that Ds[[i]] is plotted against SFs[[i]]. The names of the D list are used to create the legend labels |
trunc |
'logical(1)' Should the viability values be truncated to lie in [0-100] before doing the fitting |
legends.label |
'numeric' A vector of sensitivity measurment types which could be any combination of ic50_published, auc_published, auc_recomputed and auc_recomputed_star. A legend will be displayed on the top right of the plot which each line of the legend is the values of requested sensitivity measerments for one of the requested rSets. If this parameter is missed no legend would be provided for the plot. |
ylim |
'numeric' A vector of two numerical values to be used as ylim of the plot. If this parameter would be missed c(0,100) would be used as the ylim of the plot. |
xlim |
'numeric' A vector of two numerical values to be used as xlim of the plot. If this parameter would be missed the minimum and maximum concentrations between all the rSets would be used as plot xlim. |
mycol |
'numeric' A vector with the same lenght of the rSets parameter which will determine the color of the curve for the pharmaco sets. If this parameter is missed default colors from Rcolorbrewer package will be used as curves color. |
title |
'character' The title of the graph. If no title is provided, then it defaults to Drug':'Cell Line'. |
plot.type |
'character' Plot type which can be the actual one ("Actual") or the one fitted by logl logistic regression ("Fitted") or both of them ("Both"). If this parameter is missed by default actual curve is plotted. |
summarize.replicates |
'character' If this parameter is set to true replicates are summarized and replicates are plotted individually otherwise |
lwd |
'numeric' The line width to plot with |
cex |
'numeric' The cex parameter passed to plot |
cex.main |
'numeric' The cex.main parameter passed to plot, controls the size of the titles |
legend.loc |
And argument passable to xy.coords for the position to place the legend. |
verbose |
'logical(1)' Should warning messages about the data passed in be printed? |
Plots to the active graphics device and returns and invisible NULL.
doseResponseCurve(Ds=list("Experiment 1" = c(0, 2, 4, 6)), SFs=list("Experiment 1" = c(1,.6,.4,.2)), plot.type="Both")doseResponseCurve(Ds=list("Experiment 1" = c(0, 2, 4, 6)), SFs=list("Experiment 1" = c(1,.6,.4,.2)), plot.type="Both")
This function allows you to download a RadioSet object for use with this
package. The RadioSets have been extensively curated and organized within
a PharacoSet class, enabling use with all the analysis tools provided in
PharmacoGx.
downloadRSet( name, saveDir = tempdir(), rSetFileName = NULL, verbose = TRUE, timeout = 600 )downloadRSet( name, saveDir = tempdir(), rSetFileName = NULL, verbose = TRUE, timeout = 600 )
name |
|
saveDir |
|
rSetFileName |
|
verbose |
|
timeout |
'numeric(1)' How long to wait before erroring due to timeout, in seconds. Default it 600s (10 minutes). |
A rSet object with the dataset, downloaded from our server
if (interactive()) { cleveland <- downloadRSet("Cleveland") }if (interactive()) { cleveland <- downloadRSet("Cleveland") }
This function fits a linear-quadratic curve to dose-response data.
linearQuadraticModel( D, SF, lower_bounds = c(0, 0), upper_bounds = c(1, 1), scale = 5, family = c("normal", "Cauchy"), median_n = 1, trunc = FALSE, verbose = FALSE )linearQuadraticModel( D, SF, lower_bounds = c(0, 0), upper_bounds = c(1, 1), scale = 5, family = c("normal", "Cauchy"), median_n = 1, trunc = FALSE, verbose = FALSE )
D |
vector of radiation doses |
SF |
vector of survival fractions corresponding to the doses |
lower_bounds |
vector of length 2 containing minimum allowed values of fitted alpha and beta, respectively |
upper_bounds |
vector of length 2 containing maximum allowed values of fitted alpha and beta, respectively |
scale |
parameter of the assumed error distribution of the data; see sdetails |
family |
family of distributions of the error terms in the data; currently supported options are "normal" and "cauchy" |
median_n |
see details |
trunc |
should survival fractions be truncated downward to 1? Defaults to FALSE. |
verbose |
'verbose' outputs warnings that are otherwised suppressed when the function sanity-checks user inputs. 'median_n' denotes the number of distributions from family 'family' that are medianned. (Note that setting n = 1 (the default) is equivalent to using a simple normal or cauchy distribution without taking any medians.) |
numeric The estimated alpha and beta values
linearQuadraticModel(c(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10), c(1.1, 0.8, 0.7, 0.45, 0.15, -0.1, -0.1, -0.4, -0.65, -0.75, -1.1))linearQuadraticModel(c(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10), c(1.1, 0.8, 0.7, 0.45, 0.15, -0.1, -0.1, -0.4, -0.65, -0.75, -1.1))
This function plots doses of radiation against the cancer cell survival fractions thereby observed.
plotCurve( D, SF, pars, filename = "dose_response_plot.pdf", fit_curve = TRUE, SF_as_log = TRUE )plotCurve( D, SF, pars, filename = "dose_response_plot.pdf", fit_curve = TRUE, SF_as_log = TRUE )
D |
vector of radiation doses |
SF |
vector of survival fractions corresponding to the doses |
pars |
parameters (alpha, beta) in the equation SF = exp(-alpha * D - beta * D ^ 2) |
filename |
name of PDF which will be created by the function |
fit_curve |
should the graph include a linear-quadratic curve of best fit? Defaults to TRUE |
SF_as_log |
should SF be expressed in log10 on the graph? Defaults to TRUE |
nothing Function works by side effects only
plotCurve(c(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10), c(1.1, 0.8, 0.7, 0.45, 0.15, -0.1, -0.1, -0.4, -0.65, -0.75, -1.1), filename = NULL)plotCurve(c(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10), c(1.1, 0.8, 0.7, 0.45, 0.15, -0.1, -0.1, -0.4, -0.65, -0.75, -1.1), filename = NULL)
A constructor that simplifies the process of creating RadioSets, as well as creates empty objects for data not provided to the constructor. Only objects returned by this constructor are expected to work with the RadioSet methods. For a much more detailed instruction on creating RadioSets, please see the "CreatingRadioSet" vignette.
RadioSet( name, molecularProfiles = list(), sample = data.frame(), treatment = data.frame(), sensitivityInfo = data.frame(), sensitivityRaw = array(dim = c(0, 0, 0)), sensitivityProfiles = matrix(), sensitivityN = matrix(nrow = 0, ncol = 0), perturbationN = array(NA, dim = c(0, 0, 0)), curationSample = data.frame(), curationTissue = data.frame(), curationTreatment = data.frame(), datasetType = c("sensitivity", "perturbation", "both"), verify = TRUE )RadioSet( name, molecularProfiles = list(), sample = data.frame(), treatment = data.frame(), sensitivityInfo = data.frame(), sensitivityRaw = array(dim = c(0, 0, 0)), sensitivityProfiles = matrix(), sensitivityN = matrix(nrow = 0, ncol = 0), perturbationN = array(NA, dim = c(0, 0, 0)), curationSample = data.frame(), curationTissue = data.frame(), curationTreatment = data.frame(), datasetType = c("sensitivity", "perturbation", "both"), verify = TRUE )
name |
A |
molecularProfiles |
A |
sample |
A |
treatment |
A |
sensitivityInfo |
A |
sensitivityRaw |
A 3 Dimensional |
sensitivityProfiles |
|
sensitivityN, perturbationN
|
A |
curationSample, curationTissue, curationTreatment
|
A |
datasetType |
A |
verify |
|
An object of class 'RadioSet“
Documentation for the various setters and getters which allow manipulation of data in the slots of a 'RadioSet' object.
radiationInfo(...) radiationInfo(...) <- value radiationTypes(...) radiationTypes(...) <- value ## S4 method for signature 'RadioSet' annotation(object) ## S4 replacement method for signature 'RadioSet,list' annotation(object) <- value ## S4 method for signature 'RadioSet' dateCreated(object) ## S4 replacement method for signature 'RadioSet,character' dateCreated(object) <- value ## S4 method for signature 'RadioSet' name(object) ## S4 replacement method for signature 'RadioSet' name(object) <- value ## S4 method for signature 'RadioSet' sampleInfo(object) ## S4 replacement method for signature 'RadioSet,data.frame' sampleInfo(object) <- value ## S4 method for signature 'RadioSet' sampleNames(object) ## S4 replacement method for signature 'RadioSet,character' sampleNames(object) <- value ## S4 method for signature 'RadioSet' curation(object) ## S4 replacement method for signature 'RadioSet,list' curation(object) <- value ## S4 method for signature 'RadioSet' datasetType(object) ## S4 replacement method for signature 'RadioSet,character' datasetType(object) <- value ## S4 method for signature 'RadioSet' molecularProfiles(object, mDataType, assay) ## S4 replacement method for signature 'RadioSet,character,character,matrix' molecularProfiles(object, mDataType, assay) <- value ## S4 method for signature 'RadioSet' featureInfo(object, mDataType) ## S4 replacement method for signature 'RadioSet,character,data.frame' featureInfo(object, mDataType) <- value ## S4 method for signature 'RadioSet,character' phenoInfo(object, mDataType) ## S4 replacement method for signature 'RadioSet,character,data.frame' phenoInfo(object, mDataType) <- value ## S4 method for signature 'RadioSet,character' fNames(object, mDataType) ## S4 replacement method for signature 'RadioSet,character,character' fNames(object, mDataType) <- value ## S4 method for signature 'RadioSet' mDataNames(object) ## S4 replacement method for signature 'RadioSet' mDataNames(object) <- value ## S4 method for signature 'RadioSet' molecularProfilesSlot(object) ## S4 replacement method for signature 'RadioSet,list_OR_MAE' molecularProfilesSlot(object) <- value ## S4 method for signature 'RadioSet' sensitivityInfo(object, dimension, ...) ## S4 replacement method for signature 'RadioSet,data.frame' sensitivityInfo(object, dimension, ...) <- value ## S4 method for signature 'RadioSet' sensitivityMeasures(object) ## S4 replacement method for signature 'RadioSet,character' sensitivityMeasures(object) <- value ## S4 method for signature 'RadioSet' sensitivityProfiles(object) ## S4 replacement method for signature 'RadioSet,data.frame' sensitivityProfiles(object) <- value ## S4 method for signature 'RadioSet' sensitivityRaw(object) ## S4 replacement method for signature 'RadioSet,array' sensitivityRaw(object) <- value ## S4 method for signature 'RadioSet' treatmentResponse(object) ## S4 replacement method for signature 'RadioSet,list_OR_LongTable' treatmentResponse(object) <- value ## S4 method for signature 'RadioSet' sensNumber(object) ## S4 replacement method for signature 'RadioSet,matrix' sensNumber(object) <- value ## S4 method for signature 'RadioSet' pertNumber(object) ## S4 replacement method for signature 'RadioSet,array' pertNumber(object) <- valueradiationInfo(...) radiationInfo(...) <- value radiationTypes(...) radiationTypes(...) <- value ## S4 method for signature 'RadioSet' annotation(object) ## S4 replacement method for signature 'RadioSet,list' annotation(object) <- value ## S4 method for signature 'RadioSet' dateCreated(object) ## S4 replacement method for signature 'RadioSet,character' dateCreated(object) <- value ## S4 method for signature 'RadioSet' name(object) ## S4 replacement method for signature 'RadioSet' name(object) <- value ## S4 method for signature 'RadioSet' sampleInfo(object) ## S4 replacement method for signature 'RadioSet,data.frame' sampleInfo(object) <- value ## S4 method for signature 'RadioSet' sampleNames(object) ## S4 replacement method for signature 'RadioSet,character' sampleNames(object) <- value ## S4 method for signature 'RadioSet' curation(object) ## S4 replacement method for signature 'RadioSet,list' curation(object) <- value ## S4 method for signature 'RadioSet' datasetType(object) ## S4 replacement method for signature 'RadioSet,character' datasetType(object) <- value ## S4 method for signature 'RadioSet' molecularProfiles(object, mDataType, assay) ## S4 replacement method for signature 'RadioSet,character,character,matrix' molecularProfiles(object, mDataType, assay) <- value ## S4 method for signature 'RadioSet' featureInfo(object, mDataType) ## S4 replacement method for signature 'RadioSet,character,data.frame' featureInfo(object, mDataType) <- value ## S4 method for signature 'RadioSet,character' phenoInfo(object, mDataType) ## S4 replacement method for signature 'RadioSet,character,data.frame' phenoInfo(object, mDataType) <- value ## S4 method for signature 'RadioSet,character' fNames(object, mDataType) ## S4 replacement method for signature 'RadioSet,character,character' fNames(object, mDataType) <- value ## S4 method for signature 'RadioSet' mDataNames(object) ## S4 replacement method for signature 'RadioSet' mDataNames(object) <- value ## S4 method for signature 'RadioSet' molecularProfilesSlot(object) ## S4 replacement method for signature 'RadioSet,list_OR_MAE' molecularProfilesSlot(object) <- value ## S4 method for signature 'RadioSet' sensitivityInfo(object, dimension, ...) ## S4 replacement method for signature 'RadioSet,data.frame' sensitivityInfo(object, dimension, ...) <- value ## S4 method for signature 'RadioSet' sensitivityMeasures(object) ## S4 replacement method for signature 'RadioSet,character' sensitivityMeasures(object) <- value ## S4 method for signature 'RadioSet' sensitivityProfiles(object) ## S4 replacement method for signature 'RadioSet,data.frame' sensitivityProfiles(object) <- value ## S4 method for signature 'RadioSet' sensitivityRaw(object) ## S4 replacement method for signature 'RadioSet,array' sensitivityRaw(object) <- value ## S4 method for signature 'RadioSet' treatmentResponse(object) ## S4 replacement method for signature 'RadioSet,list_OR_LongTable' treatmentResponse(object) <- value ## S4 method for signature 'RadioSet' sensNumber(object) ## S4 replacement method for signature 'RadioSet,matrix' sensNumber(object) <- value ## S4 method for signature 'RadioSet' pertNumber(object) ## S4 replacement method for signature 'RadioSet,array' pertNumber(object) <- value
... |
See details. |
value |
See details. |
object |
A 'RadioSet' object. |
mDataType |
'character(1)' The name of a molecular datatype to access from the 'molecularProfiles' of a 'RadioSet' object. |
assay |
'character(1)' A valid assay name in the 'SummarizedExperiment' of '@molecularProfiles' of a RadioSet object for data type 'mDataType'. |
dimension |
See details. |
treatmentInfo: data.frame Metadata for all treatments in a RadioSet
object. Arguments:
object: RadioSet An object to retrieve treatment metadata from.
treatmentInfo<-: RadioSet object with updated treatment metadata.
object. Arguments:
object: RadioSet An object to set treatment metadata for.
value: data.frame A new table of treatment metadata for object.
treatmentNames: character Names for all treatments in a RadioSet
object. Arguments:
object: RadioSet An object to retrieve treatment names from.
treatmentNames<-: RadioSet Object with updates treatment names.
object. Arguments:
object: RadioSet An object to set treatment names from.
value: character A character vector of updated treatment names.
annotation: A list of RadioSet annotations with items: 'name',
the name of the object; 'dateCreated', date the object was created; 'sessionInfo',
the sessionInfo() when the object was created; 'call', the R constructor call;
and 'version', the object version.
annotation<-: Setter method for the annotation slot. Arguments:
value: a list of annotations to update the RadioSet with.
dateCreated: character(1) The date the RadioSet object was
created, as returned by the date() function.
dateCreated<-: Update the 'dateCreated' item in the annotation slot of
a RadioSet object. Arguments:
value: A character(1) vector, as returned by the date() function.
name: character(1) The name of the RadioSet, retreived from
the @annotation slot.
name<-: Update the @annotation$name value in a RadioSet object.
value: character(1) The name of the RadioSet object.
cellInfo: data.frame Metadata for all sample in a RadioSet object.
sampleInfo<-: assign updated sample annotations to the RadioSet
object.
Arguments:
value: a data.frame object.
sampleNames: character Retrieve the rownames of the data.frame in
the sample slot from a RadioSet object.
sampleNames<-: assign new rownames to the sampleInfo data.frame for
a RadioSet object.
Arguments:
value: character vector of rownames for the sampleInfo(object) data.frame.
curation: A list of curated mappings between identifiers in the
RadioSet object and the original data publication. Contains three data.frames, 'cell' with
cell-line ids and 'tissue' with tissue ids and 'radiation' with radiation ids.
curation<-: Update the curation slot of a RadioSet object. Arugments:
value: A list of data.frames, one for each type of curated
identifier. For a RadioSet object the slot should
contain tissue, cell-line and radiation id data.frames.
datasetType: character(1) The type treatment response in the
sensitivity slot. Valid values are 'sensitivity', 'perturbation' or 'both'.
datasetType<-: Update the datasetType slot of a RadioSet object. Arguments:
value: A character(1) vector with one of 'sensitivity', 'perturbation'
or 'both'
molecularProfiles: matrix() Retrieve an assay in a
SummarizedExperiment from the molecularProfiles slot of a RadioSet
object with the specified mDataType. Valid mDataType arguments can be
found with mDataNames(object). Exclude mDataType and assay to
access the entire slot. Arguments:
assay: Optional character(1) vector specifying an assay in the
SummarizedExperiment of the molecularProfiles slot of the
RadioSet object for the specified mDataType. If excluded,
defaults to modifying the first assay in the SummarizedExperiment for
the given mDataType.
molecularProfiles<-: Update an assay in a SummarizedExperiment from
the molecularProfiles slot of a RadioSet object with the specified
mDataType. Valid mDataType arguments can be found with
mDataNames(object). Omit mDataType and assay to update the slot.
assay: Optional character(1) vector specifying an assay in the
SummarizedExperiment of the molecularProfiles slot of the
RadioSet object for the specified mDataType. If excluded,
defaults to modifying the first assay in the SummarizedExperiment for
the given mDataType.
value: A matrix of values to assign to the assay slot of the
SummarizedExperiment for the selected mDataType. The rownames and
column names must match the associated SummarizedExperiment.
featureInfo: Retrieve a DataFrame of feature metadata for the specified
mDataType from the molecularProfiles slot of a RadioSet object. More
specifically, retrieve the @rowData slot from the SummarizedExperiment
from the @molecularProfiles of a RadioSet object with the name
mDataType.
__featureInfo<-__: Update the 'featureInfo(object, mDataType)' 'DataFrame' with new feature metadata. Arguments: - value: A 'data.frame' or 'DataFrame' with updated feature metadata for the specified molecular profile in the 'molecularProfiles' slot of a 'RadioSet' object.
phenoInfo: Return the @colData slot from the SummarizedExperiment of
mDataType, containing sample-level metadata, from a RadioSet object.
phenoInfo<-: Update the @colData slot of the SummarizedExperiment
of mDataType in the @molecularProfiles slot of a RadioSet object.
This updates the sample-level metadata in-place.
value: A data.frame or DataFrame object where rows are samples
and columns are sample metadata.
fNames: character() The features names from the rowData slot of a
SummarizedExperiment of mDataType within a RadioSet object.
fNames: Updates the rownames of the feature metadata (i.e., rowData)
for a SummarizedExperiment of mDataType within a RadioSet object.
value: character() A character vector of new features names for the
rowData of the SummarizedExperiment of mDataType in the
@molecularProfiles slot of a RadioSet object. Must be the same
length as nrow(featureInfo(object, mDataType)),
the number of rows in the feature metadata.
mDataNames: character Retrieve the names of the molecular data types
available in the molecularProfiles slot of a RadioSet object. These
are the options which can be used in the mDataType parameter of various
molecularProfiles slot accessors methods.
mDataNames: Update the molecular data type names of the
molecularProfiles slot of a RadioSet object. Arguments:
value: character vector of molecular datatype names, with length
equal to length(molecularProfilesSlot(object)).
molecularProfilesSlot: Return the contents of the @molecularProfiles
slot of a RadioSet object. This will either be a list or
MultiAssayExperiment of SummarizedExperiments.
molecularProfilesSlot<-: Update the contents of the @molecularProfiles
slot of a RadioSet object. Arguemnts:
value: A list or MultiAssayExperiment of SummarizedExperiments. The
list and assays should be named for the molecular datatype in each
SummarizedExperiment.
dimension: Optional character(1) One of 'treatment', 'sample' or
'assay' to retrieve rowData, colData or the 'assay_metadata' assay from
the RadioSet @sensitvity LongTable object, respectively. Ignored with
warning if @treatmentResponse is not a LongTable object.
...: Additional arguments to the rowData or colData.
LongTable methods. Only used if the sensitivity slot contains a
LongTable object instead of a list and the dimension argument is
specified.
sensitivityInfo: DataFrame or data.frame of sensitivity treatment combo
by sample metadata for the RadioSet object. When the dimension
parameter is used, it allows retrieval of the dimension specific metadata
from the LongTable object in @treatmentResponse of a RadioSet object.
sensitivityInfo<-: Update the @treatmentResponse slot metadata for a
RadioSet object. When used without the dimension argument is behaves
similar to the old RadioSet implementation, where the @treatmentResponse slot
contained a list with a $info data.frame item. When the dimension
arugment is used, more complicated assignments can occur where 'sample'
modifies the @sensitvity LongTable colData, 'treatment' the rowData and
'assay' the 'assay_metadata' assay.
Arguments:
value: A data.frame of treatment response experiment metadata,
documenting experiment level metadata (mapping to treatments and samples). If
the @treatmentResponse slot doesn't contain a LongTable and dimension is
not specified, you can only modify existing columns as returned by
sensitivityInfo(object).
sensitivityMeaures: Get the 'sensitivityMeasures' available in a RadioSet
object. Each measure reprents some summary of sample sensitivity to a given
treatment, such as ic50, ec50, AUC, AAC, etc. The results are returned as a
character vector with all available metrics for the PSet object.
sensitivityMeaures: Update the sensitivity meaure in a RadioSet
object. Thesee values are the column names of the 'profiles' assay and
represent various compued sensitviity metrics such as ic50, ec50, AUC, AAC,
etc.
value: A character vector of new sensitivity measure names, the
then length of the character vector must matcht he number of columns of the
'profiles' assay, excluding metadata and key columns.
sensitivityProfiles: Return the sensitivity profile summaries from the sensitivity slot. This data.frame cotanins vaarious sensitivity summary metrics, such as ic50, amax, EC50, aac, HS, etc as columns, with rows as treatment by sample experiments.
sensitivityProfiles<-: Update the sensitivity profile summaries the
sensitivity slot. Arguments:
-value: A data.frame the the same number of rows as as returned by
sensitivityProfiles(object), but potentially modified columns, such as the
computation of additional summary metrics.
sensitivityRaw: Access the raw sensitiity measurents for a RadioSet
object. A 3D array where rows are experiment_ids, columns are doses
and the third dimension is metric, either 'Dose' for the doses used or
'Viability' for the sample viability at that dose.
sensitvityRaw<-: Update the raw dose and viability data in a RadioSet.
value: A 3D array object where rows are experiment_ids, columns are
replicates and pages are c('Dose', 'Viability'), with the corresponding
dose or viability measurement for that experiment_id and replicate.
sensNumber: Return a count of viability observations in a RadioSet
object for each treatment-combo by sample combination.
sensNumber<-: Update the 'n' item, which holds a matrix with a count
of treatment by sample-line experiment counts, in the list in @treatmentResponse
slot of a RadioSet object. Will error when @sensitviity contains
a LongTable object, since the counts are computed on the fly. Arguments:
value: A matrix where rows are samples and columns are treatments, with a
count of the number of experiments for each combination as the values.
pertNumber: array Summary of available perturbation experiments
from in a RadioSet object. Returns a 3D array with the number of
perturbation experiments per treatment and sample, and data type.
pertNumber<-: Update the @perturbation$n value in a RadioSet object,
which stores a summary of the available perturbation experiments. Arguments:
value: A new 3D array with the number of perturbation experiments per
treatment and sample, and data type
Accessors: See details.
Setters: An updated 'RadioSet' object, returned invisibly.
data(clevelandSmall) treatmentInfo(clevelandSmall) treatmentInfo(clevelandSmall) <- treatmentInfo(clevelandSmall) treatmentNames(clevelandSmall) treatmentNames(clevelandSmall) <- treatmentNames(clevelandSmall) ## @annotation annotation(clevelandSmall) annotation(clevelandSmall) <- annotation(clevelandSmall) dateCreated(clevelandSmall) ## dateCreated dateCreated(clevelandSmall) <- date() name(clevelandSmall) name(clevelandSmall) <- 'new_name' sampleInfo(clevelandSmall) <- sampleInfo(clevelandSmall) sampleNames(clevelandSmall) sampleNames(clevelandSmall) <- sampleNames(clevelandSmall) ## curation curation(clevelandSmall) curation(clevelandSmall) <- curation(clevelandSmall) datasetType(clevelandSmall) datasetType(clevelandSmall) <- 'both' # No assay specified molecularProfiles(clevelandSmall, 'rna') <- molecularProfiles(clevelandSmall, 'rna') # Specific assay molecularProfiles(clevelandSmall, 'rna', 'exprs') <- molecularProfiles(clevelandSmall, 'rna', 'exprs') # Replace the whole slot molecularProfiles(clevelandSmall) <- molecularProfiles(clevelandSmall) featureInfo(clevelandSmall, 'rna') featureInfo(clevelandSmall, 'rna') <- featureInfo(clevelandSmall, 'rna') phenoInfo(clevelandSmall, 'rna') phenoInfo(clevelandSmall, 'rna') <- phenoInfo(clevelandSmall, 'rna') fNames(clevelandSmall, 'rna') fNames(clevelandSmall, 'rna') <- fNames(clevelandSmall, 'rna') mDataNames(clevelandSmall) mDataNames(clevelandSmall) <- mDataNames(clevelandSmall) molecularProfilesSlot(clevelandSmall) molecularProfilesSlot(clevelandSmall) <- molecularProfilesSlot(clevelandSmall) sensitivityInfo(clevelandSmall) sensitivityInfo(clevelandSmall) <- sensitivityInfo(clevelandSmall) sensitivityMeasures(clevelandSmall) <- sensitivityMeasures(clevelandSmall) sensitivityMeasures(clevelandSmall) <- sensitivityMeasures(clevelandSmall) sensitivityProfiles(clevelandSmall) sensitivityProfiles(clevelandSmall) <- sensitivityProfiles(clevelandSmall) head(sensitivityRaw(clevelandSmall)) sensitivityRaw(clevelandSmall) <- sensitivityRaw(clevelandSmall) treatmentResponse(clevelandSmall) treatmentResponse(clevelandSmall) <- treatmentResponse(clevelandSmall) sensNumber(clevelandSmall) sensNumber(clevelandSmall) <- sensNumber(clevelandSmall) pertNumber(clevelandSmall) pertNumber(clevelandSmall) <- pertNumber(clevelandSmall)data(clevelandSmall) treatmentInfo(clevelandSmall) treatmentInfo(clevelandSmall) <- treatmentInfo(clevelandSmall) treatmentNames(clevelandSmall) treatmentNames(clevelandSmall) <- treatmentNames(clevelandSmall) ## @annotation annotation(clevelandSmall) annotation(clevelandSmall) <- annotation(clevelandSmall) dateCreated(clevelandSmall) ## dateCreated dateCreated(clevelandSmall) <- date() name(clevelandSmall) name(clevelandSmall) <- 'new_name' sampleInfo(clevelandSmall) <- sampleInfo(clevelandSmall) sampleNames(clevelandSmall) sampleNames(clevelandSmall) <- sampleNames(clevelandSmall) ## curation curation(clevelandSmall) curation(clevelandSmall) <- curation(clevelandSmall) datasetType(clevelandSmall) datasetType(clevelandSmall) <- 'both' # No assay specified molecularProfiles(clevelandSmall, 'rna') <- molecularProfiles(clevelandSmall, 'rna') # Specific assay molecularProfiles(clevelandSmall, 'rna', 'exprs') <- molecularProfiles(clevelandSmall, 'rna', 'exprs') # Replace the whole slot molecularProfiles(clevelandSmall) <- molecularProfiles(clevelandSmall) featureInfo(clevelandSmall, 'rna') featureInfo(clevelandSmall, 'rna') <- featureInfo(clevelandSmall, 'rna') phenoInfo(clevelandSmall, 'rna') phenoInfo(clevelandSmall, 'rna') <- phenoInfo(clevelandSmall, 'rna') fNames(clevelandSmall, 'rna') fNames(clevelandSmall, 'rna') <- fNames(clevelandSmall, 'rna') mDataNames(clevelandSmall) mDataNames(clevelandSmall) <- mDataNames(clevelandSmall) molecularProfilesSlot(clevelandSmall) molecularProfilesSlot(clevelandSmall) <- molecularProfilesSlot(clevelandSmall) sensitivityInfo(clevelandSmall) sensitivityInfo(clevelandSmall) <- sensitivityInfo(clevelandSmall) sensitivityMeasures(clevelandSmall) <- sensitivityMeasures(clevelandSmall) sensitivityMeasures(clevelandSmall) <- sensitivityMeasures(clevelandSmall) sensitivityProfiles(clevelandSmall) sensitivityProfiles(clevelandSmall) <- sensitivityProfiles(clevelandSmall) head(sensitivityRaw(clevelandSmall)) sensitivityRaw(clevelandSmall) <- sensitivityRaw(clevelandSmall) treatmentResponse(clevelandSmall) treatmentResponse(clevelandSmall) <- treatmentResponse(clevelandSmall) sensNumber(clevelandSmall) sensNumber(clevelandSmall) <- sensNumber(clevelandSmall) pertNumber(clevelandSmall) pertNumber(clevelandSmall) <- pertNumber(clevelandSmall)
The RadioSet (RSet) class was developed to contain and organise large RadioGenomic datasets, and aid in their metanalysis. It was designed primarily to allow bioinformaticians and biologists to work with data at the level of genes and cell lines, providing a more naturally intuitive interface and simplifying analyses between several datasets. As such, it was designed to be flexible enough to hold datasets of two different natures while providing a common interface. The class can accomidate datasets containing both radiation dose response data, as well as datasets contaning genetic profiles of cell lines pre and post treatement with compounds, known respecitively as sensitivity and perturbation datasets.
An object of the RadioSet class
annotationA list of annotation data about the RadioSet,
including the $name and the session information for how the object
was creating, detailing the exact versions of R and all the packages used
molecularProfilesA list containing 4 SummarizedExperiment
type object for holding data for RNA, DNA, SNP and Copy Number Variation
measurements respectively, with associated fData and pData
containing the row and column metadata
sampleA data.frame containg the annotations for all the cell
lines profiled in the data set, across all data types
treatmentA data.frame containg the annotations for all the
radiation treatment types used in the in the dataset, across all data types
sensitivityA list containing all the data for the sensitivity
experiments, including $info, a data.frame containing the
experimental info,$raw a 3D array containing raw data,
$profiles, a data.frame containing sensitivity profiles
statistics, and $n, a data.frame detailing the number of
experiments for each cell-radiation type pair
perturbationA list containting $n, a data.frame
summarizing the available perturbation data,
curationA list containing mappings for
cell and tissue names used in the data set to universal
identifiers used between different RadioSet objects
datasetTypeA character string of 'sensitivity',
'perturbation', or both detailing what type of data can be found in the
RadioSet, for proper processing of the data
A documented constructor to provide user friendly interface to .RadioSig
RadioSig( Data = array(NA, dim = c(0, 0, 0)), RSetName = "", DateCreated = date(), SigType = "sensitivity", SessionInfo = sessionInfo(), Call = "No Call Recorded" )RadioSig( Data = array(NA, dim = c(0, 0, 0)), RSetName = "", DateCreated = date(), SigType = "sensitivity", SessionInfo = sessionInfo(), Call = "No Call Recorded" )
Data |
The data |
RSetName |
The name of the pSet |
DateCreated |
The date the object was created |
SigType |
The type of sensitivyt signature |
SessionInfo |
The package version used to generate the object |
Call |
The calls for sensitivity vs not |
A RadioSig object
Given a RadioSet of the sensitivity experiment type, and a list of radiation types, the function will compute a signature for the effect of gene expression on the molecular profile of a cell. The function returns the estimated coefficient, the t-stat, the p-value and the false discovery rate associated with that coefficient, in a 3 dimensional array, with genes in the first direction, drugs in the second, and the selected return values in the third.
radSensitivitySig( rSet, mDataType, radiation.types, features, sensitivity.measure = "AUC_recomputed", molecular.summary.stat = c("mean", "median", "first", "last", "or", "and"), sensitivity.summary.stat = c("mean", "median", "first", "last"), returnValues = c("estimate", "pvalue", "fdr"), sensitivity.cutoff = NA, standardize = c("SD", "rescale", "none"), nthread = 1, verbose = TRUE, ... )radSensitivitySig( rSet, mDataType, radiation.types, features, sensitivity.measure = "AUC_recomputed", molecular.summary.stat = c("mean", "median", "first", "last", "or", "and"), sensitivity.summary.stat = c("mean", "median", "first", "last"), returnValues = c("estimate", "pvalue", "fdr"), sensitivity.cutoff = NA, standardize = c("SD", "rescale", "none"), nthread = 1, verbose = TRUE, ... )
rSet |
A |
mDataType |
|
radiation.types |
|
features |
|
sensitivity.measure |
|
molecular.summary.stat |
What summary statistic should be used to summarize duplicates for cell line molecular profile measurements? |
sensitivity.summary.stat |
What summary statistic should be used to summarize duplicates for cell line sensitivity measurements? |
returnValues |
|
sensitivity.cutoff |
Allows to provide upper and lower bounds to sensitivity measures in the cases where the values exceed physical values due to numerical or other errors. |
standardize |
|
nthread |
|
verbose |
|
... |
additional arguments not currently fully supported by the function |
list a 3D array with genes in the first dimension, radiation.types in the
second, and return values in the third.
data(clevelandSmall) rad.sensitivity <- radSensitivitySig(clevelandSmall, mDataType="rna", nthread=1, features = fNames(clevelandSmall, "rna")[1], radiation.types=treatmentNames(clevelandSmall)) print(rad.sensitivity)data(clevelandSmall) rad.sensitivity <- radSensitivitySig(clevelandSmall, mDataType="rna", nthread=1, features = fNames(clevelandSmall, "rna")[1], radiation.types=treatmentNames(clevelandSmall)) print(rad.sensitivity)
Show a RadioSet
## S4 method for signature 'RadioSet' show(object)## S4 method for signature 'RadioSet' show(object)
object |
A |
Prints the RadioSet object to the output stream, and returns invisible NULL.
data(clevelandSmall) clevelandSmalldata(clevelandSmall) clevelandSmall
Show RadioGx Signatures
## S4 method for signature 'RadioSig' show(object)## S4 method for signature 'RadioSig' show(object)
object |
|
Prints the RadioGx Signatures object to the output stream, and returns invisible NULL.
data(clevelandSmall) rad.sensitivity <- radSensitivitySig(clevelandSmall, mDataType="rna", nthread=1, features = fNames(clevelandSmall, "rna")[1]) rad.sensitivitydata(clevelandSmall) rad.sensitivity <- radSensitivitySig(clevelandSmall, mDataType="rna", nthread=1, features = fNames(clevelandSmall, "rna")[1]) rad.sensitivity
This funtion prints out the information about the call used to compute the rad signatures, and the session info for the session in which the computation was done. Useful for determining the exact conditions used to generate signatures.
## S4 method for signature 'RadioSig' showSigAnnot(object)## S4 method for signature 'RadioSig' showSigAnnot(object)
object |
An object of the |
Prints the RadioGx Signatures annotations to the output stream, and returns invisible NULL.
data(clevelandSmall) rad.sensitivity <- radSensitivitySig(clevelandSmall, mDataType="rna", nthread=1, features = fNames(clevelandSmall, "rna")[1]) showSigAnnot(rad.sensitivity)data(clevelandSmall) rad.sensitivity <- radSensitivitySig(clevelandSmall, mDataType="rna", nthread=1, features = fNames(clevelandSmall, "rna")[1]) showSigAnnot(rad.sensitivity)
This is the prefered method of subsetting a RadioSet. This function allows abstraction of the data to the level of biologically relevant objects: radiations and cells. The function will automatically go through all of the combined data in the RadioSet and ensure only the requested radiations and cell lines are found in any of the slots. This allows quickly picking out all the experiments for a radiation or cell of interest, as well removes the need to keep track of all the metadata conventions between different datasets.
## S4 method for signature 'RadioSet' subsetTo( object, cells = NULL, radiationTypes = NULL, molecular.data.cells = NULL, keep.controls = TRUE, ... )## S4 method for signature 'RadioSet' subsetTo( object, cells = NULL, radiationTypes = NULL, molecular.data.cells = NULL, keep.controls = TRUE, ... )
object |
A |
cells |
A list or vector of cell names as used in the dataset to which the object will be subsetted. If left blank, then all cells will be left in the dataset. |
radiationTypes |
A list or vector of radiation names as used in the dataset to which the object will be subsetted. If left blank, then all radiationTypes will be left in the dataset. |
molecular.data.cells |
A list or vector of cell names to keep in the molecular data |
keep.controls |
If the dataset has perturbation type experiments, should the controls be kept in the dataset? Defaults to true. |
... |
Other arguments passed by other function within the package |
A RadioSet with only the selected radiation types and cells
clevelandRadiationTypes <- treatmentNames(clevelandSmall) clevelandCells <- sampleNames(clevelandSmall) RSet <- subsetTo(clevelandSmall, radiationTypes = clevelandRadiationTypes[1], cells = clevelandCells[1]) RSetclevelandRadiationTypes <- treatmentNames(clevelandSmall) clevelandCells <- sampleNames(clevelandSmall) RSet <- subsetTo(clevelandSmall, radiationTypes = clevelandRadiationTypes[1], cells = clevelandCells[1]) RSet
Given a RadioSet with molecular data, this function will summarize the data into one profile per cell line, using the chosed summary.stat. Note that this does not really make sense with perturbation type data, and will combine experiments and controls when doing the summary if run on a perturbation dataset.
## S4 method for signature 'RadioSet' summarizeMolecularProfiles( object, mDataType, cell.lines, features, summary.stat = c("mean", "median", "first", "last", "and", "or"), fill.missing = TRUE, summarize = TRUE, verbose = TRUE )## S4 method for signature 'RadioSet' summarizeMolecularProfiles( object, mDataType, cell.lines, features, summary.stat = c("mean", "median", "first", "last", "and", "or"), fill.missing = TRUE, summarize = TRUE, verbose = TRUE )
object |
|
mDataType |
|
cell.lines |
|
features |
|
summary.stat |
|
fill.missing |
|
summarize |
A flag which when set to FALSE (defaults to TRUE) disables summarizing and returns the data unchanged as a ExpressionSet |
verbose |
|
matrix An updated RadioSet with the molecular data summarized
per cell line.
data(clevelandSmall) clevelandSmall <- summarizeMolecularProfiles(clevelandSmall, mDataType = "rna", cell.lines=sampleNames(clevelandSmall), summary.stat = 'median', fill.missing = TRUE, verbose=TRUE) clevelandSmalldata(clevelandSmall) clevelandSmall <- summarizeMolecularProfiles(clevelandSmall, mDataType = "rna", cell.lines=sampleNames(clevelandSmall), summary.stat = 'median', fill.missing = TRUE, verbose=TRUE) clevelandSmall
This function creates a table with cell lines as rows and radiation types as columns, summarising the drug senstitivity data of a RadioSet into drug-cell line pairs
## S4 method for signature 'RadioSet' summarizeSensitivityProfiles( object, sensitivity.measure = "AUC_recomputed", cell.lines, radiation.types, summary.stat = c("mean", "median", "first", "last", "max", "min"), fill.missing = TRUE, verbose = TRUE )## S4 method for signature 'RadioSet' summarizeSensitivityProfiles( object, sensitivity.measure = "AUC_recomputed", cell.lines, radiation.types, summary.stat = c("mean", "median", "first", "last", "max", "min"), fill.missing = TRUE, verbose = TRUE )
object |
'RadioSet' The RadioSet from which to extract the data |
sensitivity.measure |
'character' which sensitivity sensitivity.measure to use? Use the sensitivityMeasures function to find out what measures are available for each PSet. |
cell.lines |
'character' The cell lines to be summarized. If any cell lines has no data, it will be filled with missing values |
radiation.types |
'character' The radiation types to be summarized. If any radiation type has no data, it will be filled with missing values |
summary.stat |
'character' which summary method to use if there are repeated cell line-drug experiments? Choices are "mean", "median", "first", or "last" |
fill.missing |
'logical(1)' should the missing cell lines not in the molecular data object be filled in with missing values? |
verbose |
Should the function print progress messages? |
[matrix] A matrix with cell lines going down the rows, radiation types across the columns, with the selected sensitivity statistic for each pair.
data(clevelandSmall) GDSCauc <- summarizeSensitivityProfiles(clevelandSmall, sensitivity.measure='AUC_published')data(clevelandSmall) GDSCauc <- summarizeSensitivityProfiles(clevelandSmall, sensitivity.measure='AUC_published')
Update the RadioSet class after changes in it struture or API
## S4 method for signature 'RadioSet' updateObject(object)## S4 method for signature 'RadioSet' updateObject(object)
object |
A |
RadioSet with update class structure.