View source: R/wrap_add_dimred.R
add_dimred | R Documentation |
This can also perform dimensionality reduction of
The projected expression state with RNA velocity, only if dimred
is a function and pair_with_velocity=TRUE
The trajectory, by projecting the milestones and some "waypoints" to the reduced space, only if dataset
contains a trajectory
add_dimred(
dataset,
dimred,
dimred_milestones = NULL,
dimred_segment_progressions = NULL,
dimred_segment_points = NULL,
project_trajectory = TRUE,
connect_segments = FALSE,
pair_with_velocity = !is.null(dataset$expression_future),
expression_source = "expression",
...
)
is_wrapper_with_dimred(dataset)
get_dimred(
dataset,
dimred = NULL,
expression_source = "expression",
return_other_dimreds = FALSE
)
dataset |
A dataset created by |
dimred |
Can be
|
dimred_milestones |
An optional dimensionality reduction of the milestones. A matrix with milestones in rows and components (comp_1, comp_2, ...) in columns This will be automatically calculated if |
dimred_segment_progressions, dimred_segment_points |
An optional set of points along the trajectory with their dimensionality reduction. These will be automatically calculated if |
project_trajectory |
Whether to also project the trajectory. Only relevant if dataset contains a trajectory, and dimred_segment_progressions and dimred_segment_points are not provided |
connect_segments |
Whether to connect segments between edges |
pair_with_velocity |
Can perform dimensionality reduction if |
expression_source |
The source of expression, can be "counts", "expression", an expression matrix, or another dataset which contains expression |
... |
extra information to be stored in the wrapper |
return_other_dimreds |
Whether or not to return also the milestone dimreds and the segment dimreds, if available. |
A dataset object with dimred, which is a numeric matrix with cells in rows and the different components in columns.
If the dataset contained a trajectory, and project_trajectory=TRUE
(default), dimred_milestones, dimred_segment_progressions and dimred_segment_points will also be present. These are described in project_trajectory()
.
dyndimred::list_dimred_methods()
, project_trajectory()
if (requireNamespace("dyndimred", quietly = TRUE)) {
dataset <- example_dataset
dataset <- add_dimred(
dataset,
dyndimred::dimred_landmark_mds
)
head(dataset$dimred)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.