path_utils#

Utility functions for working with paths

dir_to_sample_id(folder)[source]#

Get the sample ID from a directory

Parameters:

folder (str) – The directory to check

Returns

find_cells_df(target_dir)[source]#

Find the first feather file in target_dir

Parameters:

target_dir

Returns

find_density_file(target_dir)[source]#
find_file(target_dir, check_func, file_type_name)[source]#

Find the first file corresponding to check_func in target_dir

Parameters:
  • target_dir (str) – The directory to search

  • check_func (callable) – A function that takes a file name and returns a boolean

  • file_type_name (str) – The name of the file type to search for. This is used for error messages

Returns

is_density_file(f_name)[source]#
is_feather(f)[source]#

Check if a file is a feather file

Currently, this function only checks if the file ends with ‘cells.feather’

Parameters:

f (str or Path) – The file to check

Returns