Read data from TraCeR ([SLonnbergP+16]).

Requires the TraCeR output directory which contains a folder for each cell. Unfortunately the results files generated by tracer summarize do not contain all required information.

The function will read TCR information from the filtered_TCR_seqs/<CELL_ID>.pkl files.


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 the AnnData object to AIRR format.

For more information, see Immune receptor (IR) model.

path : str | PathUnion[str, Path]

Path to the TraCeR output folder.

Return type



AnnData object with TCR data in obs for each cell. For more details see Data structure.