Merge multiple 10x samples

I have three 10x samples I like to merge into one adata.

If I do adata1, adata2 amd adata3 for samples1, sample2 and sample3 and then adata=adata1.concatenate (adata2, adata3).

How can I keep the original sample names (sample1, sample2, sample3)?



1 Like

You should be able to just pass index_unique=None to AnnData.concatenate to keep your original observation names. E.g.:

adata = adata1.concatenate(adata2, adata3, index_unique=None)