align_embedding_to_reference: Align simple (y-shaped) lineage trees represented as points...

Description Usage Details

View source: R/pseudotime.R

Description

Output from Monocle is arbitrarily rotated and reflected. For bootstrap analysis where I call Monocle on subsets of the data, it's useful to align all of the results so that cells are in roughly the same positions across bootstrap samples. This program does that for any two matrices mat_ref and mat_samp. Rows are cells and columns are dimensions of some embedding.

Usage

1
align_embedding_to_reference(mat_samp, mat_ref, do.plot = F)

Details

The reference and the query can have different numbers of columns. They should have the same number of rows, or else the property all( rownames( mat_samp ) The solution is based on linear regression. The return value is a projection of each column of mat_ref onto the column space of the augmented matrix [mat_samp | 1]. In other terms, mat_samp is translated and linearly combined to minimize the l2 distance to each column of mat_ref, then returned. This function always returns a numeric matrix with ncol = ncol(mat_ref) and nrow = nrow(mat_samp).


maehrlab/thymusatlastools documentation built on May 28, 2019, 2:32 a.m.