utils
Utility functions for pod5 tools
- assert_inputs_exist(inputs: Iterable[Path])[source]
Assert all inputs exist. Raises FileExistsError otherwise
- assert_no_duplicate_filenames(inputs: Collection[Path]) None[source]
Raises ValueError if there are duplicate filenames in the collection of Paths
- collect_inputs(paths: Iterable[Path], recursive: bool, pattern: Union[str, Collection[str]], threads: int = 2) Set[Path][source]
Returns a set of path which match any of the given glob-style `pattern`s
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 `pattern`s.
Raises FileExistsError if any inputs do not exist
- logged(log_return: bool = False, log_args: bool = False, log_time: bool = False)[source]
Logging parameterised decorator
- logged_all(func)
- search_path(path: Path, recursive: bool, patterns: Collection[str]) Set[Path][source]
Search path matching pattern searching directories recursively if requested
- search_paths(paths: Iterable[Path], recursive: bool, pattern: Union[str, Collection[str]], threads: int = 2) Set[Path][source]
Search all paths matching any of patterns searching directories recursively if requested