scirpy.io.read_bd_rhapsody

scirpy.io.read_bd_rhapsody(path, dominant=False)

Read IR data from the BD Rhapsody Analysis Pipeline.

Supports *_perCellChain.csv, *_perCellChain_unfiltered.csv, *_VDJ_Dominant_Contigs.csv, and *_VDJ_Unfiltered_Contigs.csv files. The applicable filename depends your version of the BD Rhapsody pipeline.

Note

More recent versions of the pipeline generate data in standardized AIRR Rearragement format. If you have a chance to do so, we recommend reanalysing your data with the most recent version of the BD Rhapsody pipeline and read output filese with scirpy.io.read_airr().

*_perCell files are currently not supported, follow the IO Tutorial to import custom formats and make use of this snippet

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

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

Parameters
path : str | PathUnion[str, Path]

Path to the perCellChain or Contigs file generated by the BD Rhapsody analysis pipeline. May be gzipped.

Return type

AnnData

Returns

A AnnData instance with AIRR information stored in obs.