API Documents

zoom.core - Core Class

Main class used for quick analyses in zoom.

  • ZOOM: Implementation of cross-validation PLS-R and traditional imaging-transcriptomics paradigm and spatial permutation test-based GSEA.

  • ZOOM_SC: Calculation of single-cell enrichment scores of SBP-relevant gene sets and single-cell level statistical significance.

zoom.core.ZOOM(expression, SBP, SBP_perm[, ...])

The ZOOM class serves as fundation for this package.It implements a framework for partial least squares regression (PLS-R) applied to anatomically comprehensive transcriptomics and spatial brain phenotypic data.

zoom.core.ZOOM_SC(adata, expression, SBP, ...)

The ZOOM_SC class extends traditional imaging-transcriptomics paradigm (ZOOM class) by link SBP-relevant gene sets with single-cell RNA sequencing dataset.

zoom.data_loader - Data Loader

Functionality for loading single-cell RNA sequencing data, surface- based spatial brain phenotypes, parcellation and data frame.

zoom.data_loader.load_sc(adata, flag_sparse)

Load and check scRNA-seq file (.h5ad).

zoom.data_loader.load_gii(gii, atlas, ...)

Load GIFTI image.

zoom.data_loader.load_parc(parcellation, ...)

Load parcellation image.

zoom.prepare - Prepare Input Data

Functionality for perparing neccessary data for ZOOM. - Regional AHBA processing pipeline optimized for cortical samples. - Regional SBP and spatial permutation test. - scRNA-seq preprocess and calculate gene specificity scores.

zoom.prepare.abagen_ctx(atlas, atlas_info, ...)

AHBA processing pipeline optimized for cortical samples.

zoom.prepare.process_SBP(SBP, parcellation, ...)

Assign SBP image to parcellation image and perform spatial permutation test.

zoom.prepare.fetch_medial_wall(atlas, ...)

Fetch indices of medial wall vertices.

zoom.pls_tool - Imaging Transcriptomics

Functionality for performing cross-validation PLS-R and traditional imaging-transcriptomics paradigm.

zoom.pls_tool.optimal_component_eval(...)

Evaluate optimal component for PLS-R through cross-validation strategy.

zoom.pls_tool.run_component_eval(expression, ...)

Evaluate optimal component for PLS-R through cross-validation strategy.

zoom.pls_tool.model_eval(expression, SBP, ...)

Evaluate the final model performance for the PLS-R model.

zoom.pls_tool.pls_perm(expression, SBP, ...)

Perform spatial permutation test for PLS-R.

zoom.pls_tool.vip_perm(expression, SBP, ...)

Compute gene-level statistics and corresponding permutation p-values.

zoom.pls_tool.boot_pls1(expression, SBP, ...)

Estimate Z-scored PLS1 gene weights with bootstrap strategy.

zoom.pls_tool.pls1_perm(expression, SBP, ...)

Compute gene-level statistics and corresponding permutation p-values.

zoom.sc_tool - Single Cell Scoring

Functionality for preprocessing scRNA-seq data.

zoom.sc_tool.preprocess(adata, QC, ...)

Calculates the gene expression rank for each cell.

zoom.sc_tool.rank_expression(adata)

Calculates the gene expression rank for each cell.

zoom.sc_tool.compute_gss(adata, n_jobs)

Calculates the gene expression rank for each cell.

zoom.sc_tool.select_ctrl(weight_perm, ...)

Calculates the gene expression rank for each cell.

zoom.sc_tool.score_cell_zoom(adata, ...)

Calculates single-cell SBP-relevant enrichment scores.

zoom.sc_tool.group_bh(adata, df_res, pval, ...)

Perform group Benjamini–Hochberg FDR correction.

zoom.sc_tool.downstream_DEG(adata, df_res, ...)

Calculates differentially expressed genes (DEG) for cell groups containing cells significantly relevant to SBP.

zoom.sc_tool.downstream_region_enrich(adata, ...)

Computes region enrichment for cell groups containing significant cells based on predefined statistical results.

zoom.sc_tool.gsea_perm(gene_rep, weight_key, ...)

Permform GSEA based on spatial permutation test.