Skip to contents

Summarize feature dynamics along a trajectory

Usage

get_trajectory(
  proj,
  name = "trajectory",
  assay_name = "GeneScoreMatrix",
  group_every = 1L,
  log2_norm = TRUE,
  scale_to = 10000,
  smooth_window = 11L,
  trajectory_label = NULL,
  threads = NULL
)

Arguments

proj

(MarchRProject) Project with a fitted trajectory column.

name

(character) Pseudotime column name. Default "trajectory".

assay_name

(character) Feature matrix assay. Default "GeneScoreMatrix".

group_every

(integer) Percentile bin width; must divide 100. Default 1.

log2_norm

(logical) log2(x + 1) after scaling. Default TRUE.

scale_to

(numeric/NULL) Column-sum target for CPM scaling. Default 10000.

smooth_window

(integer/NULL) Centered smoothing window over bins. Default 11.

trajectory_label

(character/NULL) Metadata column for per-bin majority labels. Default NULL.

threads

(integer/NULL) Reserved for future parallel work. Default NULL.

Value

A SummarizedExperiment with smoothMat (if smoothed) and mat assays.

Details

Ports ArchR's getTrajectory. The feature x bin sum is one streaming mat %*% G multiply. Feature values are summed per bin, CPM-scaled, log2-transformed, then centered-smoothed across bins. Deviations: empty pseudotime bins are dropped before normalization; feature rowData falls back to rownames when the assay lacks metadata.