bioflow.utils.general_utils package¶
Submodules¶
bioflow.utils.general_utils.debug_scripts module¶
bioflow.utils.general_utils.deprecated_id_translations module¶
bioflow.utils.general_utils.dict_like_configs_parser module¶
bioflow.utils.general_utils.high_level_os_io module¶
Saner io and filesystem manipulation compared to python defaults
-
bioflow.utils.general_utils.high_level_os_io.copy_if_doesnt_exist(source, destination)[source]¶ Copies a file if it does not exist
Parameters: - source –
- destination –
Returns:
bioflow.utils.general_utils.id_translations module¶
bioflow.utils.general_utils.internet_io module¶
Module responsible for retrieval of files stored on the internet. Requires some refactoring before can be considered a library in its onw right.
-
bioflow.utils.general_utils.internet_io.check_hash(file_path, expected_hash, hasher)[source]¶ Checks a expected_hash of a file :param file_path: :param expected_hash: :param hash_type: :return:
-
bioflow.utils.general_utils.internet_io.marbach_post_proc(local_directory)[source]¶ Function to post-process a specific online database that is rather quite unfriendly
Returns:
-
bioflow.utils.general_utils.internet_io.url_to_local(url, path, rename=None)[source]¶ Copies a file from an http or ftp url to a local destination provided in path while choosing a good decompression algorithm so far, only gunzipped ftp url downloads and path autocompletion only for non-compressed files are supported
Parameters: - url –
- path –
Raises: Exception – renaming for gunzip and zipped files is not supported
Returns:
-
bioflow.utils.general_utils.internet_io.url_to_local_p_gz(url, path)[source]¶ Copies a file from an http or ftp url to a local destination provided in path :param url: :param path: :raise Exception: something is wrong with the uri :return:
bioflow.utils.general_utils.useful_wrappers module¶
Contains a set of wrappers that are useful for debugging and operation profiling
-
bioflow.utils.general_utils.useful_wrappers.debug_wrapper(function_of_interest)[source]¶ Convenient wrapper inspecting the results of a function returning a single matrix
Parameters: function_of_interest – Returns: wrapped functions with copied name and documentation
-
bioflow.utils.general_utils.useful_wrappers.my_timer(message='', previous_time=[])[source]¶ A small timer to be used in code to measure the execution duration of elements of code
Parameters: - message –
- previous_time –
Returns: