Utility functionality (skbio.util)

This package provides general exception/warning definitions used throughout scikit-bio, as well as various utility functionality, including I/O and unit-testing convenience functions.

Testing functionality

Common functionality to support testing in skbio.

get_data_path(fn[, subfolder]) Return path to filename fn in the data folder.

Miscellaneous functionality

Generally useful functions that don’t fit in more specific locations.

cardinal_to_ordinal(n) Return ordinal string version of cardinal int n.
create_dir(dir_name[, fail_on_exist, ...]) Create a directory safely and fail meaningfully
flatten(items) Removes one level of nesting from items
is_casava_v180_or_later(header_line) Check if the header looks like it is Illumina software post-casava v1.8
remove_files(list_of_filepaths[, ...]) Remove list of filepaths, optionally raising an error if any are missing
safe_md5(open_file[, block_size]) Computes an md5 sum without loading the file into memory

Exceptions

TestingUtilError Raised when an exception is needed to test exception handling.

Warnings

EfficiencyWarning Warn about potentially accidental use of inefficient code.