Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated Harmony Integrate Docs to better match interface to Harmonypy package #3362

Merged
merged 8 commits into from
Nov 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/release-notes/3362.doc.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Improve {func}`~scanpy.external.pp.harmony_integrate` docs {smaller}`D Kühl`
7 changes: 5 additions & 2 deletions src/scanpy/external/pp/_harmony_integrate.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

from __future__ import annotations

from collections.abc import Sequence # noqa: TCH003
from typing import TYPE_CHECKING

import numpy as np
Expand All @@ -19,7 +20,7 @@
@doctest_needs("harmonypy")
def harmony_integrate(
adata: AnnData,
key: str,
key: str | Sequence[str],
*,
basis: str = "X_pca",
adjusted_basis: str = "X_pca_harmony",
Expand All @@ -42,7 +43,9 @@ def harmony_integrate(
The annotated data matrix.
key
The name of the column in ``adata.obs`` that differentiates
among experiments/batches.
among experiments/batches. To integrate over two or more covariates,
you can pass multiple column names as a list. See ``vars_use``
parameter of the ``harmonypy`` package for more details.
basis
The name of the field in ``adata.obsm`` where the PCA table is
stored. Defaults to ``'X_pca'``, which is the default for
Expand Down
Loading