getTrajectoryDf: Obtain a trajectory data.frame

getTrajectoryDfR Documentation

Obtain a trajectory data.frame

Description

Extracts a data.frame that contains information about barcode-spots needed for analysis related to spatialTrajectoryScreening().

Usage

getTrajectoryDf(
  object,
  id,
  variables,
  binwidth = getCCD(object),
  n_bins = NA_integer_,
  method_gs = NULL,
  normalize = TRUE,
  summarize_with = FALSE,
  smooth_span = 0,
  format = "wide",
  verbose = NULL,
  ...
)

Arguments

object

An object of class spata2.

id

Character value. Denotes the spatial trajectory of interest.

variables

Character vector. The numeric variables of interest. Must be inside:

  • Gene sets Must be in getGeneSets()

  • Genes Must be in getGenes()

  • Features Must be in getFeatureNames(..., of_class = "numeric")

binwidth

Distance value. The width of the bins to which the barcode-spots are assigned. Defaults to the center-center distance: binwidth = getCCD(object).

n_bins

Numeric value. Specifies the exact number of bins the barcodes are binned into.

method_gs

Character value. The method according to which gene sets will be handled specified as a character of length one. This can be either 'mean or one of 'gsva', 'ssgsea', 'zscore', or 'plage'. The latter four will be given to gsva::GSVA().

normalize

Logical. If set to TRUE values will be scaled to 0-1.

Hint: Variables that are uniformly expressed can not be scaled and are discarded.

summarize_with

Character value. Name of the function with which to summarize.

smooth_span

Numeric value. Controls the degree of smoothing. Given to argument span of stats::loess().

verbose

Logical. If set to TRUE informative messages regarding the computational progress will be printed.

(Warning messages will always be printed.)

...

Used to absorb deprecated arguments or functions.

Value

Data.frame. (See details for more.)


kueckelj/SPATA2 documentation built on March 16, 2024, 10:25 a.m.