Documentation#

Import scDRS as:

import scdrs

Compute scDRS score#

scdrs.preprocess(data[, cov, adj_prop, ...])

Preprocess single-cell data for scDRS analysis.

scdrs.score_cell(data, gene_list[, ...])

Score cells based on the disease gene set.

scDRS downstream analyses#

scdrs.method.downstream_group_analysis(...)

scDRS group-level analysis.

scdrs.method.downstream_corr_analysis(adata, ...)

scDRS cell-level correlation analysis.

scdrs.method.downstream_gene_analysis(adata, ...)

scDRS gene-level correlation analysis.

Data loading#

scdrs.util.load_h5ad(h5ad_file[, ...])

Load h5ad file and optionally filter out cells and perform normalization.

scdrs.util.load_scdrs_score(score_file[, ...])

Load scDRS scores.

scdrs.util.load_gs(gs_path[, src_species, ...])

Load the gene set file (.gs file).

scdrs.util.load_homolog_mapping(src_species, ...)

Load gene homologs between mouse and human.

Utils#

scdrs.method.test_gearysc(adata, ...[, opt])

Compute significance level for Geary's C statistics.

scdrs.method.gearys_c(adata, vals)

Compute Geary's C statistics for an AnnData.

scdrs.method._pearson_corr(mat_X, mat_Y)

Pearson's correlation between every columns in mat_X and mat_Y.

scdrs.method._pearson_corr_sparse(mat_X, mat_Y)

Pearson's correlation between every columns in mat_X and mat_Y (sparse matrix)

scdrs.pp.compute_stats(adata[, ...])

Compute gene-level and cell-level statstics used for scDRS analysis.

scdrs.pp.reg_out(mat_Y, mat_X)

Regress mat_X out of mat_Y.

scdrs.pp._get_mean_var(sparse_X[, axis, weights])

Compute mean and var of a sparse / non-sparse matrix.

scdrs.pp._get_mean_var_implicit_cov_corr(adata)

Compute mean and variance of sparse matrix of the form