dandelion.utilities.read_10x_vdj

dandelion.utilities.read_10x_vdj(path, filename_prefix=None, prefix=None, suffix=None, sep='_', remove_malformed=True, remove_trailing_hyphen_number=False)[source]

A parser to read .csv and .json files directly from folder containing 10x cellranger-outputs.

This function parses the 10x output files into an AIRR compatible format.

Minimum requirement is one of either {filename_prefix}_contig_annotations.csv or all_contig_annotations.json.

If .fasta, .json files are found in the same folder, additional info will be appended to the final table.

Parameters:
  • path (Path | str) – path to folder containing .csv and/or .json files, or path to files directly.

  • filename_prefix (str | None, optional) – prefix of file name preceding ‘_contig’. None defaults to ‘all’.

  • 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_malformed (bool, optional) – whether or not to remove malformed contigs.

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

Returns:

Dandelion object holding the parsed data.

Return type:

Dandelion

Raises:

IOError – if contig_annotations.csv and all_contig_annotations.json file(s) not found in the input folder.