mmVelo: a deep generative model for estimating cell state-dependent dynamics across multiple modalities.
The 21 matches
- [1] § 3 Results › 3.5 Posterior velocity variability reveals modality-specific uncertainty patterns ↔ mmVelo_tutorial_v2/src/mmvelo_multi/velocity_off_manifold_mod.py, lines 1–37 · score 0.74 · low dimensional embedding, local tangent space, manifold instability, velocity samples, fluctuation, metric
- [2] § 2 Methods › 2.13 Preprocessing of data › 2.13.1 10× embryonic E18 mouse brain ↔ mmVelo_tutorial_v2/src/fig_E18_mose_brain/08_benchmarking_latent.py, lines 78–137 · score 0.71 · E18 mouse, highly variable genes, Scanpy, matrix, filtered, brain
- [3] § 3 Results › 3.7 mmVelo estimates velocity in missing modalities ↔ mmVelo_tutorial_v2/src/fig_human_brain/01_clustering_pseudotime.py, lines 17–43 · score 0.70 · mGPC, GluN, nIPC, cyc, prog, SP
- [4] § 2 Methods › 2.12 Velocity inference on missing modality ↔ mmVelo_tutorial_v2/tutorial_2_human_brain_missing_modality.ipynb, lines 1–59 · score 0.69 · cross modal, human cortical development, scRNA, scATAC, missing modality, profiles
- [5] § 3 Results › 3.4 mmVelo reveals the dynamics of TF binding motifs in mouse hair follicle development ↔ mmVelo_tutorial_v2/src/fig_mouse_hair_follicle/03_clustering_motif.py, lines 305–341 · score 0.65 · hair shaft cuticle, root sheath, hair follicle, medulla, cortex, motifs
- [6] § 3 Results › 3.4 mmVelo reveals the dynamics of TF binding motifs in mouse hair follicle development ↔ mmVelo_tutorial_v2/src/fig_mouse_hair_follicle/03_clustering_motif_vjp.py, lines 404–427 · score 0.65 · hair shaft cuticle, root sheath, hair follicle, medulla, cortex, motifs
- [7] § 3 Results › 3.7 mmVelo estimates velocity in missing modalities ↔ mmVelo_tutorial_v2/src/mmvelo_tutorial/viz_human_brain.py, lines 94–124 · score 0.64 · excitatory neuron lineage, GluN, nIPC, pseudotime, mmVelo, cells
- [8] § 2 Methods › 2.13 Preprocessing of data › 2.13.2 SHARE-seq mouse skin (hair follicle) data ↔ mmVelo_tutorial_v2/src/fig_mouse_hair_follicle/02_clustering_heatmap.py, lines 34–65 · score 0.61 · hair shaft cuticle, Hair follicle, TAC, medulla, cortex, mouse
- [9] § 2 Methods › 2.13 Preprocessing of data › 2.13.2 SHARE-seq mouse skin (hair follicle) data ↔ mmVelo_tutorial_v2/src/fig_mouse_hair_follicle/03_clustering_motif.py, lines 305–341 · score 0.61 · hair shaft cuticle, Hair follicle, TAC, medulla, cortex, mouse
- [10] § 2 Methods › 2.6 Training procedure ↔ mmVelo_tutorial_v2/src/mmvelo_tutorial/train_human_brain.py, lines 257–344 · score 0.60 · fine tuning, smoothed profiles, validation, trained, ELBO, reconstruct
- [11] § 2 Methods › 2.6 Training procedure ↔ mmVelo_tutorial_v2/src/mmvelo_tutorial/train_mouse_brain.py, lines 139–218 · score 0.59 · fine tuning, smoothed profiles, validation, trained, ELBO, reconstruct
- [12] § 2 Methods › 2.6 Training procedure ↔ mmVelo_tutorial/src/streamlineplot.py, lines 1026–1114 · score 0.57 · steady state model, mRNA, RNA velocity, ratio, unspliced, dynamics
- [13] § 2 Methods › 2.6 Training procedure ↔ mmVelo_tutorial_v2/src/mmvelo_multi/streamlineplot.py, lines 1028–1116 · score 0.57 · steady state model, mRNA, RNA velocity, ratio, unspliced, dynamics
- [14] § 2 Methods › 2.3 Fine-tuning decoders for smoothed profile reconstruction ↔ mmVelo_tutorial_v2/src/mmvelo_tutorial/train_human_brain.py, lines 257–344 · score 0.56 · fine tuned, smoothed profiles, predict, neighborhood, reconstruction, mmVelo
- [15] § 2 Methods › 2.3 Fine-tuning decoders for smoothed profile reconstruction ↔ mmVelo_tutorial_v2/src/mmvelo_tutorial/train_mouse_brain.py, lines 139–218 · score 0.55 · fine tuned, smoothed profiles, predict, reconstruction, mmVelo, cell
- [16] § 3 Results › 3.7 mmVelo estimates velocity in missing modalities ↔ mmVelo_tutorial_v2/tutorial_2_human_brain_missing_modality.ipynb, lines 1–59 · score 0.54 · human cortical development, scRNA, scATAC, missing modalities, chromatin velocity, mmVelo
- [17] § 2 Methods › 2.11 Inferring TF-peak regulatory relationships using chromatin velocity ↔ mmVelo_tutorial_v2/src/fig_mouse_hair_follicle/05_GRN_inference_pycistopic_res.py, lines 56–98 · score 0.54 · putative regulator TFs, peak cluster, Leiden, motif, mmVelo
- [18] § 2 Methods › 2.11 Inferring TF-peak regulatory relationships using chromatin velocity ↔ mmVelo_tutorial_v2/src/fig_mouse_hair_follicle/05_GRN_inference_1st.py, lines 143–200 · score 0.53 · importance scores, mRNA, GRNBoost2, regulate, TFs, Leiden
- [19] § 2 Methods › 2.10 Quantification of velocity uncertainty ↔ mmVelo_tutorial_v2/src/mmvelo_multi/velocity_off_manifold.py, lines 1–29 · score 0.53 · manifold instability, latent dynamics, fluctuation, posterior, uncertainty, Quantification
- [20] § 2 Methods › 2.10 Quantification of velocity uncertainty ↔ mmVelo_tutorial_v2/src/mmvelo_multi/velocity_off_manifold_mod.py, lines 1–37 · score 0.52 · manifold components, velocity samples, instability, space, Quantification, uncertainty
- [21] § 2 Methods › 2.8 Benchmarking against velocity estimation methods ↔ mmVelo_tutorial_v2/src/fig_mouse_hair_follicle/03_clustering_motif_vjp.py, lines 404–427 · score 0.51 · hair shaft cuticle, mouse hair follicle, cortex, score, Pseudotime, cells
Paper
Loaded from Europe PMC by your browser, not stored by OSCR: doi.org · Europe PMC
The paper is loaded when this pane is shown.
The authors' code
Python · 490 lines · 22 KB · no license · 2 matches
- """
- velocity_off_manifold_mod.py
- We quantify on- and off-manifold uncertainty of latent dynamics
- in mmVelo directly within each modality-specific space.
- Unlike the latent-space decomposition implemented in velocity_off_manifold.py,
- this approach constructs local tangent spaces
- based on denoised modality-specific representations (RNA: PCA; ATAC: TruncatedSVD/LSI).
- Modality-specific velocity samples are then decomposed into on- and off-manifold components
- within these spaces.
- Processing flow:
- Phase 1 : Collect z_hat and denoised x_RNA, x_ATAC for all cells
- Phase 2 : Compute low-dimensional embeddings for each modality using PCA / TruncatedSVD,
- and construct kNN graphs for each modality
- Phase 3 : Sample d for each batch and compute velocity,
- then project into the local tangent spaces of each modality to evaluate on/off-manifold variance
- Defined metrics (m ∈ {RNA, ATAC}):
- U_dyn^m : dynamics fluctuation uncertainty (all components)
- U_dyn_par^m : on-manifold dynamics fluctuation
- U_dyn_perp^m : off-manifold instability
- R_n^m : off-manifold energy ratio, defined as
- mean_s[ ||v_perp^m,(s)||^2 / ||v^m,(s)||^2 ]
- """
- import os
- from typing import Optional, Tuple
- import numpy as np
- import torch
- import torch.nn.functional as F
- import torch.distributions as dist
- from collections import defaultdict
- from sklearn.neighbors import NearestNeighbors
- from sklearn.decomposition import PCA, TruncatedSVD
- from torch.utils.data import DataLoader
- # ──────────────────────────────────────────────────────────────
- # utlities
- # ──────────────────────────────────────────────────────────────
- def _cosine_sim_variance(samples: torch.Tensor) -> torch.Tensor:
- """
- samples : (S, N, dim)
- returns : (N,) 各セルの cosine 類似度の分散 (Bessel 補正あり)
- """
- v_bar = samples.mean(0) # (N, dim)
- cos = (F.normalize(samples, dim=-1, eps=1e-8)
- * F.normalize(v_bar.unsqueeze(0), dim=-1, eps=1e-8)
- ).sum(-1) # (S, N)
- return cos.var(dim=0, unbiased=True) # (N,)
- def _get_z_hat(model, s, u, a) -> torch.Tensor:
- """posterior mean z_hat = (mu_r + mu_a) / 2"""
- qz_mu_r, _ = model.vaes[0].enc_z(s, u)
- qz_mu_a, _ = model.vaes[1].enc_z(a)
- return (qz_mu_r + qz_mu_a) / 2 # (N, z_dim)
- def _local_tangent_projector_batched(
- embed_batch: torch.Tensor,
- neigh_embed_batch: torch.Tensor,
- manifold_dim: int,
- ) -> torch.Tensor:
- """
- Compute the projection matrix onto the local tangent space
- in the low-dimensional embedding of each modality.
- Parameters
- ----------
- embed_batch : (n_cells, d_emb) 各細胞の埋め込み
- neigh_embed_batch : (n_cells, k, d_emb) 近傍細胞の埋め込み
- manifold_dim : r top-r PCs の数
- Returns
- -------
- P_n : (n_cells, d_emb, d_emb) 射影行列 P = U_n U_n^T
- """
- # 近傍を中心化
- centered = neigh_embed_batch - embed_batch.unsqueeze(1) # (n_cells, k, d_emb)
- # batched SVD: Vh[:, :r, :] が上位 r 右特異ベクトル (各行 = 主方向)
- _, _, Vh = torch.linalg.svd(centered, full_matrices=False) # Vh: (n_cells, min(k,d_emb), d_emb)
- r = min(manifold_dim, Vh.shape[1])
- U_n = Vh[:, :r, :].transpose(-1, -2) # (n_cells, d_emb, r)
- P_n = U_n @ U_n.transpose(-1, -2) # (n_cells, d_emb, d_emb)
- return P_n
- # ──────────────────────────────────────────────────────────────
- # Phase 1: Compute z_hat and denoised modality representations
- # ──────────────────────────────────────────────────────────────
- @torch.no_grad()
- def _collect_representations(
- model, dataloader: DataLoader, device: str
- ) -> Tuple[np.ndarray, np.ndarray, np.ndarray]:
- """
- Compute z_hat, x_RNA = f^s(z_hat)*C_s, x_ATAC = f^a(z_hat)*C_a
- Returns
- -------
- all_z_hat : (N, z_dim)
- all_x_rna : (N, rna_dim)
- all_x_atac : (N, atac_dim)
- """
- model.eval()
- z_hat_list = []
- x_rna_list = []
- x_atac_list = []
- for batch in dataloader:
- s, u, a = batch[0].to(device), batch[1].to(device), batch[2].to(device)
- z_hat = _get_z_hat(model, s, u, a)
- x_rna = model.vaes[0].dec_su(z_hat)[0][0] * model.norm_mat_s
- x_atac = model.vaes[1].dec_ald(z_hat)[0] * model.norm_mat_a
- z_hat_list.append(z_hat.cpu().numpy())
- x_rna_list.append(x_rna.cpu().numpy())
- x_atac_list.append(x_atac.cpu().numpy())
- return (
- np.concatenate(z_hat_list, axis=0),
- np.concatenate(x_rna_list, axis=0),
- np.concatenate(x_atac_list, axis=0),
- )
- # ──────────────────────────────────────────────────────────────
- # Phase 2: compute low dimensional embeddings and construct a kNN graph
- # ──────────────────────────────────────────────────────────────
- def _build_modality_embedding_and_knn(
- x_rna: np.ndarray,
- x_atac: np.ndarray,
- n_pca_rna: int,
- n_lsi_atac: int,
- n_neighbors: int,
- ) -> Tuple[np.ndarray, np.ndarray, np.ndarray, np.ndarray, np.ndarray, np.ndarray]:
- """
- For RNA and ATAC:
- - compute low-dimensional embeddings (PCA / TruncatedSVD)
- - obtain loading matrix (to project velocity onto the low-dimensional space)
- - construct a kNNgraph
- Returns
- -------
- embed_rna : (N, n_pca_rna) RNA 低次元埋め込み
- W_rna : (rna_dim, n_pca_rna) PCA loading 行列
- nn_idx_rna : (N, k) RNA kNN インデックス
- embed_atac : (N, n_lsi_atac) ATAC 低次元埋め込み
- W_atac : (atac_dim, n_lsi_atac) TruncatedSVD loading 行列
- nn_idx_atac : (N, k) ATAC kNN インデックス
- """
- N = x_rna.shape[0]
- k = min(n_neighbors, N - 1)
- # ── RNA: PCA ──────────────────────────────────────────────
- n_comp_rna = min(n_pca_rna, x_rna.shape[1], N - 1)
- pca_rna = PCA(n_components=n_comp_rna, whiten=False)
- embed_rna = pca_rna.fit_transform(x_rna).astype(np.float32) # (N, n_pca_rna)
- W_rna = pca_rna.components_.T.astype(np.float32) # (rna_dim, n_pca_rna)
- nn_rna = NearestNeighbors(n_neighbors=k, metric="euclidean", algorithm="auto")
- nn_rna.fit(embed_rna)
- nn_idx_rna = nn_rna.kneighbors(embed_rna, return_distance=False) # (N, k)
- # ── ATAC: TruncatedSVD (LSI) ──────────────────────────────
- n_comp_atac = min(n_lsi_atac, x_atac.shape[1], N - 1)
- svd_atac = TruncatedSVD(n_components=n_comp_atac, algorithm="randomized")
- embed_atac = svd_atac.fit_transform(x_atac).astype(np.float32) # (N, n_lsi_atac)
- W_atac = svd_atac.components_.T.astype(np.float32) # (atac_dim, n_lsi_atac)
- nn_atac = NearestNeighbors(n_neighbors=k, metric="euclidean", algorithm="auto")
- nn_atac.fit(embed_atac)
- nn_idx_atac = nn_atac.kneighbors(embed_atac, return_distance=False) # (N, k)
- return embed_rna, W_rna, nn_idx_rna, embed_atac, W_atac, nn_idx_atac
- # ──────────────────────────────────────────────────────────────
- # Phase 3: compute on/off-manifold decomposition
- # ──────────────────────────────────────────────────────────────
- @torch.no_grad()
- def _batch_off_manifold_mod(
- model,
- batch,
- # RNA modality
- embed_rna_batch: torch.Tensor, # (n_cells, n_pca_rna)
- neigh_embed_rna_batch: torch.Tensor, # (n_cells, k, n_pca_rna)
- W_rna: torch.Tensor, # (rna_dim, n_pca_rna)
- manifold_dim_rna: int,
- # ATAC modality
- embed_atac_batch: torch.Tensor, # (n_cells, n_lsi_atac)
- neigh_embed_atac_batch: torch.Tensor,# (n_cells, k, n_lsi_atac)
- W_atac: torch.Tensor, # (atac_dim, n_lsi_atac)
- manifold_dim_atac: int,
- # sampling
- n_samples: int,
- device: str,
- ) -> dict:
- """
- Compute the modality-specific on/off-manifold uncertainty decomposition for one batch.
- The velocity is projected onto the low-dimensional embeddings of each modality
- before decomposing it into on- and off-manifold components.
- Returns
- -------
- dict:
- z_hat (n_cells, z_dim)
- vel_mean_rna (n_cells, rna_dim) RNA velocity 平均
- vel_mean_atac (n_cells, atac_dim) ATAC velocity 平均
- u_dyn_rna (n_cells,)
- u_dyn_atac (n_cells,)
- u_dyn_par_rna (n_cells,)
- u_dyn_par_atac (n_cells,)
- u_dyn_perp_rna (n_cells,)
- u_dyn_perp_atac (n_cells,)
- off_ratio_rna (n_cells,)
- off_ratio_atac (n_cells,)
- """
- s, u, a = batch[0].to(device), batch[1].to(device), batch[2].to(device)
- z_hat = _get_z_hat(model, s, u, a) # (n_cells, z_dim)
- # ── modality-specific 局所接線空間の射影行列 ──────────────
- # RNA: (n_cells, n_pca_rna, n_pca_rna)
- P_rna = _local_tangent_projector_batched(embed_rna_batch, neigh_embed_rna_batch, manifold_dim_rna)
- I_rna = torch.eye(P_rna.shape[-1], device=device).unsqueeze(0).expand(z_hat.shape[0], -1, -1)
- # ATAC: (n_cells, n_lsi_atac, n_lsi_atac)
- P_atac = _local_tangent_projector_batched(embed_atac_batch, neigh_embed_atac_batch, manifold_dim_atac)
- I_atac = torch.eye(P_atac.shape[-1], device=device).unsqueeze(0).expand(z_hat.shape[0], -1, -1)
- # base decode
- s_base = model.vaes[0].dec_su(z_hat)[0][0] * model.norm_mat_s # (n_cells, rna_dim)
- a_base = model.vaes[1].dec_ald(z_hat)[0] * model.norm_mat_a # (n_cells, atac_dim)
- # q(d | z_hat)
- qd = model.vaes[0].enc_dyn(z_hat)
- # (high-dim velocity — for mean and total U_dyn)
- vel_rna_full_list = []
- vel_atac_full_list = []
- # low-dim projected velocity (for on/off decomposition)
- vel_rna_pca_list = []
- vel_atac_lsi_list = []
- off_ratio_rna_list = []
- off_ratio_atac_list = []
- for _ in range(n_samples):
- d_s = qd.rsample() # (n_cells, z_dim)
- # velocity in high-dim space
- z_dt = z_hat + model.d_coeff * d_s
- v_rna = model.vaes[0].dec_su(z_dt)[0][0] * model.norm_mat_s - s_base # (n_cells, rna_dim)
- v_atac = model.vaes[1].dec_ald(z_dt)[0] * model.norm_mat_a - a_base # (n_cells, atac_dim)
- vel_rna_full_list.append(v_rna)
- vel_atac_full_list.append(v_atac)
- # velocity を低次元に射影
- v_rna_pca = v_rna @ W_rna # (n_cells, n_pca_rna)
- v_atac_lsi = v_atac @ W_atac # (n_cells, n_lsi_atac)
- vel_rna_pca_list.append(v_rna_pca)
- vel_atac_lsi_list.append(v_atac_lsi)
- # off-manifold energy ratio (低次元空間で計算)
- v_rna_perp_pca = ((I_rna - P_rna) @ v_rna_pca.unsqueeze(-1)).squeeze(-1)
- v_atac_perp_lsi = ((I_atac - P_atac) @ v_atac_lsi.unsqueeze(-1)).squeeze(-1)
- norm_rna_sq = (v_rna_pca ** 2).sum(-1).clamp(min=1e-8)
- norm_atac_sq = (v_atac_lsi ** 2).sum(-1).clamp(min=1e-8)
- off_ratio_rna_list.append( (v_rna_perp_pca ** 2).sum(-1) / norm_rna_sq )
- off_ratio_atac_list.append((v_atac_perp_lsi ** 2).sum(-1) / norm_atac_sq )
- # (S, n_cells, dim) に集約
- rna_full_stack = torch.stack(vel_rna_full_list, dim=0) # (S, n_cells, rna_dim)
- atac_full_stack = torch.stack(vel_atac_full_list, dim=0)
- rna_pca_stack = torch.stack(vel_rna_pca_list, dim=0) # (S, n_cells, n_pca_rna)
- atac_lsi_stack = torch.stack(vel_atac_lsi_list, dim=0)
- # on-manifold / off-manifold 成分 (低次元空間)
- def _proj(stack, P, I):
- # stack: (S, n_cells, d_emb), P: (n_cells, d_emb, d_emb)
- v_col = stack.unsqueeze(-1) # (S, n_cells, d_emb, 1)
- par = (P.unsqueeze(0) @ v_col).squeeze(-1) # (S, n_cells, d_emb)
- perp = ((I - P).unsqueeze(0) @ v_col).squeeze(-1)
- return par, perp
- rna_par_stack, rna_perp_stack = _proj(rna_pca_stack, P_rna, I_rna)
- atac_par_stack, atac_perp_stack = _proj(atac_lsi_stack, P_atac, I_atac)
- def _var(stack):
- return _cosine_sim_variance(stack).cpu().numpy()
- return {
- "z_hat": z_hat.cpu().numpy(),
- "vel_mean_rna": rna_full_stack.mean(0).cpu().numpy(),
- "vel_mean_atac": atac_full_stack.mean(0).cpu().numpy(),
- # total (high-dim velocity)
- "u_dyn_rna": _var(rna_full_stack),
- "u_dyn_atac": _var(atac_full_stack),
- # on-manifold (low-dim projected)
- "u_dyn_par_rna": _var(rna_par_stack),
- "u_dyn_par_atac": _var(atac_par_stack),
- # off-manifold (low-dim projected)
- "u_dyn_perp_rna": _var(rna_perp_stack),
- "u_dyn_perp_atac": _var(atac_perp_stack),
- # off-manifold エネルギー比
- "off_ratio_rna": torch.stack(off_ratio_rna_list, dim=0).mean(0).cpu().numpy(),
- "off_ratio_atac": torch.stack(off_ratio_atac_list, dim=0).mean(0).cpu().numpy(),
- }
- # ──────────────────────────────────────────────────────────────
- # main function
- # ──────────────────────────────────────────────────────────────
- def compute_off_manifold_uncertainty_mod(
- model,
- dataloader: DataLoader,
- n_samples: int = 200,
- n_neighbors: int = 50,
- n_pca_rna: int = 50,
- n_lsi_atac: int = 50,
- manifold_dim_rna: int = 10,
- manifold_dim_atac: int = 10,
- device: str = "cuda",
- ) -> dict:
- """
- Compute modality-specific on/off-manifold uncertainty decomposition for all cells.
- Phase 1: Compute z_hat and denoised modality representations (x_RNA, x_ATAC).
- Phase 2: Compute low-dimension embeddings for each modality (RNA: PCA, ATAC: TruncatedSVD)
- and construct kNN graphs for each modality.
- Phase 3: Sample d for each batch and compute velocity, then estimate local tangent spaces in the low-dimensional modality space and decompose the uncertainty.
- Parameters
- ----------
- model : trained model (DREG_DYN)
- dataloader : DataLoader
- n_samples : number of sampling iterations S
- n_neighbors : number of kNN neighbors k
- n_pca_rna : dimension of RNA low-dimensional embedding
- n_lsi_atac : dimension of ATAC low-dimensional embedding
- manifold_dim_rna : dimension of RNA local tangent space r
- manifold_dim_atac: dimension of ATAC local tangent space r
- device : Device to run the computation on (e.g., "cuda" or "cpu")
- Returns
- -------
- dict:
- z_hat (N, z_dim)
- vel_mean_rna (N, rna_dim)
- vel_mean_atac (N, atac_dim)
- u_dyn_rna (N,) total dynamics fluctuation uncertainty (RNA)
- u_dyn_atac (N,) total dynamics fluctuation uncertainty (ATAC)
- u_dyn_par_rna (N,) on-manifold dynamics fluctuation (RNA)
- u_dyn_par_atac (N,) on-manifold dynamics fluctuation (ATAC)
- u_dyn_perp_rna (N,) off-manifold instability (RNA)
- u_dyn_perp_atac (N,) off-manifold instability (ATAC)
- off_ratio_rna (N,) off-manifold energy ratio R_n^RNA
- off_ratio_atac (N,) off-manifold energy ratio R_n^ATAC
- """
- model.to(device)
- model.eval()
- # ── Phase 1 ─────────────────────────────
- print("[Phase 1] Collecting z_hat, x_RNA, x_ATAC for all cells...")
- all_z_hat, all_x_rna, all_x_atac = _collect_representations(model, dataloader, device)
- N = len(all_z_hat)
- print(f" N={N}, rna_dim={all_x_rna.shape[1]}, atac_dim={all_x_atac.shape[1]}")
- # ── Phase 2────────────────────────
- print(f"[Phase 2] Building modality-specific embeddings and kNN graphs "
- f"(RNA: PCA-{n_pca_rna}, ATAC: SVD-{n_lsi_atac}, k={n_neighbors})...")
- (embed_rna, W_rna,
- nn_idx_rna,
- embed_atac, W_atac,
- nn_idx_atac) = _build_modality_embedding_and_knn(
- all_x_rna, all_x_atac,
- n_pca_rna=n_pca_rna,
- n_lsi_atac=n_lsi_atac,
- n_neighbors=n_neighbors,
- )
- print(f" embed_rna={embed_rna.shape}, embed_atac={embed_atac.shape}")
- # テンソル化
- embed_rna_t = torch.tensor(embed_rna, dtype=torch.float32, device=device) # (N, n_pca_rna)
- embed_atac_t = torch.tensor(embed_atac, dtype=torch.float32, device=device) # (N, n_lsi_atac)
- W_rna_t = torch.tensor(W_rna, dtype=torch.float32, device=device) # (rna_dim, n_pca_rna)
- W_atac_t = torch.tensor(W_atac, dtype=torch.float32, device=device) # (atac_dim, n_lsi_atac)
- nn_rna_t = torch.tensor(nn_idx_rna, dtype=torch.long, device=device) # (N, k)
- nn_atac_t = torch.tensor(nn_idx_atac, dtype=torch.long, device=device) # (N, k)
- # 近傍埋め込み配列
- neigh_embed_rna = embed_rna_t[nn_rna_t] # (N, k, n_pca_rna)
- neigh_embed_atac = embed_atac_t[nn_atac_t] # (N, k, n_lsi_atac)
- # ── Phase 3───────────
- print(f"[Phase 3] Computing modality-specific on/off-manifold decomposition "
- f"(n_samples={n_samples}, manifold_dim_rna={manifold_dim_rna}, "
- f"manifold_dim_atac={manifold_dim_atac})...")
- accum = defaultdict(list)
- cell_offset = 0
- for batch in dataloader:
- n_cells = batch[0].shape[0]
- sl = slice(cell_offset, cell_offset + n_cells)
- out = _batch_off_manifold_mod(
- model, batch,
- embed_rna_batch = embed_rna_t[sl],
- neigh_embed_rna_batch = neigh_embed_rna[sl],
- W_rna = W_rna_t,
- manifold_dim_rna = manifold_dim_rna,
- embed_atac_batch = embed_atac_t[sl],
- neigh_embed_atac_batch = neigh_embed_atac[sl],
- W_atac = W_atac_t,
- manifold_dim_atac = manifold_dim_atac,
- n_samples = n_samples,
- device = device,
- )
- for key, val in out.items():
- accum[key].append(val)
- cell_offset += n_cells
- return {key: np.concatenate(vals, axis=0) for key, vals in accum.items()}
- # ──────────────────────────────────────────────────────────────
- # save
- # ──────────────────────────────────────────────────────────────
- def save_off_manifold_uncertainty_mod(
- dm,
- results: dict,
- save_dir: str,
- filename_rna: str = "adata_rna_offmanifold_mod.loom",
- filename_atac: str = "adata_atac_offmanifold_mod.loom",
- ) -> None:
- """
- save the results of modality-specific off-manifold decomposition
- to AnnData and save as .loom files.
- RNA AnnData:
- layers["vel_mean"] : RNA velocity 平均 (N, rna_dim)
- obsm["z_hat"] : posterior mean z (N, z_dim)
- obs["u_dyn"] : total dynamics fluctuation uncertainty
- obs["u_dyn_par"] : on-manifold dynamics fluctuation
- obs["u_dyn_perp"] : off-manifold instability
- obs["off_ratio"] : off-manifold energy ratio R_n^RNA
- ATAC AnnData:
- layers["vel_mean"] : ATAC velocity 平均 (N, atac_dim)
- obs["u_dyn"] : total dynamics fluctuation uncertainty
- obs["u_dyn_par"] : on-manifold dynamics fluctuation
- obs["u_dyn_perp"] : off-manifold instability
- obs["off_ratio"] : off-manifold energy ratio R_n^ATAC
- """
- os.makedirs(save_dir, exist_ok=True)
- dm.adata_r.layers["vel_mean"] = results["vel_mean_rna"]
- dm.adata_r.obsm["z_hat"] = results["z_hat"]
- dm.adata_r.obs["u_dyn"] = results["u_dyn_rna"]
- dm.adata_r.obs["u_dyn_par"] = results["u_dyn_par_rna"]
- dm.adata_r.obs["u_dyn_perp"] = results["u_dyn_perp_rna"]
- dm.adata_r.obs["off_ratio"] = results["off_ratio_rna"]
- dm.adata_a.layers["vel_mean"] = results["vel_mean_atac"]
- dm.adata_a.obs["u_dyn"] = results["u_dyn_atac"]
- dm.adata_a.obs["u_dyn_par"] = results["u_dyn_par_atac"]
- dm.adata_a.obs["u_dyn_perp"] = results["u_dyn_perp_atac"]
- dm.adata_a.obs["off_ratio"] = results["off_ratio_atac"]
- rna_path = os.path.join(save_dir, filename_rna)
- atac_path = os.path.join(save_dir, filename_atac)
- dm.adata_r.write_loom(rna_path, write_obsm_varm=True)
- dm.adata_a.write_loom(atac_path, write_obsm_varm=True)
- print(f"Saved RNA AnnData → {rna_path}")
- print(f"Saved ATAC AnnData → {atac_path}")
velocity_off_manifold_mod.py at commit 3dbe5d1, no license · at the source
Overview
- Japanese Red Cross Aichi Medical Center, Nagoya Daiichi Hospital, Nagoya, Japan
- Laboratory of Computational Life Science, National Cancer Center Research Institute, Tokyo, Japan
- Department of Computational and Systems Biology, Division of Biological Data Science, Medical Research Laboratory, Institute for Integrated Research, Institute of Science Tokyo, Tokyo, Japan
Abstract
Motivation: Single-cell multiomics reveals regulatory relationships across biological layers but captures only static snapshots, obscuring the dynamics coordinated across modalities. RNA velocity predicts transcriptome dynamics, yet cannot be extended to other layers such as the regulome, leaving chromatin accessibility dynamics unresolved.
Results: We developed mmVelo (multimodal velocity of single cells), a deep generative model that infers cell state dynamics from spliced and unspliced mRNA and projects them onto other modalities, yielding chromatin velocity at single-peak resolution. In developing mouse brain, mmVelo accurately recovered accessibility dynamics; in mouse skin, it identified transcription factors regulating accessibility. Decomposing posterior velocity variability into manifold-aligned and off-manifold components revealed modality-specific uncertainty structure, with chromatin fluctuation elevated near lineage branching. Using multiomics data as a bridge, mmVelo inferred the dynamics of missing modalities from single-modal human brain data.
Availability and implementation: Source code is freely available under the MIT license at https://
Reproduced under the paper's license (CC BY), from the paper cited above.
Repositories
Its files are read in the Code ↔ Paper reader above, with 21 matches between paragraphs and lines of code.
nomuhyooon/mmVelo
3dbe5d18cad3e2f020df8e8b74f3068f669b3b7f, 10 June 2026Availability: 1 check, the latest on 26 September 2026: the link answers
- 26 September 2026: the link answers
85 files
- mmVelo_tutorial/
src/ , Python, 226 linesdataset.py - mmVelo_tutorial/
src/ , Python, 115 linesfuncs.py - mmVelo_tutorial/
src/ , Python, 556 linesmodels.py - mmVelo_tutorial/
src/ , Python, 201 linesmodules.py - mmVelo_tutorial/
src/ , Python, 1,722 lines, 1 matchstreamlineplot.py - mmVelo_tutorial/
src/ , Python, 265 linestrain.py - mmVelo_tutorial/
src/ , Python, 938 linesutils.py - mmVelo_tutorial/
tutorial.ipynb , Jupyter, 110 lines - mmVelo_tutorial_v2/
src/ , Python, 252 linesfig_E18_mose_brain/ 000_performance_evaluati on.py - mmVelo_tutorial_v2/
src/ , Python, 237 linesfig_E18_mose_brain/ 00_get_inferred_data.py - mmVelo_tutorial_v2/
src/ , Python, 122 linesfig_E18_mose_brain/ 01_clustering.py - mmVelo_tutorial_v2/
src/ , Python, 236 linesfig_E18_mose_brain/ 02_pseudotime.py - mmVelo_tutorial_v2/
src/ , Python, 50 linesfig_E18_mose_brain/ 03_peak_gene_linkage.py - mmVelo_tutorial_v2/
src/ , Python, 274 linesfig_E18_mose_brain/ 04_plot_expr_umap.py - mmVelo_tutorial_v2/
src/ , Python, 391 linesfig_E18_mose_brain/ 04_plot_expr_umap_for_fi g.py - mmVelo_tutorial_v2/
src/ , Python, 175 linesfig_E18_mose_brain/ 05_peak_annotation.py - mmVelo_tutorial_v2/
src/ , Python, 365 linesfig_E18_mose_brain/ 06_time_lag.py - mmVelo_tutorial_v2/
src/ , Python, 242 linesfig_E18_mose_brain/ 06_time_lag_clustering.p y - mmVelo_tutorial_v2/
src/ , Python, 201 linesfig_E18_mose_brain/ 06_time_lag_clustering_p reliminary.py - mmVelo_tutorial_v2/
src/ , Python, 294 linesfig_E18_mose_brain/ 06_time_lag_clustering_s ep_concat.py - mmVelo_tutorial_v2/
src/ , Python, 177 linesfig_E18_mose_brain/ 06_time_lag_confidence.p y - mmVelo_tutorial_v2/
src/ , Python, 366 linesfig_E18_mose_brain/ 06_time_lag_ipc.py - mmVelo_tutorial_v2/
src/ , Python, 594 linesfig_E18_mose_brain/ 06_time_lag_leiden.py - mmVelo_tutorial_v2/
src/ , Python, 755 linesfig_E18_mose_brain/ 06_time_lag_naive_heatma p.py - mmVelo_tutorial_v2/
src/ , Python, 206 linesfig_E18_mose_brain/ 07_leiden_promoter.py - mmVelo_tutorial_v2/
src/ , Python, 445 linesfig_E18_mose_brain/ 07_motif_velocity.py - mmVelo_tutorial_v2/
src/ , Python, 440 lines, 1 matchfig_E18_mose_brain/ 08_benchmarking_latent.p y - mmVelo_tutorial_v2/
src/ , Python, 361 linesfig_E18_mose_brain/ 09_dadt_clustering_heatm ap.py - mmVelo_tutorial_v2/
src/ , Python, 368 linesfig_E18_mose_brain/ 09_dadt_clustering_heatm ap_for_fig.py - mmVelo_tutorial_v2/
src/ , Python, 92 linesfig_E18_mose_brain/ 10_streamline_plot.py - mmVelo_tutorial_v2/
src/ , Python, 528 linesfig_E18_mose_brain/ 11_neurod2_modality.py - mmVelo_tutorial_v2/
src/ , Python, 42 linesfig_E18_mose_brain/ 12_dadt_clustering_for_g reat.py - mmVelo_tutorial_v2/
src/ , Python, 673 linesfig_E18_mose_brain/ 20_mmvelo_ablation_analy sis.py - mmVelo_tutorial_v2/
src/ , Python, 214 linesfig_E18_mose_brain/ 21_clusterwise_mean_velo city.py - mmVelo_tutorial_v2/
src/ , Python, 385 linesfig_human_brain/ 000_performance_evaluati on.py - mmVelo_tutorial_v2/
src/ , Python, 299 linesfig_human_brain/ 00_get_inferred_adata.py - mmVelo_tutorial_v2/
src/ , Python, 202 lines, 1 matchfig_human_brain/ 01_clustering_pseudotime .py - mmVelo_tutorial_v2/
src/ , Python, 200 linesfig_human_brain/ 02_missingmodality_strea mline.py - mmVelo_tutorial_v2/
src/ , Python, 520 linesfig_human_brain/ 03_heatmap.py - mmVelo_tutorial_v2/
src/ , Python, 224 linesfig_human_brain/ 04_inter_patient_analysi s.py - mmVelo_tutorial_v2/
src/ , Python, 356 linesfig_mouse_hair_follicle/ 000_performace_evaluatio n.py - mmVelo_tutorial_v2/
src/ , Python, 346 linesfig_mouse_hair_follicle/ 00_get_inferred_data.py - mmVelo_tutorial_v2/
src/ , Python, 96 linesfig_mouse_hair_follicle/ 01_annotate_peudotime.py - mmVelo_tutorial_v2/
src/ , Python, 103 linesfig_mouse_hair_follicle/ 01_subclusterring_tacs.p y - mmVelo_tutorial_v2/
src/ , Python, 699 lines, 1 matchfig_mouse_hair_follicle/ 02_clustering_heatmap.py - mmVelo_tutorial_v2/
src/ , Python, 622 lines, 2 matchesfig_mouse_hair_follicle/ 03_clustering_motif.py - mmVelo_tutorial_v2/
src/ , Python, 381 linesfig_mouse_hair_follicle/ 03_clustering_motif_chro mvar.py - mmVelo_tutorial_v2/
src/ , Python, 574 lines, 2 matchesfig_mouse_hair_follicle/ 03_clustering_motif_vjp. py - mmVelo_tutorial_v2/
src/ , Python, 95 linesfig_mouse_hair_follicle/ 04_clustering_motif_svd. py - mmVelo_tutorial_v2/
src/ , Python, 508 linesfig_mouse_hair_follicle/ 05_GRN_inference.py - mmVelo_tutorial_v2/
src/ , Python, 399 lines, 1 matchfig_mouse_hair_follicle/ 05_GRN_inference_1st.py - mmVelo_tutorial_v2/
src/ , Python, 517 linesfig_mouse_hair_follicle/ 05_GRN_inference_count.p y - mmVelo_tutorial_v2/
src/ , Python, 601 lines, 1 matchfig_mouse_hair_follicle/ 05_GRN_inference_pycisto pic_res.py - mmVelo_tutorial_v2/
src/ , Python, 592 linesfig_mouse_hair_follicle/ 05_GRN_inference_sep.py - mmVelo_tutorial_v2/
src/ , Python, 74 linesfig_mouse_hair_follicle/ 05_post_GRN_Lef1.py - mmVelo_tutorial_v2/
src/ , Python, 88 linesfig_mouse_hair_follicle/ 05_post_GRN_crate_filter ed_bed.py - mmVelo_tutorial_v2/
src/ , Python, 72 linesfig_mouse_hair_follicle/ 05_post_GRN_filter_peaks _for_plot.py - mmVelo_tutorial_v2/
src/ , Python, 231 linesfig_mouse_hair_follicle/ 06_velocity_off_manifold .py - mmVelo_tutorial_v2/
src/ , Python, 250 linesfig_mouse_hair_follicle/ 06_velocity_off_manifold _mod.py - mmVelo_tutorial_v2/
src/ , Python, 236 linesfig_mouse_hair_follicle/ 06_velocity_uncertainty. py - mmVelo_tutorial_v2/
src/ , Python, 249 linesfig_mouse_hair_follicle/ 07_uncertainty_vs_pseudo time.py - mmVelo_tutorial_v2/
src/ , Python, 681 linesfig_mouse_hair_follicle/ 20_mmvelo_ablation_analy sis.py - mmVelo_tutorial_v2/
src/ , Python, 1 linemmvelo_multi/ __init__.py - mmVelo_tutorial_v2/
src/ , Python, 115 linesmmvelo_multi/ funcs.py - mmVelo_tutorial_v2/
src/ , Python, 574 linesmmvelo_multi/ models.py - mmVelo_tutorial_v2/
src/ , Python, 201 linesmmvelo_multi/ modules.py - mmVelo_tutorial_v2/
src/ , Python, 1,724 lines, 1 matchmmvelo_multi/ streamlineplot.py - mmVelo_tutorial_v2/
src/ , Python, 939 linesmmvelo_multi/ utils.py - mmVelo_tutorial_v2/
src/ , Python, 339 lines, 1 matchmmvelo_multi/ velocity_off_manifold.py - mmVelo_tutorial_v2/
src/ , Python, 490 lines, 2 matchesmmvelo_multi/ velocity_off_manifold_mo d.py - mmVelo_tutorial_v2/
src/ , Python, 476 linesmmvelo_multi/ velocity_uncertainty.py - mmVelo_tutorial_v2/
src/ , Python, 1 linemmvelo_multi_cond/ __init__.py - mmVelo_tutorial_v2/
src/ , Python, 364 linesmmvelo_multi_cond/ dataset_all_modality.py - mmVelo_tutorial_v2/
src/ , Python, 611 linesmmvelo_multi_cond/ models_missingmodality_a ll_adv_modadv.py - mmVelo_tutorial_v2/
src/ , Python, 248 linesmmvelo_multi_cond/ modules.py - mmVelo_tutorial_v2/
src/ , Python, 1,724 linesmmvelo_multi_cond/ streamlineplot.py - mmVelo_tutorial_v2/
src/ , Python, 792 linesmmvelo_multi_cond/ utils.py - mmVelo_tutorial_v2/
src/ , Python, 1 linemmvelo_tutorial/ __init__.py - mmVelo_tutorial_v2/
src/ , Python, 164 linesmmvelo_tutorial/ dataset_mouse_brain.py - mmVelo_tutorial_v2/
src/ , Python, 468 lines, 2 matchesmmvelo_tutorial/ train_human_brain.py - mmVelo_tutorial_v2/
src/ , Python, 349 lines, 2 matchesmmvelo_tutorial/ train_mouse_brain.py - mmVelo_tutorial_v2/
src/ , Python, 267 lines, 1 matchmmvelo_tutorial/ viz_human_brain.py - mmVelo_tutorial_v2/
tutorial_1_mouse_brain.i , Jupyter, 350 linespynb - mmVelo_tutorial_v2/
tutorial_2_human_brain_m , Jupyter, 396 lines, 2 matchesissing_modality.ipynb - README.md, Text, 319 lines
Zenodo 20103609
Availability: 1 check, the latest on 26 September 2026: the link answers (HTTP 200)
- 26 September 2026: the link answers (HTTP 200)
85 files
- mmVelo_tutorial/
src/ , Python, 226 linesdataset.py - mmVelo_tutorial/
src/ , Python, 115 linesfuncs.py - mmVelo_tutorial/
src/ , Python, 556 linesmodels.py - mmVelo_tutorial/
src/ , Python, 201 linesmodules.py - mmVelo_tutorial/
src/ , Python, 1,722 linesstreamlineplot.py - mmVelo_tutorial/
src/ , Python, 265 linestrain.py - mmVelo_tutorial/
src/ , Python, 938 linesutils.py - mmVelo_tutorial/
tutorial.ipynb , Jupyter, 110 lines - mmVelo_tutorial_v2/
src/ , Python, 252 linesfig_E18_mose_brain/ 000_performance_evaluati on.py - mmVelo_tutorial_v2/
src/ , Python, 237 linesfig_E18_mose_brain/ 00_get_inferred_data.py - mmVelo_tutorial_v2/
src/ , Python, 122 linesfig_E18_mose_brain/ 01_clustering.py - mmVelo_tutorial_v2/
src/ , Python, 236 linesfig_E18_mose_brain/ 02_pseudotime.py - mmVelo_tutorial_v2/
src/ , Python, 50 linesfig_E18_mose_brain/ 03_peak_gene_linkage.py - mmVelo_tutorial_v2/
src/ , Python, 274 linesfig_E18_mose_brain/ 04_plot_expr_umap.py - mmVelo_tutorial_v2/
src/ , Python, 391 linesfig_E18_mose_brain/ 04_plot_expr_umap_for_fi g.py - mmVelo_tutorial_v2/
src/ , Python, 175 linesfig_E18_mose_brain/ 05_peak_annotation.py - mmVelo_tutorial_v2/
src/ , Python, 365 linesfig_E18_mose_brain/ 06_time_lag.py - mmVelo_tutorial_v2/
src/ , Python, 242 linesfig_E18_mose_brain/ 06_time_lag_clustering.p y - mmVelo_tutorial_v2/
src/ , Python, 201 linesfig_E18_mose_brain/ 06_time_lag_clustering_p reliminary.py - mmVelo_tutorial_v2/
src/ , Python, 294 linesfig_E18_mose_brain/ 06_time_lag_clustering_s ep_concat.py - mmVelo_tutorial_v2/
src/ , Python, 177 linesfig_E18_mose_brain/ 06_time_lag_confidence.p y - mmVelo_tutorial_v2/
src/ , Python, 366 linesfig_E18_mose_brain/ 06_time_lag_ipc.py - mmVelo_tutorial_v2/
src/ , Python, 594 linesfig_E18_mose_brain/ 06_time_lag_leiden.py - mmVelo_tutorial_v2/
src/ , Python, 755 linesfig_E18_mose_brain/ 06_time_lag_naive_heatma p.py - mmVelo_tutorial_v2/
src/ , Python, 206 linesfig_E18_mose_brain/ 07_leiden_promoter.py - mmVelo_tutorial_v2/
src/ , Python, 445 linesfig_E18_mose_brain/ 07_motif_velocity.py - mmVelo_tutorial_v2/
src/ , Python, 440 linesfig_E18_mose_brain/ 08_benchmarking_latent.p y - mmVelo_tutorial_v2/
src/ , Python, 361 linesfig_E18_mose_brain/ 09_dadt_clustering_heatm ap.py - mmVelo_tutorial_v2/
src/ , Python, 368 linesfig_E18_mose_brain/ 09_dadt_clustering_heatm ap_for_fig.py - mmVelo_tutorial_v2/
src/ , Python, 92 linesfig_E18_mose_brain/ 10_streamline_plot.py - mmVelo_tutorial_v2/
src/ , Python, 528 linesfig_E18_mose_brain/ 11_neurod2_modality.py - mmVelo_tutorial_v2/
src/ , Python, 42 linesfig_E18_mose_brain/ 12_dadt_clustering_for_g reat.py - mmVelo_tutorial_v2/
src/ , Python, 673 linesfig_E18_mose_brain/ 20_mmvelo_ablation_analy sis.py - mmVelo_tutorial_v2/
src/ , Python, 214 linesfig_E18_mose_brain/ 21_clusterwise_mean_velo city.py - mmVelo_tutorial_v2/
src/ , Python, 385 linesfig_human_brain/ 000_performance_evaluati on.py - mmVelo_tutorial_v2/
src/ , Python, 299 linesfig_human_brain/ 00_get_inferred_adata.py - mmVelo_tutorial_v2/
src/ , Python, 202 linesfig_human_brain/ 01_clustering_pseudotime .py - mmVelo_tutorial_v2/
src/ , Python, 200 linesfig_human_brain/ 02_missingmodality_strea mline.py - mmVelo_tutorial_v2/
src/ , Python, 520 linesfig_human_brain/ 03_heatmap.py - mmVelo_tutorial_v2/
src/ , Python, 224 linesfig_human_brain/ 04_inter_patient_analysi s.py - mmVelo_tutorial_v2/
src/ , Python, 356 linesfig_mouse_hair_follicle/ 000_performace_evaluatio n.py - mmVelo_tutorial_v2/
src/ , Python, 346 linesfig_mouse_hair_follicle/ 00_get_inferred_data.py - mmVelo_tutorial_v2/
src/ , Python, 96 linesfig_mouse_hair_follicle/ 01_annotate_peudotime.py - mmVelo_tutorial_v2/
src/ , Python, 103 linesfig_mouse_hair_follicle/ 01_subclusterring_tacs.p y - mmVelo_tutorial_v2/
src/ , Python, 699 linesfig_mouse_hair_follicle/ 02_clustering_heatmap.py - mmVelo_tutorial_v2/
src/ , Python, 622 linesfig_mouse_hair_follicle/ 03_clustering_motif.py - mmVelo_tutorial_v2/
src/ , Python, 381 linesfig_mouse_hair_follicle/ 03_clustering_motif_chro mvar.py - mmVelo_tutorial_v2/
src/ , Python, 574 linesfig_mouse_hair_follicle/ 03_clustering_motif_vjp. py - mmVelo_tutorial_v2/
src/ , Python, 95 linesfig_mouse_hair_follicle/ 04_clustering_motif_svd. py - mmVelo_tutorial_v2/
src/ , Python, 508 linesfig_mouse_hair_follicle/ 05_GRN_inference.py - mmVelo_tutorial_v2/
src/ , Python, 399 linesfig_mouse_hair_follicle/ 05_GRN_inference_1st.py - mmVelo_tutorial_v2/
src/ , Python, 517 linesfig_mouse_hair_follicle/ 05_GRN_inference_count.p y - mmVelo_tutorial_v2/
src/ , Python, 601 linesfig_mouse_hair_follicle/ 05_GRN_inference_pycisto pic_res.py - mmVelo_tutorial_v2/
src/ , Python, 592 linesfig_mouse_hair_follicle/ 05_GRN_inference_sep.py - mmVelo_tutorial_v2/
src/ , Python, 74 linesfig_mouse_hair_follicle/ 05_post_GRN_Lef1.py - mmVelo_tutorial_v2/
src/ , Python, 88 linesfig_mouse_hair_follicle/ 05_post_GRN_crate_filter ed_bed.py - mmVelo_tutorial_v2/
src/ , Python, 72 linesfig_mouse_hair_follicle/ 05_post_GRN_filter_peaks _for_plot.py - mmVelo_tutorial_v2/
src/ , Python, 231 linesfig_mouse_hair_follicle/ 06_velocity_off_manifold .py - mmVelo_tutorial_v2/
src/ , Python, 250 linesfig_mouse_hair_follicle/ 06_velocity_off_manifold _mod.py - mmVelo_tutorial_v2/
src/ , Python, 236 linesfig_mouse_hair_follicle/ 06_velocity_uncertainty. py - mmVelo_tutorial_v2/
src/ , Python, 249 linesfig_mouse_hair_follicle/ 07_uncertainty_vs_pseudo time.py - mmVelo_tutorial_v2/
src/ , Python, 681 linesfig_mouse_hair_follicle/ 20_mmvelo_ablation_analy sis.py - mmVelo_tutorial_v2/
src/ , Python, 1 linemmvelo_multi/ __init__.py - mmVelo_tutorial_v2/
src/ , Python, 115 linesmmvelo_multi/ funcs.py - mmVelo_tutorial_v2/
src/ , Python, 574 linesmmvelo_multi/ models.py - mmVelo_tutorial_v2/
src/ , Python, 201 linesmmvelo_multi/ modules.py - mmVelo_tutorial_v2/
src/ , Python, 1,724 linesmmvelo_multi/ streamlineplot.py - mmVelo_tutorial_v2/
src/ , Python, 939 linesmmvelo_multi/ utils.py - mmVelo_tutorial_v2/
src/ , Python, 339 linesmmvelo_multi/ velocity_off_manifold.py - mmVelo_tutorial_v2/
src/ , Python, 490 linesmmvelo_multi/ velocity_off_manifold_mo d.py - mmVelo_tutorial_v2/
src/ , Python, 476 linesmmvelo_multi/ velocity_uncertainty.py - mmVelo_tutorial_v2/
src/ , Python, 1 linemmvelo_multi_cond/ __init__.py - mmVelo_tutorial_v2/
src/ , Python, 364 linesmmvelo_multi_cond/ dataset_all_modality.py - mmVelo_tutorial_v2/
src/ , Python, 611 linesmmvelo_multi_cond/ models_missingmodality_a ll_adv_modadv.py - mmVelo_tutorial_v2/
src/ , Python, 248 linesmmvelo_multi_cond/ modules.py - mmVelo_tutorial_v2/
src/ , Python, 1,724 linesmmvelo_multi_cond/ streamlineplot.py - mmVelo_tutorial_v2/
src/ , Python, 792 linesmmvelo_multi_cond/ utils.py - mmVelo_tutorial_v2/
src/ , Python, 1 linemmvelo_tutorial/ __init__.py - mmVelo_tutorial_v2/
src/ , Python, 164 linesmmvelo_tutorial/ dataset_mouse_brain.py - mmVelo_tutorial_v2/
src/ , Python, 468 linesmmvelo_tutorial/ train_human_brain.py - mmVelo_tutorial_v2/
src/ , Python, 349 linesmmvelo_tutorial/ train_mouse_brain.py - mmVelo_tutorial_v2/
src/ , Python, 267 linesmmvelo_tutorial/ viz_human_brain.py - mmVelo_tutorial_v2/
tutorial_1_mouse_brain.i , Jupyter, 350 linespynb - mmVelo_tutorial_v2/
tutorial_2_human_brain_m , Jupyter, 396 linesissing_modality.ipynb - README.md, Text, 318 lines
Availability and implementation
Source code is freely available under the MIT license at https://
Reproduced under the paper's license (CC BY), from the paper cited above.
Tracing map
Proposed by the machine: these links were found in the paper and verified at the source, without human review. The map will receive a Zenodo DOI once one of the paper's authors has validated it with their ORCID.
What the map holds:
- 2 repositories of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
- 168 scripts, each with its path and the digest of its content;
- 21 matches between paragraphs of the paper and lines of the code (method lexical-v1);
- neither the text of the paper nor the code itself.
Its JSON (tracing-map.json) is deposited on Zenodo with its DOI once the map is validated.
Data
Datasets cited
- geo:GSE140203, at NCBI GEO; found in “Data availability”
Data availability
The 10× embryonic mouse brain dataset was downloaded from the 10× website at https://
Reproduced under the paper's license (CC BY), from the paper cited above.
Versions
The history of this record: each version stored by the harvester or made by a correction of its authors or of the maintainers of its code, and what changed in its facts. The texts of the paper (its abstract, its availability statements) are not part of it; versions that changed only those are not listed.
Version 1, 27 September 2026: the first record
Recorded: type, language, journal, volume, issue, pages, dates, 7 authors, 9 MeSH terms, 5 funders, 98 references.
Cite
This paper
Nomura, S., Kojima, Y., Minoura, K., Hayashi, S., Abe, K., Hirose, H., & Shimamura, T. (2026). mmVelo: a deep generative model for estimating cell state-dependent dynamics across multiple modalities. Bioinformatics (Oxford, England), 42(9), btag652. https://
BibTeX
@article{nomura2026mmvel
author = {Nomura, Satoshi and Kojima, Yasuhiro and Minoura, Kodai and Hayashi, Shuto and Abe, Ko and Hirose, Haruka and Shimamura, Teppei},
title = {{mmVelo: a deep generative model for estimating cell state-dependent dynamics across multiple modalities}},
journal = {Bioinformatics (Oxford, England)},
year = {2026},
month = aug,
volume = {42},
number = {9},
pages = {btag652},
publisher = {Oxford University Press},
issn = {1367-4803},
doi = {10.1093/
url = {https://
pmid = {42675615},
pmcid = {PMC13585172}
}
RIS
TY - JOUR
AU - Nomura, Satoshi
AU - Kojima, Yasuhiro
AU - Minoura, Kodai
AU - Hayashi, Shuto
AU - Abe, Ko
AU - Hirose, Haruka
AU - Shimamura, Teppei
TI - mmVelo: a deep generative model for estimating cell state-dependent dynamics across multiple modalities
T2 - Bioinformatics (Oxford, England)
J2 - Bioinformatics
PY - 2026
DA - 2026/
VL - 42
IS - 9
SP - btag652
SN - 1367-4803
PB - Oxford University Press
DO - 10.1093/
UR - https://
LA - en
ER -
CSL-JSON
{
"id": "10.1093/
"type": "article-journal",
"title": "mmVelo: a deep generative model for estimating cell state-dependent dynamics across multiple modalities",
"container-title": "Bioinformatics (Oxford, England)",
"author": [
{
"family": "Nomura",
"given": "Satoshi"
},
{
"family": "Kojima",
"given": "Yasuhiro"
},
{
"family": "Minoura",
"given": "Kodai"
},
{
"family": "Hayashi",
"given": "Shuto"
},
{
"family": "Abe",
"given": "Ko"
},
{
"family": "Hirose",
"given": "Haruka"
},
{
"family": "Shimamura",
"given": "Teppei"
}
],
"container-title-short":
"volume": "42",
"issue": "9",
"page": "btag652",
"DOI": "10.1093/
"PMID": "42675615",
"PMCID": "PMC13585172",
"ISSN": "1367-4803",
"publisher": "Oxford University Press",
"URL": "https://
"language": "en",
"issued": {
"date-parts": [
[
2026,
8,
1
]
]
}
}
The tracing map gets a citation of its own once an author has validated it and it has a DOI.
Similar papers
The papers with a page that share the most with this one: the tools found in their code, their categories, datasets, cited references and authors, the rarest counting most.
- [1] doi:10.1016/j.crmeth.2026.101342 [code]
- Interpretable learning of temporal cellular dynamics from single-cell data.Journal: Cell reports methodsIn common: scVelo, UMAP, anndata, 9 other tools, genetics / omics, 9 references
- [2] doi:10.7554/elife.108950 [code]
- Comprehensive RNA velocity by modeling the cascade of gene regulation, transcription, and splicing from single-cell RNA sequencing data with TSvelo.Journal: eLifeIn common: scVelo, anndata, Scanpy, 6 other tools, genetics / omics, mouse, 10 references
- [3] doi:10.1038/s44320-026-00208-7 [code]
- Interpretable deep generative ensemble learning for single-cell omics with Hydra.Journal: Molecular systems biologyIn common: pysam, UMAP, anndata, 8 other tools, 9 references
- [4] doi:10.1038/s41467-026-74000-4 [code]
- ArchVelo: archetypal velocity modeling for single-cell multi-omic trajectories.Journal: Nature communicationsIn common: scVelo, anndata, Scanpy, 7 other tools, genetics / omics, mouse, 8 references
- [5] doi:10.1002/advs.77986 [code]
- DUET-seq: An Open-Source Droplet Platform for High-Fidelity Joint Chromatin and Transcriptome Profiling Reveals Temporal Regulatory Decoupling in Single Cells.Journal: Advanced science (Weinheim, Baden-Wurttemberg, Germany)In common: scVelo, Scanpy, seaborn, 4 other tools, genetics / omics, 10 references
- [6] doi:10.1016/j.xcrm.2026.102766 [code]
- A longitudinal single-cell and spatial multiomic atlas of pediatric high-grade glioma.Journal: Cell reports. MedicineIn common: scVelo, pysam, UMAP, 9 other tools, genetics / omics, 6 references
- [7] doi:10.1038/s41592-026-03057-2 [code]
- CREsted: modeling genomic and synthetic cell-type-specific enhancers across tissues and species.Journal: Nature methodsIn common: pysam, BEDTools, UMAP, 11 other tools, genetics / omics, mouse, 3 references
- [8] doi:10.1038/s41467-026-74694-6 [code]
- Semi-supervised Omics Factor Analysis (SOFA) disentangles known and latent sources of variation in multi-omic data.Journal: Nature communicationsIn common: Pyro, anndata, Scanpy, 8 other tools, genetics / omics, 5 references
- [9] doi:10.1186/s13059-026-04177-w [code]
- Genomic sequence evolution underlying human neocortical interareal diversification.Journal: Genome biologyIn common: pysam, BEDTools, UMAP, 9 other tools, genetics / omics, mouse, 3 references
- [10] doi:10.1038/s42003-026-10462-y [code]
- SpaDC enables sequence-based integrative analysis and regulatory inference of spatial chromatin accessibility data.Journal: Communications biologyIn common: pysam, BEDTools, anndata, 7 other tools, genetics / omics, mouse, 5 references
Contribute
The authors of this paper can claim it, correct its record and validate its tracing map, and the maintainers of its code (its owner, or a public member of its organization) correct what it says of their repository; anyone signed in can ask for its removal. Every request goes to OSCR's own machine, which answers it; your account page follows them.
Sign in with ORCID to claim this paper as one of its authors, correct its record or validate its tracing map: when the paper's metadata lists your ORCID iD, you are recognized at once. Maintainers of its code: sign in with GitHub, then claim the repository on your account page.
Claim this paper
Correct its record
Say what each link of this record is, remove the ones that are not the paper's, add the ones that are missing. The correction becomes a new version of the record, in its Versions section.
Validate its tracing map
You validate the map as this page shows it: 2 repositories of the authors' code, each at its verified commit and with its license, 168 scripts, and 21 matches between paragraphs and code (see the Code and Map sections). It then receives a DOI on Zenodo, with you (your ORCID iD) and OSCR as its creators; the code itself is not deposited.
The map's fingerprint: sha256:5589c0bf75fb55af…
Add the badge to its README
The badge links the code to this page. Copy one of these into the README of the paper's code: only you decide where it goes, and nothing is changed for you.
Markdown
[, paste the snippet at the top, then “Commit changes…” and, to review it first, “Create a new branch and start a pull request”. You open the pull request; OSCR asks for no permission.
Request its removal
To ask OSCR to remove this record, the copies of its authors' scripts or its tracing map, use the removal request page: signed in, you say who you are, what to remove and why, then review and confirm the request. Published rules decide every request (how).
Discussion, reproductions, activity
Discussion: questions and error reports about this paper and its code, from signed-in readers and its authors. It opens with sign-in.
Reproductions: reports from readers who ran the authors' code: what they reproduced, with which environment, commit and data. It opens with sign-in.
Activity: what happens around this paper: new versions of its record, its map's validation, discussions and reproductions. It opens with sign-in.
