pydruglogics.utils.BNetworkUtil
It provides file I/O, string parsing, Boolean network (BNet) conversions, and network interaction handling.
- pydruglogics.utils.BNetworkUtil.BNetworkUtil.get_file_extension(file_name)
Get the file extension from a filename.
- pydruglogics.utils.BNetworkUtil.BNetworkUtil.remove_extension(file_ext)
Remove the extension from a filename and return the base name.
- pydruglogics.utils.BNetworkUtil.BNetworkUtil.read_lines_from_file(file_name, skip_empty_lines_and_comments=True)
Read all lines from a file. Optionally skip empty lines and comments (lines starting with ‘#’).
- pydruglogics.utils.BNetworkUtil.BNetworkUtil.is_numeric_string(value)
Check if a value is a numeric string, int, or float.
- pydruglogics.utils.BNetworkUtil.BNetworkUtil.parse_interaction(interaction)
Parse a network interaction string (e.g., from a SIF file) into a dictionary representation.