tumourkit.utils.preprocessing.get_names
- tumourkit.utils.preprocessing.get_names(path: str, pattern: str) List[str]
This function returns a list of all files in a directory located at <path> that contain the substring <pattern> in their name. The <pattern> substring is then removed from the names and the resulting list is returned.
- Parameters:
path (str) – The path of the directory to search in.
pattern (str) – The substring to search for in file names.
- Returns:
A list of file names without the <pattern> substring.
- Return type:
List[str]