Skip to content

Commit

Permalink
Updated Harmony Integrate Docs to better match interface to Harmonypy…
Browse files Browse the repository at this point in the history
… package (#3362)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Phil Schaf <[email protected]>
  • Loading branch information
3 people authored Nov 19, 2024
1 parent 0f32b08 commit 751eafa
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
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

0 comments on commit 751eafa

Please sign in to comment.