Extract coordinates (e.g. from dimensionality reduction) from bio datasets, optionally with annotations to help plotting them with ggplot2 package.

get_coord(x, coord.name = NULL, add.cols = TRUE, add.exprs = NULL, ...)

# S3 method for SingleCellExperiment
get_coord(x, coord.name = NULL, add.cols = TRUE, add.exprs = FALSE, ...)

# S3 method for CellDataSet
get_coord(x, coord.name = "A", add.cols = TRUE, add.exprs = FALSE, ...)

# S3 method for seurat
get_coord(x, coord.name = "tsne", add.cols = TRUE, add.exprs = FALSE, ...)

# S3 method for Seurat
get_coord(
  x,
  coord.name = NULL,
  add.cols = TRUE,
  add.exprs = FALSE,
  assay = NULL,
  slot = "data",
  ...
)

Arguments

x

object to obtain coordinates.

coord.name

name of the holder for coordinates.

add.cols

logical; whether to annotate each coordinate with column data (i.e. colData).

add.exprs

if not NULL a list of genes to add counts obtained with get_expression().

...

arguments passed down to methods.

assay

name of assay for Seurat objects.

slot

name of slot for Seurat objects.

Value

A data.frame object.