Skip to content
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
2 changes: 1 addition & 1 deletion docs/release-notes/0.3.0.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
(v0.3.0)=
### 0.3.0 {small}`2017-11-16`

- {class}`~anndata.AnnData` gains method {meth}`~anndata.AnnData.concatenate` {smaller}`A Wolf`
- {class}`~anndata.AnnData` gains method `AnnData.concatenate` {smaller}`A Wolf`
- {class}`~anndata.AnnData` is available as the separate [anndata] package {smaller}`P Angerer, A Wolf`
- results of [PAGA](https://github.com/theislab/paga) simplified {smaller}`A Wolf`

Expand Down
6 changes: 3 additions & 3 deletions src/scanpy/external/pp/_mnn_correct.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,13 @@ def mnn_correct( # noqa: PLR0913
correction. Typically, a list of highly variable genes (HVGs).
When set to `None`, uses all vars.
batch_key
The `batch_key` for :meth:`~anndata.AnnData.concatenate`.
The `batch_key` for ``anndata.AnnData.concatenate``.
Only valid when `do_concatenate` and supplying `AnnData` objects.
index_unique
The `index_unique` for :meth:`~anndata.AnnData.concatenate`.
The `index_unique` for ``anndata.AnnData.concatenate``.
Only valid when `do_concatenate` and supplying `AnnData` objects.
batch_categories
The `batch_categories` for :meth:`~anndata.AnnData.concatenate`.
The `batch_categories` for ``anndata.AnnData.concatenate``.
Only valid when `do_concatenate` and supplying AnnData objects.
k
Number of mutual nearest neighbors.
Expand Down
11 changes: 6 additions & 5 deletions src/scanpy/external/tl/_harmony_timeseries.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def harmony_timeseries(

>>> from itertools import product
>>> import pandas as pd
>>> from anndata import AnnData
>>> from anndata import AnnData, concat
>>> import scanpy as sc
>>> import scanpy.external as sce

Expand All @@ -99,11 +99,12 @@ def harmony_timeseries(

>>> adata_ref = sc.datasets.pbmc3k()
>>> start = [596, 615, 1682, 1663, 1409, 1432]
>>> adata = AnnData.concatenate(
... *(adata_ref[i : i + 1000] for i in start),
>>> adata = concat(
... [adata_ref[i : i + 1000] for i in start],
... join="outer",
... batch_key="sample",
... batch_categories=[f"sa{i}_Rep{j}" for i, j in product((1, 2, 3), (1, 2))],
... label="sample",
... keys=[f"sa{i}_Rep{j}" for i, j in product((1, 2, 3), (1, 2))],
... index_unique="-",
... )
>>> time_points = adata.obs["sample"].str.split("_", expand=True)[0]
>>> adata.obs["time_points"] = pd.Categorical(
Expand Down
11 changes: 6 additions & 5 deletions tests/external/test_harmony_timeseries.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from itertools import product

from anndata import AnnData
from anndata import concat

import scanpy as sc
import scanpy.external as sce
Expand All @@ -15,11 +15,12 @@
def test_load_timepoints_from_anndata_list():
adata_ref = pbmc3k()
start = [596, 615, 1682, 1663, 1409, 1432]
adata = AnnData.concatenate(
*(adata_ref[i : i + 1000] for i in start),
adata = concat(
[adata_ref[i : i + 1000] for i in start],
join="outer",
batch_key="sample",
batch_categories=[f"sa{i}_Rep{j}" for i, j in product((1, 2, 3), (1, 2))],
label="sample",
keys=[f"sa{i}_Rep{j}" for i, j in product((1, 2, 3), (1, 2))],
index_unique="-",
)
adata.obs["time_points"] = adata.obs["sample"].str.split("_", expand=True)[0]
adata.obs["time_points"] = adata.obs["time_points"].astype("category")
Expand Down
Loading