# The DeLorean pseudotime estimation package In DeLorean: Estimates Pseudotimes for Single Cell Expression Data



### Choose genes

We only have data for a few genes and can easily model them all which is typical for qPCR data. RNA-seq data often has far too many genes for the model to fit. In any case most are probably irrelevant. In these cases we recommend an analysis of variance across the capture times to choose those genes whose means vary most across time. These are most likely to be relevant for fitting the model.

dl <- aov.dl(dl)


The most temporally variable genes (by p-value) are at the head of the result:

head(dl$aov)  The least temporally variable genes (by p-value) are at the tail of the result: tail(dl$aov)


and for instance you could run the model on the 20 most variable genes by executing

dl <- filter_genes(dl, genes=head(dl$aov, 20)$gene)


otherwise do not call filter_genes and DeLorean will use all the genes.

### Fit the model

Now we have the data we can fit our model using Stan's ADVI variational Bayes algorithm. To run the No-U-Turn sampler use method='sample'.

dl <- fit.dl(dl, method='vb')


### Examine convergence

If running a sampler, Stan provides $\hat{R}$ statistics that can aid detecting convergence problems. This makes no sense for ADVI but we show how to produce the boxplots here for users of the samplers.

dl <- examine.convergence(dl)
plot(dl, type='Rhat')


### Estimated pseudotimes

Plot the pseudotimes from the best sample (best in the sense of highest likelihood). The prior means for the capture points are shown as dashed lines.

plot(dl, type='pseudotime')


### Expression profiles

Plot the expression data over the pseudotimes from the best sample.

dl <- make.predictions(dl)
plot(dl, type='profiles')


## Try the DeLorean package in your browser

Any scripts or data that you put into this service are public.

DeLorean documentation built on May 2, 2019, 9:24 a.m.