
Plots the expression profile of a feature set corresponding to specified pathways onto a 2D scatter plot based on a dimensionality reduction technique.
Source:R/PathwayVisualisation.R
PlotPathways.RdThis function has been adapted from fgsea package. For more detail about function inputs please visit their documentation.
Usage
PlotPathways(
pathways,
object,
title = NULL,
assay = DefaultAssay(object),
slot = "scale.data",
reduction = NULL,
colors = c("darkblue", "lightgrey", "darkred"),
guide = "colourbar",
database = NULL,
database_version = "latest",
database_source = c("auto", "bundled", "local"),
database_local_dir = NULL,
...
)Arguments
- pathways
Character vector of pathway names to plot. These pathways must be those stored in the
chempathwayobject. To check callunique(chempathway$pathwayName).- object
SpaMTP Seurat object containing the dimensionality reduction to use for plotting.
- title
Optional title for the plot. If set to
NULLthe title will be the pathway name (default = NULL).- assay
Character string defining the name of assay to use for data extraction. This
assayshould contain RAMP_IDs as feature names (default =SeuratObject::DefaultAssay(object)).- slot
Character string defining the name of slot to extract data from (default = "scale.data").
- reduction
Character string defining which dimensionality reduction to use. If not specified, first searches for 'umap', then 'tsne', then 'pca' (default = NULL).
- colors
Vector of colors for the gradient (default = c("darkblue", "lightgrey", "darkred")).
- guide
Character string stating the type of legend to display (default = "colourbar").
- database
Optional named list of database resources, normally created by
LoadSpaMTPDatabase().- database_version
Database snapshot version used for pathway lookup.
- database_source
Database source; see
LoadSpaMTPDatabase().- database_local_dir
Optional local RDS resource directory.
- ...
Additional inputs taken by
Seurat::FeaturePlot(). Check the relative documentation for more infomation.
Examples
utils::str(formals(PlotPathways))
#> Dotted pair list of 13
#> $ pathways : symbol
#> $ object : symbol
#> $ title : NULL
#> $ assay : language DefaultAssay(object)
#> $ slot : chr "scale.data"
#> $ reduction : NULL
#> $ colors : language c("darkblue", "lightgrey", "darkred")
#> $ guide : chr "colourbar"
#> $ database : NULL
#> $ database_version : chr "latest"
#> $ database_source : language c("auto", "bundled", "local")
#> $ database_local_dir: NULL
#> $ ... : symbol
#PlotPathways(c("Glycolysis", "Acylcarnitine 3-Butenylcarnitine", "ABC transporters"), spamtp_obj, reduction = "umap"))