# Scvi.data.organize\_multiome\_anndatas with two big anndata objects

**URL:** <https://discourse.scverse.org/t/scvi-data-organize-multiome-anndatas-with-two-big-anndata-objects/2247>\
**Category:** scvi-tools\
**Tags:** integration, scvi, multivi\
**Created:** [May 1, 2024, 9:45am UTC](https://discourse.scverse.org/t/scvi-data-organize-multiome-anndatas-with-two-big-anndata-objects/2247 "2024-05-01T09:45:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![niuyw](https://avatars.discourse-cdn.com/v4/letter/n/b9e5f3/32.png) [@niuyw](https://discourse.scverse.org/u/niuyw)\
**Post date:** [May 1, 2024, 9:45am UTC](https://discourse.scverse.org/t/scvi-data-organize-multiome-anndatas-with-two-big-anndata-objects/2247/1 "2024-05-01T09:45:17Z")

</div>

Hi,

I am trying to use MultiVI with two different anndata objects for paired scRNA and scATAC. In the `organize_multiome_anndatas` step, I was following the tutorial from the [singl-cell best practice](https://www.sc-best-practices.org/multimodal_integration/paired_integration.html#multiome-data)

```py
adata_paired = ad.concat([rna.copy().T, atac.copy().T]).T
adata_paired.obs = adata_paired.obs.join(rna.obs[["cell_type", "batch"]])
adata_paired.obs["modality"] = "paired"
adata_paired

adata_mvi = scvi.data.organize_multiome_anndatas(adata_paired)

```

But this `ad.concat([rna.copy().T, atac.copy().T]).T` step requires huge memory and my jobs were always killed by the system. I was wondering if there are some ways to “bypass” this step.

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![cane11](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.scverse.org/cane11/32/241_2.png) [@cane11](https://discourse.scverse.org/u/cane11)\
**Post date:** [May 3, 2024, 8:46pm UTC](https://discourse.scverse.org/t/scvi-data-organize-multiome-anndatas-with-two-big-anndata-objects/2247/2 "2024-05-03T20:46:47Z")

</div>

Hi, first try would be:

> adata = ad.concat([rna, atac], axis=1)

There is also a function to do the merging on disk ([anndata.experimental.concat\_on\_disk — anndata 0.1.dev50+gb3763f8 documentation](https://anndata.readthedocs.io/en/latest/generated/anndata.experimental.concat_on_disk.html)). It also makes sense to subset to highly variable genes beforehand.
