getTrajectory.Rd
This function will get a supervised trajectory from an ArchRProject
(see addTrajectory
), get data
from a desired matrix, and smooth each value across the input trajectory.
getTrajectory(
ArchRProj = NULL,
name = "Trajectory",
useMatrix = "GeneScoreMatrix",
groupEvery = 1,
log2Norm = TRUE,
scaleTo = 10000,
smoothWindow = 11,
trajectoryLabel = NULL,
threads = getArchRThreads()
)
An ArchRProject
object.
A string indicating the name of the fitted trajectory in cellColData
to retrieve from the given ArchRProject
.
The name of the data matrix from the ArrowFiles
to get numerical values for each cell from. Recommended
matrices are "GeneScoreMatrix", "PeakMatrix", or "MotifMatrix".
The number of sequential percentiles to group together when generating a trajectory. This is similar to smoothing
via a non-overlapping sliding window across pseudo-time. If groupEvery = 2
, the values for percentiles 1 and 2, 3 and 4,
5 and 6, etc. will be grouped together.
A boolean value that indicates whether the summarized trajectory matrix should be log2 transformed. If you are using a "MotifMatrix" set to FALSE.
Once the sequential trajectory matrix is created, each column in that matrix will be normalized to a column sum
indicated by scaleTo
. Setting this to NULL
will prevent any normalization and should be done in certain circumstances
(for ex. if you are using a "MotifMatrix").
An integer value indicating the smoothing window in size (relaive to groupEvery
) for the sequential
trajectory matrix to better reveal temporal dynamics.
The name of a column in cellColData
to be used for labeling the quantile bins of the trajectory.
This is used in plotTrajectoryHeatmap()
when you want to create a color label for the columns across the top
of the heatmap. Typically, this should be the same column used in groupBy
in the addTrajectory()
function.
The number of threads to be used for parallel computing.
# Get Test ArchR Project
proj <- getTestProject()
#Add Trajectory
proj <- addTrajectory(proj, trajectory = c("C1", "C2", "C3"), embedding = "UMAP", force = TRUE)
#Get Trajectory
seTraj <- getTrajectory(proj)