dandelion.polars.io.read_airr

dandelion.polars.io.read_airr(file, prefix=None, suffix=None, sep='_', remove_trailing_hyphen_number=False, verbose=False)[source]

Reads a standard single-cell AIRR rearrangement file.

If you have non-single-cell data, use .load_polars first to load the data and then pass it to DandelionPolars. That will tell you what columns are missing and you can fill it out accordingly e.g. make up a cell_id.

Parameters:
  • file (Path | str) – path to AIRR rearrangement .tsv file.

  • prefix (str | None, optional) – Prefix to append to sequence_id and cell_id.

  • suffix (str | None, optional) – Suffix to append to sequence_id and cell_id.

  • sep (str, optional) – the separator to append suffix/prefix.

  • remove_trailing_hyphen_number (bool, optional) – whether or not to remove the trailing hyphen number e.g. ‘-1’ from the cell/contig barcodes.

  • verbose (bool, optional) – whether or not to print messages during creation of the Dandelion object.

Returns:

DandelionPolars object from AIRR file.

Return type:

DandelionPolars