- scirpy.pp.merge_airr_chains(adata, adata2)
Merge two AnnData objects with IR information (e.g. BCR with TCR).
Decomposes the IR information back into
scirpy.io.AirrCellobjects and merges them on a chain-level. If both objects contain the same cell-id, and the same chains, the corresponding row in
adata.obswill be unchanged. If both objects contain the same cell-id, but different chains, the chains will be merged into a single cell such that it can be annotated as ambiguous or multi-chain if appropriate. If a cell contains both TCR and BCR chains, they will both be kept and can be identified as
The function performs a “left join”, i.e. all cells not present in
adatawill be discarded. Of
adata2the function only retains information from
To simply add IR information onto an existing
AnnDataobject with transcriptomics data, see
merge_with_ir()(this function can do this, too, but
merge_with_iris more efficient).