cell2net.utils module#
- cell2net.utils.set_random_seed(seed=42)#
Set the random seed for reproducibility across various libraries.
- cell2net.utils.santize_str_for_filename(s)#
Sanitize a string to make it safe for use as a filename.
Remove invalid characters and spaces.
- Parameters:
s (str) – The input string to sanitize.
- Return type:
- Returns:
str The sanitized string, suitable for use as a filename.
Examples
>>> sanitize_str_for_filename("example (file)/name") ... "example_file_name"