Skip to main content
Ctrl+K

cellink

  • Tutorials
    • DonorData basics: creating, syncing, slicing, and saving
    • Tutorial: Pseudobulk eQTL Analysis with cellink
    • Tutorial: eQTL Analysis with JaxQTL and TensorQTL using cellink
    • Tutorial: Annotating Genetic Variants with cellink
    • Tutorial: Rare Variant Association Testing with cellink
    • Tutorial: LD Clumping and Identifying Independent Signals with cellink
    • Tutorial: Colocalization Analysis - Linking eQTLs to GWAS Signals with cellink
    • Tutorial: Integrating GWAS with Single-Cell Data using cellink
    • Tutorial: Spatially Resolved GWAS Mapping with gsMap
    • Tutorial: eQTL Analysis with SAIGE-QTL using cellink
    • Tutorial: Using EHR Data as Donor-Level Input in cellink
    • Tutorial: Using the MILDataset and PyTorch DataLoader in cellink
    • Tutorial: Cell-Level LDSC analysis
    • Merging AnnData objects for cell-level LDSC (Duncan lab dataset)
    • Tutorial: MAGMA Gene-Set and Gene Property Analysis
    • Tutorial: sc-linker via cellink
    • Tutorial: Donor Effect Decomposition with LIVI using cellink
  • API
    • DonorData
      • cellink.DonorData
    • Preprocessing pp
      • cellink.pp.variant_qc
      • cellink.pp.cell_level_obs_filter
      • cellink.pp.donor_level_obs_filter
      • cellink.pp.donor_level_var_filter
      • cellink.pp.log_transform
      • cellink.pp.low_abundance_filter
      • cellink.pp.missing_values_filter
      • cellink.pp.normalize
    • Input-Output io
      • cellink.io.from_sgkit_dataset
      • cellink.io.read_plink
      • cellink.io.read_bgen
      • cellink.io.read_sgkit_zarr
      • cellink.io.read_pgen_zarr
      • cellink.io.stream_pgen_to_zarr
      • cellink.io.read_dd
      • cellink.io.read_h5_dd
      • cellink.io.read_zarr_dd
      • cellink.io.to_plink
      • cellink.io.write_variants_to_vcf
    • Tools tl
      • cellink.tl.get_snp_df
      • cellink.tl.run_favor
      • cellink.tl.run_snpeff
      • cellink.tl.run_vep
      • cellink.tl.add_vep_annos_to_gdata
      • cellink.tl.combine_annotations
      • cellink.tl.aggregate_annotations_for_varm
      • cellink.tl.run_burden_test
      • cellink.tl.run_skat_test
      • cellink.tl.beta_weighting
      • cellink.tl.subset_genomic_region
      • cellink.tl.subset_gene
    • External tools tl.external
      • cellink.tl.external.run_jaxqtl
      • cellink.tl.external.read_jaxqtl_results
      • cellink.tl.external.run_tensorqtl
      • cellink.tl.external.read_tensorqtl_results
      • cellink.tl.external.configure_saigeqtl_runner
      • cellink.tl.external.get_saigeqtl_runner
      • cellink.tl.external.make_group_file
      • cellink.tl.external.run_saigeqtl
      • cellink.tl.external.read_saigeqtl_results
      • cellink.tl.external.run_mixmil
      • cellink.tl.external.calculate_ld
      • cellink.tl.external.calculate_pcs
      • cellink.tl.external.configure_ldsc_runner
      • cellink.tl.external.munge_sumstats
      • cellink.tl.external.make_annot_from_bimfile
      • cellink.tl.external.make_annot_from_donor_data
      • cellink.tl.external.estimate_ld_scores_from_bimfile
      • cellink.tl.external.estimate_ld_scores_from_donor_data
      • cellink.tl.external.compute_ld_scores_with_annotations_from_bimfile
      • cellink.tl.external.compute_ld_scores_with_annotations_from_donor_data
      • cellink.tl.external.estimate_heritability
      • cellink.tl.external.estimate_celltype_specific_heritability
      • cellink.tl.external.estimate_genetic_correlation
      • cellink.tl.external.generate_gene_coord_file
      • cellink.tl.external.generate_sldsc_genesets
      • cellink.tl.external.get_magma_gene_loc
      • cellink.tl.external.preprocess_for_sldsc
      • cellink.tl.external.run_magma_pipeline
      • cellink.tl.external.run_magma_annotate
      • cellink.tl.external.run_magma_gene_analysis
      • cellink.tl.external.run_magma_gsa
      • cellink.tl.external.run_magma_gpa
      • cellink.tl.external.genesets_dir_to_entrez_gmt
      • cellink.tl.external.load_ensembl_to_entrez_map
      • cellink.tl.external.scores_to_gmt
      • cellink.tl.external.scores_to_covar
      • cellink.tl.external.format_gsmap_sumstats
      • cellink.tl.external.load_gsmap_results
      • cellink.tl.external.compute_celltype_programs
      • cellink.tl.external.compute_diseaseprogression_programs
      • cellink.tl.external.compute_nmf_programs
      • cellink.tl.external.compute_joint_nmf_programs
      • cellink.tl.external.JointNMFWrapper
      • cellink.tl.external.compute_escore
      • cellink.tl.external.run_sclinker_heritability
      • cellink.tl.external.compute_ld_scores_for_sclinker
      • cellink.tl.external.load_sclinker_heritability_results
      • cellink.tl.external.download_sclinker_references
      • cellink.tl.external.download_sclinker_enhancer_links
      • cellink.tl.external.load_roadmap_links
      • cellink.tl.external.load_abc_links
      • cellink.tl.external.load_gene_annotation
      • cellink.tl.external.genescores_to_abc_road_bedgraph
      • cellink.tl.external.genescores_to_100kb_bedgraph
      • cellink.tl.external.genescores_to_annotations
      • cellink.tl.external.bedgraph_to_snp_annotation
      • cellink.tl.external.check_and_patch_ldsc_parse_bug
      • cellink.tl.external.run_scdrs
      • cellink.tl.external.run_seismic
      • cellink.tl.external.run_seismic_torch
      • cellink.tl.external.SparseScore
      • cellink.tl.external.RegressionNLL
      • cellink.tl.external.prepare_scprs_data
      • cellink.tl.external.get_plink_commands_per_cell
      • cellink.tl.external.write_slurm_array_job
      • cellink.tl.external.get_disease_relevant_cells
      • cellink.tl.external.run_scprs_pipeline
      • cellink.tl.external.LIVIRunner
      • cellink.tl.external.configure_livi_runner
      • cellink.tl.external.get_livi_runner
      • cellink.tl.external.train_livi
      • cellink.tl.external.infer_livi
      • cellink.tl.external.run_livi_association_testing
      • cellink.tl.external.save_livi_results
      • cellink.tl.external.load_livi_results
    • Plotting
      • cellink.pl.locus
      • cellink.pl.manhattan
      • cellink.pl.qq
      • cellink.pl.expression_by_genotype
      • cellink.pl.volcano
    • Machine Learning ml
      • cellink.ml.MILDataset
      • cellink.ml.mil_collate_fn
      • cellink.ml.DonorMILModel
    • Association Testing at
      • cellink.at.acat_test
      • cellink.at.compute_acat
      • cellink.at.GWAS
      • cellink.at.Skat
    • Utils
      • cellink.utils.column_normalize
      • cellink.utils.gaussianize
      • cellink.utils.one_hot_encode_genotypes
      • cellink.utils.dosage_per_strand
    • Resources
      • cellink.resources.get_1000genomes
      • cellink.resources.get_1000genomes_grch38
      • cellink.resources.get_dummy_onek1k
      • cellink.resources.get_onek1k
      • cellink.resources.get_eqtl_catalog_dataset_associations
      • cellink.resources.get_eqtl_catalog_datasets
      • cellink.resources.get_gwas_catalog_studies
      • cellink.resources.get_gwas_catalog_study
      • cellink.resources.get_gwas_catalog_study_summary_stats
      • cellink.resources.liftover_gwas_summary_stats
      • cellink.resources.get_pgs_catalog_score
      • cellink.resources.get_pgs_catalog_scores
      • cellink.resources.get_1000genomes_ld_scores
      • cellink.resources.get_1000genomes_ld_weights
      • cellink.resources.get_1000genomes_plink_files
      • cellink.resources.get_1000genomes_frq
      • cellink.resources.get_1000genomes_hapmap3
      • cellink.resources.merge_1000g_plink_chromosomes
    • PGEN → AnnData Conversion (cellink-pgen)
  • Changelog
  • Contributing guide
  • References
  • .rst

