dandelion.polars.preprocessing.format_fastas
- dandelion.polars.preprocessing.format_fastas(fastas, prefix=None, suffix=None, sep=None, remove_trailing_hyphen_number=True, high_confidence_filtering=False, out_dir=None, filename_prefix=None)[source]
Add prefix to the headers/contig ids in input fasta and annotation file.
- Parameters:
fastas (list[Path | str]) – list of paths to fasta files.
prefix (list[str] | None, optional) – list of prefixes to append to headers/contig ids in each fasta file.
suffix (list[str] | None, optional) – list of suffixes to append to headers/contig ids in each fasta file.
sep (str | None, optional) – separator after prefix or before suffix to append to the headers/contig ids.
remove_trailing_hyphen_number (bool, optional) – whether or not to remove the trailing hyphen number e.g. ‘-1’ from the cell/contig barcodes.
high_confidence_filtering (bool, optional) – whether or not to filter to only high confidence contigs.
out_dir (Path | str | None, optional) – path to output location.
filename_prefix (list[str] | str | None, optional) – list of prefixes of file names preceding ‘_contig’. None defaults to ‘all’.