acidbase.basename_sans_ext

acidbase.basename_sans_ext(path: str | Path) str

Return the file basename without extension(s).

Strips recognised bioinformatics extensions and compression suffixes so that "sample.fastq.gz" becomes "sample".

Parameters:

path (str or Path) – File path.

Returns:

Basename with all recognized extensions removed.

Return type:

str