Main function for spatial transcriptomics deconvolution
sc_ref: Single-cell reference Seurat objectst_vis: Spatial transcriptomics Seurat objectclust_vr: Name of cell type annotation columnassay: optional: set the default assay for sc_ref. By default is 'RNA'.slot: optional: set the default slot for sc_ref. By default is 'counts'.output_path: optional: set the output path for the intermediate files. If is NULL, it will use current path by 'getwd()' function. By default is 'NULL'.cluster_markers: optional: give the marker genes for each cluster of sc_ref. If is NULL, it will be calculated use the default parameters. By default is 'NULL'.min.pct: optional: parameter for Seurat::FindAllMarkerslogfc.threshold: optional: parameter for Seurat::FindAllMarkersmin.diff.pct: optional: parameter for Seurat::FindAllMarkersnormalize: optional: method for normalizing the count matrix, including uv: unit variance, raw: no transformation applied. By default is 'uv'.downsample_n: optional: set the downsample number of times. By default is '1'.n_cluster: optional: set the maximum size for each cluster after downsample. By default is '100'.n_top: optional: set the n_top marker gene used for each cluster. By default is 'NULL'.min_cont: optional: set the cutoff threshold. By default is '0.01'.remove.RPL: whether remove the RPL-related genes. By default is 'FALSE'.remove.MT: whether remove the MT-related genes. By default is 'FALSE'.cos.filter: optional: whether use the cosg methods to filter some features. By default is 'TRUE'.cos.mu: optional: parameter for cosg. By default is 1.cos.n_genes_user: optional: parameter for cosg. By default is 900.marker.slot: optional: set the slot of sc_ref for marker finding. By default is 'data'.min_cont: optional: parameter for calculating entropy. By default is '0.01'.unit: optional: parameter for calculating entropy. By default is 'log2'.random.seed: optional: set the random seed for randomly downsampling. By default is '10000'.meta.filter: optional: whether execute meta-purity filtering process. By default is 'TRUE'.nmf.tol: optional: parameter for the nmf iteration. By default is '1e-04'.meta.assay: optional: assay parameter for meta-purity filtering. By default is 'integrated'.meta.ndims: optional: ndims parameter for meta-purity filtering. By default is '30'.meta.resolution: optional: resolution parameter for meta-purity filtering. By default is '100'.meta.purity: optional: purity parameter for meta-purity filtering. By default is '0.95'.ent.filter.threshold: optional: parameter for filtering low quality features based on entropy.cos.filter.threshold: optional: parameter for filtering low quality features based on cosine similarity.weight.filter.threshold: optional: parameter for filtering low quality features based on weight.List containing deconvolution results and evaluation metrics
Function for 10X Visium HD data analysis
sc_ref: Single-cell reference Seurat objectst_vis: Spatial transcriptomics Seurat objectspatial.assay: Spatial assay name (e.g., 'Spatial.008um')clust_vr: Name of cell type annotation columnrowname_st_vis: optional: provide a vector including the row names of st.vis.assay: optional: set the default assay for sc_ref. By default is 'RNA'.slot: optional: set the default slot for sc_ref. By default is 'counts'.output_path: optional: set the output path for the intermediate files. If is NULL, it will use current path by 'getwd()' function. By default is 'NULL'.cluster_markers: optional: give the marker genes for each cluster of sc_ref. If is NULL, it will be calculated use the default parameters. By default is 'NULL'.min.pct: optional: parameter for Seurat::FindAllMarkerslogfc.threshold: optional: parameter for Seurat::FindAllMarkersmin.diff.pct: optional: parameter for Seurat::FindAllMarkersnormalize: optional: method for normalizing the count matrix, including uv: unit variance, raw: no transformation applied. By default is 'uv'.downsample_n: optional: set the downsample number of times. By default is '1'.n_cluster: optional: set the maximum size for each cluster after downsample. By default is '100'.n_top: optional: set the n_top marker gene used for each cluster. By default is 'NULL'.min_cont: optional: set the cutoff threshold. By default is '0.01'.remove.RPL: whether to remove the RPL-related genes. By default is 'FALSE'.remove.MT: whether to remove the MT-related genes. By default is 'FALSE'.cos.filter: optional: whether to use the cosg methods to filter some features. By default is 'TRUE'.cos.mu: optional: parameter for cosg. By default is 1.cos.n_genes_user: optional: parameter for cosg. By default is 900.marker.slot: optional: set the slot of sc_ref for marker finding. By default is 'data'.min_cont: optional: parameter for calculating entropy. By default is '0.01'.unit: optional: parameter for calculating entropy. By default is 'log2'.random.seed: optional: set the random seed for randomly downsampling. By default is '10000'.meta.filter: optional: whether execute meta-purity filtering process. By default is 'TRUE'.nmf.tol: optional: parameter for the nmf iteration. By default is '1e-04'.meta.assay: optional: assay parameter for meta-purity filtering. By default is 'integrated'.meta.ndims: optional: ndims parameter for meta-purity filtering. By default is '30'.meta.resolution: optional: resolution parameter for meta-purity filtering. By default is '100'.meta.purity: optional: purity parameter for meta-purity filtering. By default is '0.95'.ent.filter.threshold: optional: parameter for filtering low-quality features based on entropy.cos.filter.threshold: optional: parameter for filtering low-quality features based on cosine similarity.weight.filter.threshold: optional: parameter for filtering low-quality features based on weight.Main class for UCASpatial analysis
sc_ref: reference single-cell RNA-seq data (ad.AnnData)st_vis: spatial transcriptomic data (ad.AnnData)clust_vr: column name in sc_ref.obs storing cell-type/cluster labels (str)assay: assay to use in sc_ref; default 'RNA' (str)slot: data slot in sc_ref; default 'counts' (str)output_path: directory for intermediate files; None → current working dir (Optional[str])cluster_markers: pre-computed marker DataFrame; None → compute on the fly (Optional[pd.DataFrame])min_pct: minimum percent cells expressing gene for marker detection; default 0.2 (float)logfc_threshold: minimum log fold-change for marker detection; default 0.25 (float)min_diff_pct: minimum difference in detection rate between clusters; default 0.1 (float)normalize_method: count normalization method; 'uv' (unit-variance) or 'raw'; default 'uv' (str)downsample_n: number of downsampling replicates; default 1 (int)n_cluster: max cells per cluster after downsampling; default 100 (int)n_top: top-N marker genes to retain per cluster; None → use all (Optional[int])min_cont: minimum contribution threshold for entropy & deconvolution; default 0.01 (float)remove_RPL: discard ribosomal protein genes; default False (bool)remove_MT: discard mitochondrial genes; default False (bool)cos_filter: apply cosine-similarity feature filtering; default True (bool)cos_mu: cosine parameter μ; default 1 (float)cos_n_genes_user: number of genes to keep via cosine filter; default 900 (int)marker_slot: layer in sc_ref used for marker discovery; default 'data' (str)unit: entropy log unit; default 'log2' (str)random_seed: seed for downsampling & NMF reproducibility; default 10000 (int)meta_filter: enable meta-purity filtering; default True (bool)nmf_tol: NMF convergence tolerance; default 1e-4 (float)meta_assay: assay for meta-purity filtering; default 'integrated' (str)meta_ndims: number of dimensions for meta-purity clustering; default 30 (int)meta_resolution: resolution for meta-purity clustering; default 100 (int)meta_purity: minimum purity cutoff for meta filtering; default 0.95 (float)ent_filter_threshold: entropy-based feature filter cutoff; default 0.5 (float)cos_filter_threshold: cosine similarity filter cutoff; default 0.05 (float)weight_filter_threshold: weight-based feature filter cutoff; default 0.2 (float)run(): Execute deconvolution and return results