regvelo.tools.set_output

regvelo.tools.set_output(adata, vae, n_samples=30, batch_size=None)[source]

Add inference results from a trained RegVelo model to adata.

Parameters:
  • adata (AnnData) – Annotated data matrix.

  • vae (REGVELOVI) – Trained REGVELOVI model.

  • n_samples (int) – Number of posterior samples to use for estimation.

  • batch_size (Optional[int]) – Minibatch size for data loading into model. If None, uses scvi.settings.batch_size.

Return type:

None

Returns:

: Nothing, just updates adata with the following fields:

  • adata.layers["velocity"]: Estimated velocity.

  • adata.layers["latent_time_velovi"]: Estimated latent time.

  • adata.var["fit_alpha"]: Estimated alpha rate.

  • adata.var["fit_beta"]: Estimated beta rate.

  • adata.var["fit_gamma"]: Estimated gamma rate.

  • adata.layers["fit_t"]: Estimated latent time scaled to the maximum value

  • adata.var["fit_scaling"]: Scaling factor for the latent time.