scirpy.io.from_airr_cells
- scirpy.io.from_airr_cells(airr_cells, include_fields=None)
Convert a collection of
AirrCell
objects toAnnData
.This is useful for converting arbitrary data formats into the scirpy Data structure.
Note
- Reading data into Scirpy has the following constraints:
Each cell can have up to four productive chains chains (Dual IR): two VJ and two VDJ chains.
Excess chains are ignored (those with lowest read count/UMI count) and cells flagged as Multichain-cell.
Non-productive chains are ignored.
Chain loci must be valid IMGT locus names.
Excess chains, non-productive chains, chains without a CDR3 sequence, or chains with invalid loci are serialized to JSON and stored in the
extra_chains
column. They are not used by scirpy except when exporting theAnnData
object to AIRR format.
For more information, see Immune receptor (IR) model.
- Parameters
- airr_cells :
Iterable
[AirrCell
] A list of
AirrCell
objects- include_fields :
Collection
[str
] |None
Optional
[Collection
[str
]] (default:None
) A list of field names that are to be transferred to
adata
. IfNone
(the default), transfer all fields. Use this option to avoid cluttering ofadata.obs
by irrelevant columns.
- airr_cells :
- Return type
- Returns