pca_with_pt_line: PCA plot of cells with pseudotime trajectory projected onto...

Description Usage Arguments

Description

The reason why I have not integrated PCA computation into this function is that pca takes too long for large matrices. That's why the function looks quite inconvenient. I use gmodels::fast.prcomp for PCA. Similarly, users need to calculate the PC projected variance externally e.g. proj_var <- solve (pc_pt$rotation^2, t(pred_list[2]), tol=1e-20)

Strictly speaking, projecting variance onto PCs require NNLS. I have implemented it in python but no time to do so in R. Fortunately, I did not need to use this function often.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
pca_with_pt_line(
  pc_pt,
  pt_mat,
  metadata,
  color.by,
  branch_info = NULL,
  proj_var = NULL,
  num_dim = c(1, 2),
  AP = AP
)

Arguments

pc_pt

a prcomp object

pt_mat

the matrix for pseudotime trajectory

branch_info

a vector for branch assignment


Yutong441/TBdev documentation built on Dec. 18, 2021, 8:22 p.m.