nichepca.workflows.nichepca#
- nichepca.workflows.nichepca(adata, knn=None, radius=None, delaunay=False, n_comps=30, obs_key=None, obsm_key=None, sample_key=None, pipeline=('norm', 'log1p', 'agg', 'pca'), norm_per_sample=True, backend='pyg', aggr='mean', allow_harmony=True, max_iter_harmony=50, remove_graph=False, **kwargs)#
Run the general NichePCA workflow.
- Parameters:
adata (
AnnData) – The input AnnData object.knn (
int|None(default:None)) – Number of nearest neighbors to use for graph construction.radius (
float|None(default:None)) – Radius for graph construction.delaunay (
bool(default:False)) – Whether to use Delaunay triangulation for graph construction.n_comps (
int(default:30)) – Number of principal components to compute.obs_key (
str|None(default:None)) – Observation key to use for generating a new AnnData object.obsm_key (
str|None(default:None)) – Observation matrix key to use as input.sample_key (
str|None(default:None)) – Sample key to use for multi-sample graph construction.pipeline (
tuple|list(default:('norm', 'log1p', 'agg', 'pca'))) – Pipeline of steps to perform. Must include ‘agg’.norm_per_sample (
bool(default:True)) – Whether to normalize per sample.backend (
str(default:'pyg')) – Backend to use for aggregation.aggr (
str(default:'mean')) – Aggregation method to use.allow_harmony (
bool(default:True)) – Whether to allow Harmony integration.max_iter_harmony (
int(default:50)) – Maximum number of iterations for Harmony.remove_graph (
bool(default:False)) – Whether to remove the constructed graph fromadata.unsafter the workflow completes.**kwargs (dict) – Additional keyword arguments.
- Returns:
None