dandelion.preprocessing.format_fastas

dandelion.preprocessing.format_fastas(fastas, prefix=None, suffix=None, sep=None, remove_trailing_hyphen_number=True, outdir=None)[source]

Adds prefix to the headers/contig ids in cellranger fasta and annotation file.

Parameters
  • fastas (Sequence) – list of paths to fasta files.

  • prefix (list, optional) – list of prefixes to append to headers/contig ids in each fasta file.

  • suffix (str, optional) – list of suffixes to append to headers/contig ids in each fasta file.

  • sep (str, optional) – separator after prefix or before suffix to append to the headers/contig ids.

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

  • outdir (str, optional) – path to out put location. Default is None, which is ‘dandelion/data’.

Returns

Return type

Formatted fasta file with new headers containing prefix