weights_from_pst | R Documentation |
Most trajectory inference methods do not perform soft assignment but instead assign cells to all possible lineages before a branching point, and then to one or another. This function re-creates a weight matrix from those matrices of pseudotime
weights_from_pst(pseudotime, ...)
## S4 method for signature 'matrix'
weights_from_pst(pseudotime)
## S4 method for signature 'data.frame'
weights_from_pst(pseudotime)
pseudotime |
A matrix or data.frame of \[ncells\] by \[nCurves\]. |
... |
Other parameters including: |
A object of the same type and dimensions as the original object, with the weights for each curve and cell.
data(list = 'slingshotExample', package = "slingshot")
if (!"cl" %in% ls()) {
rd <- slingshotExample$rd
cl <- slingshotExample$cl
}
sds <- slingshot::slingshot(rd, cl)
weights_from_pst(slingshot::slingPseudotime(sds))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.