utils
Utility functions for pod5 tools
assert_inputs_exist
Assert all inputs exist. Raises FileExistsError otherwise
assert_no_duplicate_filenames
Raises ValueError if there are duplicate filenames in the collection of Paths
collect_inputs
collect_inputs(
paths: Iterable[Path],
recursive: bool,
pattern: Union[str, Collection[str]],
threads: int = DEFAULT_THREADS,
) -> Set[Path]
Returns a set of path which match any of the given glob-style patterns
If a path is a directory this will be globbed (optionally recursively).
If a path is a file then it must also match any of the given patterns.
Raises FileExistsError if any inputs do not exist
is_disable_pbar
Check if POD5_PBAR is set returning true if PBAR should be disabled
limit_threads
Santise and limit the number of requested threads to the number of logical cores
logged
Logging parameterised decorator
search_path
Search path matching pattern searching directories recursively if requested
pl_format_empty_string
Empty strings are read as a pair of double-quotes which need to be removed
pl_from_arrow
Workaround failure to read our arrow extension type