# Concatenate 4 anndata objects

**URL:** <https://discourse.scverse.org/t/concatenate-4-anndata-objects/792>\
**Category:** anndata\
**Created:** [October 4, 2022, 12:34pm UTC](https://discourse.scverse.org/t/concatenate-4-anndata-objects/792 "2022-10-04T12:34:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![nit29sin](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.scverse.org/nit29sin/32/392_2.png) [@nit29sin](https://discourse.scverse.org/u/nit29sin)\
**Post date:** [October 4, 2022, 12:34pm UTC](https://discourse.scverse.org/t/concatenate-4-anndata-objects/792/1 "2022-10-04T12:34:01Z")

</div>

How can I concatenate 4 .loom files? I have 4 loom files converted to anndata (an1, an2, an3, an4) , how can I concatenate them?

---

<div class="post-metadata">

**Author:** ![ivirshup](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.scverse.org/ivirshup/32/160_2.png) [@ivirshup](https://discourse.scverse.org/u/ivirshup)\
**Post date:** [October 4, 2022, 12:46pm UTC](https://discourse.scverse.org/t/concatenate-4-anndata-objects/792/2 "2022-10-04T12:46:40Z")

</div>

Something like:

```python
adatas = [ad.read_loom(path) for path in loom_paths]

combined = ad.concat(adatas) 

```

You can check out the docs here for more info:

- [Combining anndata objects](https://anndata.readthedocs.io/en/latest/concatenation.html#concatenation)
- [`ad.concat` API docs](https://anndata.readthedocs.io/en/latest/generated/anndata.concat.html#anndata.concat)
