dandelion.preprocessing.format_fasta

dandelion.preprocessing.format_fasta(fasta, 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
  • fasta (str) – path to fasta file.

  • prefix (str, optional) – prefix to append to the headers/contig ids.

  • suffix (str, optional) – suffix to append to the headers/contig ids.

  • 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 output location. None defaults to ‘dandelion/data’.

Returns

Return type

Formatted fasta file with new headers containing prefix