dynamo.tl.recipe_kin_data

dynamo.tl.recipe_kin_data(adata, tkey=None, reset_X=True, X_total_layers=False, splicing_total_layers=False, n_top_genes=1000, keep_filtered_cells=None, keep_filtered_genes=None, keep_raw_layers=None, del_2nd_moments=None, ekey='M_t', vkey='velocity_T', basis='umap', rm_kwargs={})[source]

An analysis recipe that properly pre-processes different layers for an kinetics experiment with both labeling and splicing or only labeling data.

Parameters
  • adata (AnnData) – AnnData object that stores data for the the kinetics experiment, must include uu, ul, su, sl four different layers.

  • tkey (str or None (default: None)) – The column key for the labeling time of cells in .obs. Used for labeling based scRNA-seq data (will also support for conventional scRNA-seq data). Note that tkey will be saved to adata.uns[‘pp’][‘tkey’] and used in dyn.tl.dynamics in which when group is None, tkey will also be used for calculating 1st/2st moment or covariance. We recommend to use hour as the unit of time.

  • reset_X (bool (default: False)) – Whether do you want to let dynamo reset adata.X data based on layers stored in your experiment. One critical functionality of dynamo is about visualizing RNA velocity vector flows which requires proper data into which the high dimensional RNA velocity vectors will be projected. (1) For kinetics experiment, we recommend the use of total layer as adata.X; (2) For degradation/conventional experiment scRNA-seq, we recommend using splicing layer as adata.X. Set reset_X to True to set those default values if you are not sure.

  • splicing_total_layers (bool (default False)) – Whether to also normalize spliced / unspliced layers by size factor from total RNA. Paramter to recipe_monocle function.

  • X_total_layers (bool (default False)) – Whether to also normalize adata.X by size factor from total RNA. Paramter to recipe_monocle function.

  • n_top_genes (int (default: 1000)) – How many top genes based on scoring method (specified by sort_by) will be selected as feature genes. Arguments required by the recipe_monocle function.

  • keep_filtered_cells (bool (default: False)) – Whether to keep genes that don’t pass the filtering in the returned adata object. Used in recipe_monocle.

  • keep_filtered_genes (bool (default: False)) – Whether to keep genes that don’t pass the filtering in the returned adata object. Used in recipe_monocle.

  • keep_raw_layers – Whether to keep layers with raw measurements in the returned adata object. Used in recipe_monocle.

Return type

An updated adata object that went through a proper and typical time-resolved RNA velocity analysis.