cellink.tl.external.JointNMFWrapper

Contents

  • JointNMFWrapper
  • Attributes table
  • Methods table
  • Attributes
    • JointNMFWrapper.Hd
    • JointNMFWrapper.Hh
    • JointNMFWrapper.Wd
    • JointNMFWrapper.Wh
  • Methods
    • JointNMFWrapper.fit()

cellink.tl.external.JointNMFWrapper#

class cellink.tl.external.JointNMFWrapper(Xh, Xd, *, n_shared=10, n_healthy_specific=5, n_disease_specific=5, gamma=1.0, mu=None, n_init=5, max_iters=1000, tol=1e-10, random_state=0)#

Joint NMF decomposition for paired healthy / disease single-cell data.

Parameters:
  • Xh (ndarray) – Dense matrix (cells x genes) for the healthy condition.

  • Xd (ndarray) – Dense matrix (cells x genes) for the disease condition. Must have the same shape as Xh (paired cells x genes) since factor alignment correlates loadings across the two conditions cell-by-cell.

  • n_shared (int (default: 10)) – Number of programs shared between healthy and disease (KC in paper).

  • n_healthy_specific (int (default: 5)) – Number of programs unique to the healthy condition (KH in paper).

  • n_disease_specific (int (default: 5)) – Number of programs unique to the disease condition (KD in paper).

  • gamma (float (default: 1.0)) – Coupling strength. Higher values force shared programs to align more.

  • mu (float | None (default: None)) – L2 regularisation on loading matrices. If None, estimated from data.

  • n_init (int (default: 5)) – Number of random NMF initialisations; best reconstruction is kept.

  • max_iters (int (default: 1000)) – Maximum multiplicative-update iterations.

  • tol (float (default: 1e-10)) – Convergence tolerance on relative change in cost.

  • random_state (int (default: 0)) – Random seed for reproducibility.

Attributes table#

Hd

Hh

Wd

Wh

Healthy cell x factor loadings (dense).

Methods table#

fit()

Run multiplicative updates until convergence.

Attributes#

JointNMFWrapper.Hd#
JointNMFWrapper.Hh#
JointNMFWrapper.Wd#
JointNMFWrapper.Wh#

Healthy cell x factor loadings (dense).

Methods#

JointNMFWrapper.fit()#

Run multiplicative updates until convergence.

Return type:

JointNMFWrapper

previous

cellink.tl.external.compute_joint_nmf_programs

next

cellink.tl.external.compute_escore

Contents
  • JointNMFWrapper
  • Attributes table
  • Methods table
  • Attributes
    • JointNMFWrapper.Hd
    • JointNMFWrapper.Hh
    • JointNMFWrapper.Wd
    • JointNMFWrapper.Wh
  • Methods
    • JointNMFWrapper.fit()

By Jan Engelmann, Lucas Arnoldt, Eva Holtkamp

© Copyright 2026, Theislab..