weights_from_pst {condiments} | R Documentation

## weights_from_pst

### Description

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

### Usage

    weights_from_pst(pseudotime, ...)

    ## S4 method for signature 'matrix'
    weights_from_pst(pseudotime)

    ## S4 method for signature 'data.frame'
    weights_from_pst(pseudotime)

### Arguments

`pseudotime` | A matrix or data.frame of \[ncells\] by \[nCurves\].
`...` | Other parameters including:

### Value

A object of the same type and dimensions as the original object, with the weights for each curve and cell.

### Examples

    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))

[Package condiments version 1.0.0 Index]