NicheDeSig: niche-aware deconvolution and adaptive signature analysis for spatial transcriptomics.
The 1 match
- [1] § 2 Materials and methods › 2.4 Model optimization ↔ train.py, lines 98–139 · score 0.55 · AdamW, autoencoder, pretrain, decoder, batch, masked
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 · 494 lines · 18 KB · no license · 1 match
- from __future__ import annotations
- import argparse
- import logging
- from pathlib import Path
- import anndata as ad
- import numpy as np
- import pandas as pd
- import torch
- import torch.nn as nn
- from torch.utils.data import DataLoader, TensorDataset
- from NicheDeSig.data import build_gene_dict
- from NicheDeSig.model import (
- NicheDeSigModel,
- d_hinge_loss,
- g_hinge_loss,
- kl_divergence_loss,
- r1_penalty,
- sparse_constraint,
- )
- from NicheDeSig.utils import (
- adata_to_frame,
- ensure_directory,
- extract_pseudo_label,
- get_device,
- one_hot,
- safe_write_h5ad,
- sanitize_label,
- save_json,
- set_seed,
- )
- def parse_args() -> argparse.Namespace:
- parser = argparse.ArgumentParser(description="Train NicheDeSig models.")
- parser.add_argument("--preproc-dir", type=str, required=True)
- parser.add_argument("--outdir", type=str, required=True)
- parser.add_argument("--feature-space", type=str, default="gene", choices=["gene", "scvi"])
- parser.add_argument("--celltype-key", type=str, default="celltype_final")
- parser.add_argument("--niche-key", type=str, default="niche")
- parser.add_argument("--slice-key", type=str, default="slice")
- parser.add_argument("--train-layer", type=str, default="norm", help="Used only in gene space.")
- parser.add_argument("--device", type=str, default="auto")
- parser.add_argument("--seed", type=int, default=42)
- parser.add_argument("--batch-size", type=int, default=256)
- parser.add_argument("--hidden-dim", type=int, default=512)
- parser.add_argument("--latent-dim", type=int, default=128)
- parser.add_argument("--predictor-hidden", type=int, default=128)
- parser.add_argument("--ae-epochs", type=int, default=3)
- parser.add_argument("--global-epochs", type=int, default=5)
- parser.add_argument("--niche-epochs", type=int, default=3)
- parser.add_argument("--ae-lr", type=float, default=1e-4)
- parser.add_argument("--lr", type=float, default=1e-4)
- parser.add_argument("--d-lr-mult", type=float, default=0.5)
- parser.add_argument("--mask-ratio", type=float, default=0.5)
- parser.add_argument("--gp-gamma", type=float, default=5.0)
- parser.add_argument("--w-con", type=float, default=1.0)
- parser.add_argument("--w-scrna", type=float, default=0.8)
- parser.add_argument("--w-cell", type=float, default=0.6)
- parser.add_argument("--w-adv", type=float, default=0.15)
- parser.add_argument("--w-pred", type=float, default=40.0)
- parser.add_argument("--w-sparse", type=float, default=0.5)
- parser.add_argument("--w-kl", type=float, default=4.0)
- parser.add_argument("--w-mask", type=float, default=2.5)
- return parser.parse_args()
- def resolve_feature_paths(preproc_dir: Path, feature_space: str) -> tuple[Path, Path, Path, str]:
- if feature_space == "gene":
- return (
- preproc_dir / "Real_ST_prepared_with_norm.h5ad",
- preproc_dir / "scRNA_prepared_with_norm.h5ad",
- preproc_dir / "Sm_STdata_pseudo_by_niche.h5ad",
- ".h5ad",
- )
- return (
- preproc_dir / "st_scvi_latent.h5ad",
- preproc_dir / "sc_scvi_latent.h5ad",
- preproc_dir / "sm_scvi_latent.h5ad",
- "_scvi_latent.h5ad",
- )
- def make_loader(x_frame: pd.DataFrame, y_frame: pd.DataFrame | None, batch_size: int, shuffle: bool) -> DataLoader:
- x_tensor = torch.tensor(x_frame.values, dtype=torch.float32)
- if y_frame is None:
- y_tensor = torch.zeros((x_frame.shape[0], 1), dtype=torch.float32)
- else:
- y_tensor = torch.tensor(y_frame.values, dtype=torch.float32)
- return DataLoader(TensorDataset(x_tensor, y_tensor), batch_size=batch_size, shuffle=shuffle, drop_last=False)
- def pretrain_autoencoder(
- model: NicheDeSigModel,
- feature_frame: pd.DataFrame,
- device: torch.device,
- epochs: int,
- lr: float,
- mask_ratio: float,
- batch_size: int,
- ) -> pd.DataFrame:
- if epochs <= 0:
- return pd.DataFrame()
- optimizer = torch.optim.AdamW(
- list(model.encoder.parameters()) + list(model.decoder.parameters()),
- lr=float(lr),
- weight_decay=1e-5,
- )
- mse = nn.MSELoss()
- loader = DataLoader(
- TensorDataset(torch.tensor(feature_frame.values, dtype=torch.float32)),
- batch_size=batch_size,
- shuffle=True,
- drop_last=False,
- )
- history: list[dict[str, float]] = []
- model.train()
- for epoch in range(1, epochs + 1):
- epoch_loss = 0.0
- n_batches = 0
- for (batch_x,) in loader:
- batch_x = batch_x.to(device)
- optimizer.zero_grad(set_to_none=True)
- masked_x, _ = model.mask_input(batch_x, mask_ratio=mask_ratio)
- recon_x = model.decoder(model.encoder(masked_x))
- loss = mse(recon_x, batch_x)
- loss.backward()
- torch.nn.utils.clip_grad_norm_(list(model.encoder.parameters()) + list(model.decoder.parameters()), max_norm=5.0)
- optimizer.step()
- epoch_loss += float(loss.item())
- n_batches += 1
- history.append({"epoch": epoch, "ae_loss": epoch_loss / max(1, n_batches)})
- return pd.DataFrame(history)
- def train_stage(
- model: NicheDeSigModel,
- sc_frame: pd.DataFrame,
- sc_label: pd.DataFrame,
- sm_frame: pd.DataFrame,
- sm_label: pd.DataFrame,
- st_frame: pd.DataFrame,
- gene_dict: dict[str, np.ndarray],
- device: torch.device,
- epochs: int,
- lr: float,
- d_lr_mult: float,
- mask_ratio: float,
- gp_gamma: float,
- batch_size: int,
- w_con: float,
- w_scrna: float,
- w_cell: float,
- w_adv: float,
- w_pred: float,
- w_sparse: float,
- w_kl: float,
- w_mask: float,
- ) -> pd.DataFrame:
- if epochs <= 0:
- return pd.DataFrame()
- optimizer_g = torch.optim.AdamW(
- [
- {"params": model.encoder.parameters()},
- {"params": model.predictor.parameters()},
- {"params": model.decoder.parameters()},
- {"params": model.predictor_sc.parameters()},
- {"params": [model.signature], "lr": float(lr) * 0.5},
- ],
- lr=float(lr),
- weight_decay=1e-5,
- )
- optimizer_d = torch.optim.AdamW(model.discriminator.parameters(), lr=float(lr) * float(d_lr_mult), weight_decay=1e-5)
- scheduler_g = torch.optim.lr_scheduler.CosineAnnealingLR(optimizer_g, T_max=max(1, epochs), eta_min=1e-5)
- scheduler_d = torch.optim.lr_scheduler.CosineAnnealingLR(optimizer_d, T_max=max(1, epochs), eta_min=1e-5)
- mse = nn.MSELoss()
- l1_loss = nn.L1Loss()
- cross_entropy = nn.CrossEntropyLoss()
- sc_loader = make_loader(sc_frame, sc_label, batch_size=batch_size, shuffle=True)
- sm_loader = make_loader(sm_frame, sm_label, batch_size=batch_size, shuffle=True)
- st_loader = make_loader(st_frame, None, batch_size=batch_size, shuffle=True)
- history: list[dict[str, float]] = []
- for epoch in range(1, epochs + 1):
- model.train()
- model.update_signature_from_reference(gene_dict=gene_dict, device=device)
- running = {
- "total_g": 0.0,
- "d_loss": 0.0,
- "gp": 0.0,
- "scrna_rec": 0.0,
- "cell_cls": 0.0,
- "pred_l1": 0.0,
- "adv": 0.0,
- "con_src": 0.0,
- "con_tgt": 0.0,
- }
- steps = max(len(sc_loader), len(sm_loader), len(st_loader))
- sc_iter = iter(sc_loader)
- sm_iter = iter(sm_loader)
- st_iter = iter(st_loader)
- for _ in range(steps):
- try:
- sc_x, sc_y = next(sc_iter)
- except StopIteration:
- sc_iter = iter(sc_loader)
- sc_x, sc_y = next(sc_iter)
- try:
- sm_x, sm_y = next(sm_iter)
- except StopIteration:
- sm_iter = iter(sm_loader)
- sm_x, sm_y = next(sm_iter)
- try:
- st_x, _ = next(st_iter)
- except StopIteration:
- st_iter = iter(st_loader)
- st_x, _ = next(st_iter)
- sc_x = sc_x.to(device)
- sc_y = sc_y.to(device)
- sm_x = sm_x.to(device)
- sm_y = sm_y.to(device)
- st_x = st_x.to(device)
- optimizer_g.zero_grad(set_to_none=True)
- masked_sc, _ = model.mask_input(sc_x, mask_ratio=mask_ratio)
- sc_latent = model.encoder(masked_sc)
- sc_recon = model.decoder(sc_latent)
- sc_logits = model.predictor_sc(model.encoder(sc_x))
- scrna_rec = mse(sc_recon, sc_x)
- sc_target = torch.argmax(sc_y, dim=1)
- cell_cls = cross_entropy(sc_logits, sc_target)
- masked_sm, _ = model.mask_input(sm_x, mask_ratio=mask_ratio)
- masked_st, _ = model.mask_input(st_x, mask_ratio=mask_ratio)
- _, rec_sm, _, _ = model(masked_sm, signature=model.signature, use_ema=False)
- _, rec_st, _, _ = model(masked_st, signature=model.signature, use_ema=False)
- con_src = mse(rec_sm, sm_x)
- con_tgt = mse(rec_st, st_x)
- optimizer_d.zero_grad(set_to_none=True)
- real_input = st_x.detach().requires_grad_(True)
- d_real = model.discriminator(real_input)
- d_fake = model.discriminator(rec_st.detach())
- d_loss = d_hinge_loss(d_real, d_fake)
- gp = r1_penalty(d_real, real_input, gamma=float(gp_gamma))
- (d_loss + gp).backward()
- optimizer_d.step()
- d_fake_for_g = model.discriminator(rec_st)
- adv = g_hinge_loss(d_fake_for_g)
- _, _, pred_sm, mask_sm = model(sm_x, signature=model.signature.detach(), use_ema=False)
- mask_label = (sm_y > 0.01).float()
- mask_l1 = l1_loss(mask_sm, mask_label)
- pred_l1 = l1_loss(pred_sm, sm_y)
- sparse_l = sparse_constraint(pred_sm, sm_y)
- kl_l = kl_divergence_loss(pred_sm, sm_y)
- total_g = (
- float(w_con) * (con_src + con_tgt)
- + float(w_scrna) * scrna_rec
- + float(w_cell) * cell_cls
- + float(w_adv) * adv
- + float(w_pred) * pred_l1
- + float(w_sparse) * sparse_l
- + float(w_kl) * kl_l
- + float(w_mask) * mask_l1
- )
- total_g.backward()
- torch.nn.utils.clip_grad_norm_(
- list(model.encoder.parameters()) + list(model.decoder.parameters()),
- max_norm=5.0,
- )
- optimizer_g.step()
- model.predictor.update_ema()
- running["total_g"] += float(total_g.item())
- running["d_loss"] += float(d_loss.item())
- running["gp"] += float(gp.item())
- running["scrna_rec"] += float(scrna_rec.item())
- running["cell_cls"] += float(cell_cls.item())
- running["pred_l1"] += float(pred_l1.item())
- running["adv"] += float(adv.item())
- running["con_src"] += float(con_src.item())
- running["con_tgt"] += float(con_tgt.item())
- scheduler_g.step()
- scheduler_d.step()
- history.append({key: value / max(1, steps) for key, value in running.items()} | {"epoch": epoch})
- return pd.DataFrame(history)
- def load_training_bundle(
- preproc_dir: Path,
- feature_space: str,
- celltype_key: str,
- niche_key: str,
- train_layer: str,
- ) -> tuple[ad.AnnData, ad.AnnData, ad.AnnData, list[str], list[str], str]:
- st_path, sc_path, sm_all_path, niche_suffix = resolve_feature_paths(preproc_dir, feature_space)
- st_adata = ad.read_h5ad(st_path)
- sc_adata = ad.read_h5ad(sc_path)
- sm_all = ad.read_h5ad(sm_all_path)
- if feature_space == "gene":
- st_adata.X = st_adata.layers[train_layer].copy()
- sc_adata.X = sc_adata.layers[train_layer].copy()
- sm_all.X = sm_all.layers[train_layer].copy()
- celltypes = sorted(sc_adata.obs[celltype_key].astype(str).unique().tolist())
- niche_ids = sorted(st_adata.obs[niche_key].astype(str).unique().tolist())
- return st_adata, sc_adata, sm_all, celltypes, niche_ids, niche_suffix
- def main() -> None:
- args = parse_args()
- logging.basicConfig(level=logging.INFO, format="%(asctime)s | %(levelname)s | %(message)s")
- set_seed(args.seed)
- device = get_device(args.device)
- preproc_dir = Path(args.preproc_dir)
- outdir = ensure_directory(args.outdir)
- st_adata, sc_adata, sm_all, celltypes, niche_ids, niche_suffix = load_training_bundle(
- preproc_dir=preproc_dir,
- feature_space=args.feature_space,
- celltype_key=args.celltype_key,
- niche_key=args.niche_key,
- train_layer=args.train_layer,
- )
- features = st_adata.var_names.astype(str).tolist()
- sc_frame = adata_to_frame(sc_adata)
- sc_label = one_hot(sc_adata.obs[args.celltype_key].astype(str), categories=celltypes, index=sc_frame.index)
- st_frame = adata_to_frame(st_adata)
- sm_all_frame = adata_to_frame(sm_all)
- sm_all_label = extract_pseudo_label(sm_all, celltypes=celltypes)
- gene_dict = build_gene_dict(
- sc_adata=sc_adata,
- celltype_key=args.celltype_key,
- celltypes=celltypes,
- layer=args.train_layer if args.feature_space == "gene" else None,
- )
- def init_model() -> NicheDeSigModel:
- return NicheDeSigModel(
- celltypes=celltypes,
- features=features,
- hidden_dim=int(args.hidden_dim),
- latent_dim=int(args.latent_dim),
- predictor_hidden=int(args.predictor_hidden),
- batch_size=int(args.batch_size),
- learning_rate=float(args.lr),
- ).to(device)
- model = init_model()
- logging.info("Stage 1/3: autoencoder pretraining")
- ae_dir = ensure_directory(outdir / "stage1_ae_pretrain")
- ae_history = pretrain_autoencoder(
- model=model,
- feature_frame=pd.concat([sc_frame, st_frame], axis=0),
- device=device,
- epochs=int(args.ae_epochs),
- lr=float(args.ae_lr),
- mask_ratio=float(args.mask_ratio),
- batch_size=int(args.batch_size),
- )
- if not ae_history.empty:
- ae_history.to_csv(ae_dir / "training_history.csv", index=False)
- model.save_checkpoint(ae_dir / "model_last.pt", extra={"stage": "autoencoder_pretrain"})
- logging.info("Stage 2/3: global warmup")
- global_dir = ensure_directory(outdir / "global")
- global_history = train_stage(
- model=model,
- sc_frame=sc_frame,
- sc_label=sc_label,
- sm_frame=sm_all_frame,
- sm_label=sm_all_label,
- st_frame=st_frame,
- gene_dict=gene_dict,
- device=device,
- epochs=int(args.global_epochs),
- lr=float(args.lr),
- d_lr_mult=float(args.d_lr_mult),
- mask_ratio=float(args.mask_ratio),
- gp_gamma=float(args.gp_gamma),
- batch_size=int(args.batch_size),
- w_con=float(args.w_con),
- w_scrna=float(args.w_scrna),
- w_cell=float(args.w_cell),
- w_adv=float(args.w_adv),
- w_pred=float(args.w_pred),
- w_sparse=float(args.w_sparse),
- w_kl=float(args.w_kl),
- w_mask=float(args.w_mask),
- )
- if not global_history.empty:
- global_history.to_csv(global_dir / "training_history.csv", index=False)
- model.save_checkpoint(global_dir / "model_last.pt", extra={"stage": "global"})
- model.signature_dataframe().to_csv(global_dir / "signature_embeddings.csv")
- pred_all = pd.DataFrame(index=st_frame.index, columns=celltypes, dtype=np.float32)
- logging.info("Stage 3/3: niche fine-tuning")
- for niche_id in niche_ids:
- niche_name = sanitize_label(niche_id)
- niche_dir = ensure_directory(outdir / f"niche_{niche_name}")
- niche_st_mask = st_adata.obs[args.niche_key].astype(str).values == str(niche_id)
- st_niche = st_adata[niche_st_mask].copy()
- if st_niche.n_obs == 0:
- continue
- if args.feature_space == "gene":
- pseudo_path = preproc_dir / f"Sm_pseudo_niche_{niche_name}{niche_suffix}"
- else:
- pseudo_path = preproc_dir / f"Sm_pseudo_niche_{niche_name}{niche_suffix}"
- if not pseudo_path.exists():
- logging.warning("Pseudo input missing for niche %s: %s", niche_id, pseudo_path)
- continue
- sm_niche = ad.read_h5ad(pseudo_path)
- if args.feature_space == "gene" and args.train_layer in sm_niche.layers:
- sm_niche.X = sm_niche.layers[args.train_layer].copy()
- niche_model = init_model()
- niche_model.load_state_dict(model.state_dict(), strict=True)
- niche_history = train_stage(
- model=niche_model,
- sc_frame=sc_frame,
- sc_label=sc_label,
- sm_frame=adata_to_frame(sm_niche),
- sm_label=extract_pseudo_label(sm_niche, celltypes=celltypes),
- st_frame=adata_to_frame(st_niche),
- gene_dict=gene_dict,
- device=device,
- epochs=int(args.niche_epochs),
- lr=float(args.lr),
- d_lr_mult=float(args.d_lr_mult),
- mask_ratio=float(args.mask_ratio),
- gp_gamma=float(args.gp_gamma),
- batch_size=int(args.batch_size),
- w_con=float(args.w_con),
- w_scrna=float(args.w_scrna),
- w_cell=float(args.w_cell),
- w_adv=float(args.w_adv),
- w_pred=float(args.w_pred),
- w_sparse=float(args.w_sparse),
- w_kl=float(args.w_kl),
- w_mask=float(args.w_mask),
- )
- if not niche_history.empty:
- niche_history.to_csv(niche_dir / "training_history.csv", index=False)
- niche_model.save_checkpoint(niche_dir / "model_last.pt", extra={"stage": "niche", "niche": str(niche_id)})
- niche_model.signature_dataframe().to_csv(niche_dir / "signature_embeddings.csv")
- niche_pred = niche_model.predict_dataframe(adata_to_frame(st_niche), device=device, batch_size=int(args.batch_size))
- niche_pred.to_csv(niche_dir / "pred_spots.csv")
- pred_all.loc[niche_pred.index, :] = niche_pred.values
- pred_all = pred_all.fillna(0.0).astype(np.float32)
- pred_all.to_csv(outdir / "pred_all_spots.csv")
- st_export = st_adata.copy()
- st_export.obsm["deconv"] = pred_all.loc[st_export.obs_names.astype(str)].to_numpy(dtype=np.float32)
- st_export.uns["deconv_celltypes"] = celltypes
- safe_write_h5ad(st_export, outdir / "st_with_deconv.h5ad")
- save_json(
- {
- "feature_space": args.feature_space,
- "n_celltypes": len(celltypes),
- "n_niches": len(niche_ids),
- "device": str(device),
- },
- outdir / "training_summary.json",
- )
- logging.info("Training outputs written to %s", outdir)
- if __name__ == "__main__":
- main()
train.py at commit a975d78, no license · at the source
Overview
- School of Computer Science and Engineering, South China University of Technology, Guangzhou, Guangdong 510006, P.R. China
- School of Future Technology, South China University of Technology, Guangzhou, Guangdong 510006, P.R. China
- Department of Computer Science, City University of Hong Kong, Kowloon 999077, Hong Kong
- Department of Bioinformatics, Shantou University Medical College, Shantou, Guangdong 515063, P.R. China
- The Institute of Future Health, South China University of Technology, Guangzhou 511442, P.R. China
Abstract
Motivation: For spot-based spatial transcriptomics (ST), accurate cell-type deconvolution is essential for downstream analysis since each spot captures mixtures of multiple cell types. Meanwhile, spatial niches define distinct micro-environmental contexts, also salient for biological interpretation. However, existing deconvolution methods usually rely on fixed reference signatures or mapping single cells onto ST spots, without incorporating niche priors or modeling niche-dependent shifts. Consequently, existing methods remain focused on spot-level proportion estimation, with limited ability to support functional analysis of niche-associated molecular programs.
Results: We present NicheDeSig for niche-aware deconvolution. NicheDeSig models each cell type through adaptive signatures, enabling spot deconvolution under context-dependent signatures and supporting niche-aware analysis of cell-state variation across spatial micro-environments. Our method achieves strong deconvolution performance across the simulated benchmark datasets and improves spatial fidelity in the simulated colon dataset. The learned signatures recover laminar and white-matter-associated programs in the human dorsolateral prefrontal cortex (DLPFC), domain-stratified tumor microenvironment patterns in breast cancer (BRCA), and region-associated signatures in pancreatic ductal adenocarcinoma sample A (PDAC-A) and colorectal liver metastasis analyses.
Availability and implementation: Source code and the archived code snapshot are available 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 1 match between paragraphs and lines of code.
Zenodo 20604815
Availability: 1 check, the latest on 26 September 2026: the link answers (HTTP 200)
- 26 September 2026: the link answers (HTTP 200)
Davidcoach/NicheDeSig
a975d788d91455f6cf72917c9f560e1acfdc77c5, 13 June 2026Availability: 1 check, the latest on 26 September 2026: the link answers
- 26 September 2026: the link answers
10 files
- __init__.py, Python, 5 lines
- data.py, Python, 404 lines
- infer.py, Python, 111 lines
- model.py, Python, 345 lines
- prepare_data.py, Python, 174 lines
- run_dlpfc_151673.sh, Shell, 96 lines
- train.py, Python, 494 lines, 1 match
- utils.py, Python, 145 lines
- visualize_results.py, Python, 262 lines
- README.md, Text, 196 lines
Zenodo 20685597
Availability: 1 check, the latest on 26 September 2026: the link answers (HTTP 200)
- 26 September 2026: the link answers (HTTP 200)
Availability and implementation
Source code and the archived code snapshot are available at https://
Reproduced under the paper's license (CC BY), from the paper cited above.
Code availability
Source code, manuscript-specific analysis scripts, and processed outputs are available 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:
- 3 repositories of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
- 9 scripts, each with its path and the digest of its content;
- 1 match 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
No dataset and no data link were found in the paper.
Data availability
The data underlying this article are available as follows.
The 32 benchmark datasets used for quantitative evaluation follow the public benchmark collection assembled by Li et al. (2023).
The simulated colon dataset used for qualitative evaluation is a study-specific simulation.
The human DLPFC spatial transcriptomics data are publicly available through https://
The 10x Visium breast cancer spatial dataset is publicly available from the 10x Genomics Human Breast Cancer Whole Transcriptome Analysis dataset.
The PDAC-A data are publicly available from GEO under accession GSE111672.
The colorectal liver-metastasis Visium and scRNA-seq inputs are publicly available from GEO under accession GSE225857.
Processed datasets have been deposited in Zenodo. The data-package DOI is 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, 8 authors, 9 MeSH terms, 3 funders, 35 references.
Cite
This paper
Xue, W., Zhang, J., Chen, T., Shen, W., Ma, J., Xu, Y., Wong, H.-S., & Wu, S. (2026). NicheDeSig: niche-aware deconvolution and adaptive signature analysis for spatial transcriptomics. Bioinformatics (Oxford, England), 42(8), btag578. https://
BibTeX
@article{xue2026nichedes
author = {Xue, Wen and Zhang, Juncheng and Chen, Tianyi and Shen, Wenjun and Ma, Jinjin and Xu, Yong and Wong, Hau-San and Wu, Si},
title = {{NicheDeSig: niche-aware deconvolution and adaptive signature analysis for spatial transcriptomics}},
journal = {Bioinformatics (Oxford, England)},
year = {2026},
month = aug,
volume = {42},
number = {8},
pages = {btag578},
publisher = {Oxford University Press},
issn = {1367-4803},
doi = {10.1093/
url = {https://
pmid = {42530368},
pmcid = {PMC13481669}
}
RIS
TY - JOUR
AU - Xue, Wen
AU - Zhang, Juncheng
AU - Chen, Tianyi
AU - Shen, Wenjun
AU - Ma, Jinjin
AU - Xu, Yong
AU - Wong, Hau-San
AU - Wu, Si
TI - NicheDeSig: niche-aware deconvolution and adaptive signature analysis for spatial transcriptomics
T2 - Bioinformatics (Oxford, England)
J2 - Bioinformatics
PY - 2026
DA - 2026/
VL - 42
IS - 8
SP - btag578
SN - 1367-4803
PB - Oxford University Press
DO - 10.1093/
UR - https://
LA - en
ER -
CSL-JSON
{
"id": "10.1093/
"type": "article-journal",
"title": "NicheDeSig: niche-aware deconvolution and adaptive signature analysis for spatial transcriptomics",
"container-title": "Bioinformatics (Oxford, England)",
"author": [
{
"family": "Xue",
"given": "Wen"
},
{
"family": "Zhang",
"given": "Juncheng"
},
{
"family": "Chen",
"given": "Tianyi"
},
{
"family": "Shen",
"given": "Wenjun"
},
{
"family": "Ma",
"given": "Jinjin"
},
{
"family": "Xu",
"given": "Yong"
},
{
"family": "Wong",
"given": "Hau-San"
},
{
"family": "Wu",
"given": "Si"
}
],
"container-title-short":
"volume": "42",
"issue": "8",
"page": "btag578",
"DOI": "10.1093/
"PMID": "42530368",
"PMCID": "PMC13481669",
"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.21203/rs.3.rs-9676637/v1 [code]
- A Comprehensive Benchmarking of Spatial Deconvolution and Domain Detection Methods across Diverse Tissues and Spatial Transcriptomic TechnologiesJournal: Research Square (preprint)In common: anndata, Scanpy, PyTorch, 4 other tools, methods / tools, genetics / omics, 12 references
- [2] doi:10.1016/j.isci.2026.117206 [code]
- ReliST: A model-agnostic risk layer for spatial transcriptomics deconvolution.Journal: iScienceIn common: anndata, Scanpy, PyTorch, 4 other tools, genetics / omics, 12 references
- [3] doi:10.1093/bioinformatics/btag515 [code]
- PRISM: Prior-enhanced Inference for Spatial Transcriptomic Cell Type Mapping.Journal: Bioinformatics (Oxford, England)In common: anndata, Scanpy, PyTorch, 4 other tools, genetics / omics, 10 references
- [4] doi:10.1093/bioinformatics/btag424 [code]
- SlotDeconv: spatial transcriptomics deconvolution via diversity-constrained prototype learning and spatial refinement.Journal: Bioinformatics (Oxford, England)In common: anndata, Scanpy, PyTorch, 4 other tools, methods / tools, genetics / omics, 6 references
- [5] doi:10.1038/s41592-026-03194-8 [code]
- Beyond benchmarking: an expert-guided consensus approach to spatially aware clustering.Journal: Nature methodsIn common: anndata, Scanpy, PyTorch, 4 other tools, methods / tools, genetics / omics, 6 references
- [6] doi:10.1002/advs.77003 [code]
- SemanticST: A Scalable Multi-Contextual Graph Learning Framework for Uncovering Spatial Niches and Robust Multi-Sample Integration in Spatial Transcriptomics.Journal: Advanced science (Weinheim, Baden-Wurttemberg, Germany)In common: anndata, Scanpy, PyTorch, 4 other tools, methods / tools, genetics / omics, 6 references
- [7] doi:10.1093/bib/bbag404 [code]
- Navigating cell maps by deep learning integration of single-cell and spatially resolved transcriptomics.Journal: Briefings in bioinformaticsIn common: anndata, Scanpy, PyTorch, 4 other tools, genetics / omics, other condition, 5 references
- [8] doi:10.1093/bib/bbag298 [code]
- Empowering multifaceted analysis of spatial transcriptomics data with RGAST.Journal: Briefings in bioinformaticsIn common: anndata, Scanpy, PyTorch, 4 other tools, methods / tools, genetics / omics, 5 references
- [9] doi:10.1093/bioinformatics/btag430 [code]
- SPIDER: spatially integrated denoising via embedding regularization with single cell supervision.Journal: Bioinformatics (Oxford, England)In common: anndata, Scanpy, PyTorch, 4 other tools, genetics / omics, 5 references
- [10] doi:10.1186/s13059-026-04069-z [code]
- SpaNiche: spatial niche analysis to explore colocalization patterns and cellular interactions in spatial transcriptomics data.Journal: Genome biologyIn common: genetics / omics, 10 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: 3 repositories of the authors' code, each at its verified commit and with its license, 9 scripts, and 1 match 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:bbf41a7747448c11…
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.
