predictSmooth {tradeSeq} | R Documentation

## predictSmooth

### Description

Get smoothers estimated by `tradeSeq` along a grid. This function does not return fitted values but rather the predicted mean smoother, for a user-defined grid of points.

### Usage

    predictSmooth(models, ...)

    ## S4 method for signature 'SingleCellExperiment'
    predictSmooth(models, gene, nPoints = 100, tidy = TRUE)

    ## S4 method for signature 'list'
    predictSmooth(models, gene, nPoints = 100)

### Arguments

`models` | Either the `SingleCellExperiment` object obtained after running `fitGAM`, or the specific GAM model for the corresponding gene, if working with the list output of `tradeSeq`.
`...` | parameters including:
`gene` | Either a vector of gene names or an integer vector, corresponding to the row(s) of the gene(s).
`nPoints` | The number of points used to create the grid along the smoother for each lineage. Defaults to 100.
`tidy` | Logical: return tidy output. If TRUE, returns a `data.frame` specifying lineage, gene, pseudotime and value of estimated smoother. If FALSE, returns matrix of predicted smoother values, where each row is a gene and each column is a point on the uniform grid along the lineage. For example, if the trajectory consists of 2 lineages and `nPoints=100`, then the returned matrix will have 2*100 columns, where the first 100 correspond to the first lineage and columns 101-200 to the second lineage.

### Details

Using the gene expression model of `tradeSeq` available at https://www.nature.com/articles/s41467-020-14766-3#Sec2. the output of `predictSmooth` returns the η_{gi} value for equally space values of pseudotimes, and a constant value for U_i and N_i (arbitraly, we select the values of i=1).

### Value

A `matrix` with estimated averages.

A vector of fitted values.

### Examples

    data(gamList, package = "tradeSeq")
    predictSmooth(models = gamList, gene = 1)

[Package tradeSeq version 1.8.0 Index]