getPlottingData | R Documentation |
Returns assay
, sample
, feature
, and result
data that may be used for
plotting. This function is called by plotStudy()
and the output is passed to
custom plotting functions. It should be used directly when interactively
creating custom plotting functions.
getPlottingData(study, modelID, featureID, testID = NULL, libraries = NULL)
study |
An OmicNavigator study. Either an object of class |
modelID |
Filter by modelID |
featureID |
Filter by featureID |
testID |
Filter by testID |
libraries |
The directories to search for installed study packages. If
left as |
The end-user should call this function and populate the first argument of
their custom plotting function with the output. When building functions, the
end-user should understand the category of plotting function they are creating
(e.g. singleFeature
or multiFeature
, see addPlots()
) and call
getPlottingData()
accordingly.
Custom plots that accept data from multiple models and a single test
(plotType = c(‘multiModel’, ‘singleTest’)
; see addPlots()
) should be built
to accept output from getPlottingData()
where modelID
is vector of length
n and testID
is a vector of length n, where n is the number of models.
Custom plots that accept data from multiple models and multiple tests
(plotType = c(‘multiModel’, ‘multiTest’)
) should be built to accept output
from getPlottingData()
where modelID
and testID
vectors are length m,
where m is the total number of tests considered across all models (note that
testID
s must be repeated across models for the plotting function to work in
the app). The index positions of these two vectors should correspond. That is,
testID
position 1 should be found in the model specified by modelID
position 1, etc. See addPlots()
for information about the assignment of
plotTypes
for your custom plots.
Returns a list of at least 4 objects:
assays |
A data frame that contains the assay measurements,
filtered to only include the row(s) corresponding to the input featureID(s)
(see |
samples |
A data frame that contains the sample metadata for the
given modelID (see |
features |
A data frame that contains the feature metadata,
filtered to only include the row(s) corresponding to the input featureID(s)
(see |
results |
A data frame that contains the test results, filtered to only include the row(s) corresponding to the input featureID(s). If multiple featureIDs are requested, the rows are reordered to match the order of this input. The column order is unchanged. If multiple testIDs are provided, they are stored in a list object. |
mapping |
A data frame that contains the featureID(s) from each model. This is the filtered mapping object. This data frame is returned when multiple models are passed as arguments |
The data frame results
is only returned if you pass a testID. By
default the app will always pass the currently selected testID.
addPlots
, plotStudy
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.