stlearn.tl.cci.run_lr_go

stlearn.tl.cci.run_lr_go(adata: AnnData, r_path: str, n_top: int = 100, bg_genes: ndarray | None = None, min_sig_spots: int = 1, species: str = 'human', p_cutoff: float = 0.01, q_cutoff: float = 0.5, onts: str = 'BP', verbose: bool = True)[source]
Runs a basic GO analysis on the genes in the top ranked LR pairs.

Only supported for human and mouse species.

Parameters:
  • adata (AnnData) – Must have had st.tl.cci_rank.run() called prior.

  • r_path (str) – Path to R, must have clusterProfiler, org.Mm.eg.db, and org.Hs.eg.db installed.

  • bg_genes (np.array) – Genes to be used as the background. If None, defaults to all genes in lr database: ‘connectomeDB2020_put’.

  • n_top (int) – The top number of LR pairs to use.

  • min_sig_spots (int) – Minimum no. of significant spots pairs must have to be considered.

  • species (str) – Species to perform the GO testing for.

  • p_cutoff (float) – P-value & P-adj cutoff below which results will be returned.

  • q_cutoff (float) – Q-value cutoff below which results will be returned.

  • onts (str) – As per clusterProfiler; One of “BP”, “MF”, and “CC” subontologies, or “ALL” for all three.

Returns:

adata – Relevant information stored in adata.uns[‘lr_go’]

Return type:

AnnData