scirpy.pp.merge_with_ir
- scirpy.pp.merge_with_ir(adata, adata_ir, on=None, **kwargs)
Merge adaptive immune receptor (IR) data with transcriptomics data into a single
AnnData
object.Reading in IR data results in an
AnnData
object with IR information stored inobs
. Use this function to merge it with anotherAnnData
containing transcriptomics data. To add additional IR data on top of on top of anAnnData
object that already contains IR information (e.g. BCR on top of TCR data.), seemerge_airr_chains()
.Merging keeps all objects (e.g.
neighbors
,umap
) fromadata
and integratesobs
fromadata_ir
intoadata
. Everything other than.obs
fromadata_ir
will be discarded.This function is a thin wrapper around
pandas.merge()
. The function performs a “left join”, i.e. all cells not present inadata
will be discarded.Modifies
adata
inplace.- Parameters
- adata :
AnnData
AnnData with the transcriptomics data. Will be modified inplace.
- adata_ir :
AnnData
AnnData with the adaptive immune receptor (IR) data
- on :
List
[str
] |None
Optional
[List
[str
]] (default:None
) Merge on columns in addition to ‘index’. Defaults to “batch” if present in both
obs
data frames.- **kwargs
Passed to
pandas.merge()
.
- adata :
- Return type