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)Returns a list of at least 4 objects:
assaysA data frame that contains the assay measurements,
filtered to only include the row(s) corresponding to the input featureID(s)
(see getAssays). If multiple featureIDs are requested, the rows
are reordered to match the order of this input. The column order is
unchanged.
samplesA data frame that contains the sample metadata for the
given modelID (see getSamples). The rows are reordered to match
the columns of the assays data frame.
featuresA data frame that contains the feature metadata,
filtered to only include the row(s) corresponding to the input featureID(s)
(see getFeatures). If multiple featureIDs are requested, the
rows are reordered to match the order of this input (and thus match the order
of the assays data frame).
resultsA 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.
mappingA 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.
An OmicNavigator study. Either an object of class onStudy,
or the name of an installed study package.
Filter by modelID
Filter by featureID
Filter by testID
The directories to search for installed study packages. If
left as NULL (the default), then
installed.packages will use the result of
.libPaths.
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
testIDs 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.
addPlots, plotStudy