zoom.sc_tool.select_ctrl
- zoom.sc_tool.select_ctrl(weight_perm: pandas.DataFrame, sign_perm: pandas.DataFrame, gene_rep: pandas.DataFrame, weight_key: str, gene_stats: pandas.DataFrame, qbin_counts: dict, direction: bool, n_jobs: int) Tuple[dict, dict][source]
Calculates the gene expression rank for each cell.
- Parameters:
weight_perm (pd.DataFrame) – Gene weights in permutation tests.
sign_perm (pd.DataFrame) – Signed gene weights in permutation tests.
gene_rep (pd.DataFrame) – Results for PLS-R, must contain column weight_key.
weight_key (str) – Column name indicating the original gene weights for scoring.
gene_stat (pd.DataFrame) – Gene statistics of scRNA-seq dataset.
qbin_counts (dict) – Dictory of gene counts in each bin.
direction (bool) – If True, find gene set relevant to the positive direction of given SBP else negative direction.
n_jobs (int) – Number of cores used for parallel computation.
- Returns:
dic_ctrl_list (dict) – Control gene sets selected based on spatial permutation tests.
dic_ctrl_weight (dict) – Corresponding gene weights of control gene sets.
References
Fulcher, B. D., Arnatkeviciute, A. & Fornito, A. Overcoming false-positive gene-category enrichment in the analysis of spatially resolved transcriptomic brain atlas data. Nat. Commun. 12, 2669 (2021).