diff --git a/README.md b/README.md index e97a693..201d8f7 100644 --- a/README.md +++ b/README.md @@ -58,16 +58,16 @@ sc.tl.leiden(adata, resolution=0.5) ``` ### Multi-sample support -If you have multiple samples in `adata.obs['sample']`, you can provide the key `sample` to `npc.wf.nichepca` this uses harmony by default: +If you have multiple samples in `adata.obs["sample"]`, you can provide the key `sample` to `npc.wf.nichepca` this uses harmony by default: ```python npc.wf.nichepca(adata, knn=25, sample_key="sample") ``` -If you have cell type labels in `adata.obs['cell_type']`, you can directly provide them to `nichepca` as follows (we found this sometimes works better for multi-sample domain identification). However, in this case we need to run `npc.cl.leiden_unique` to handle potential duplicate embeddings: +If you have cell type labels in `adata.obs["cell_type"]`, you can directly provide them to `nichepca` as follows (we found this sometimes works better for multi-sample domain identification). However, in this case we need to run `npc.cl.leiden_unique` to handle potential duplicate embeddings: ```python -npc.wf.nichepca(adata, knn=25, obs_key='cell_type', sample_key="sample") +npc.wf.nichepca(adata, knn=25, obs_key="cell_type", sample_key="sample") npc.cl.leiden_unique(adata, use_rep="X_npca", resolution=0.5, n_neighbors=15) ``` diff --git a/docs/api.md b/docs/api.md index 4b34928..f26e30c 100644 --- a/docs/api.md +++ b/docs/api.md @@ -1,14 +1,65 @@ # API +## Workflows + ```{eval-rst} .. autosummary:: :toctree: generated - :recursive: - :nosignatures: nichepca.workflows + nichepca.workflows.nichepca +``` + +## Clustering + +```{eval-rst} +.. autosummary:: + :toctree: generated + nichepca.clustering + nichepca.clustering.leiden_unique + nichepca.clustering.leiden_multires + nichepca.clustering.leiden_with_nclusters +``` + +## Graph Construction + +```{eval-rst} +.. autosummary:: + :toctree: generated + nichepca.graph_construction + nichepca.graph_construction.knn_graph + nichepca.graph_construction.delaunay_graph + nichepca.graph_construction.distance_graph + nichepca.graph_construction.construct_multi_sample_graph + nichepca.graph_construction.from_squidpy + nichepca.graph_construction.to_squidpy + nichepca.graph_construction.remove_long_links + nichepca.graph_construction.calc_graph_stats + nichepca.graph_construction.print_graph_stats + nichepca.graph_construction.resolve_graph_constructor +``` + +## Neighborhood Embedding + +```{eval-rst} +.. autosummary:: + :toctree: generated + nichepca.nhood_embedding + nichepca.nhood_embedding.aggregate +``` + +## Utilities + +```{eval-rst} +.. autosummary:: + :toctree: generated + nichepca.utils + nichepca.utils.check_for_raw_counts + nichepca.utils.normalize_per_sample + nichepca.utils.to_numpy + nichepca.utils.to_torch ```