booldog.io.tabularqual

Load TabularQual files.

Spec: https://github.com/sys-bio/TabularQual/blob/main/doc/TabularQual_specification_v0.1.2.docx

Uses the tabularqual package (optional sbml extra) to convert TabularQual spreadsheet files to SBML-qual, then loads them using the SBML-qual reader (booldog.io.sbml.read_sbmlqual()).

Attributes

_TABULARQUAL_AVAILABLE

logger

Classes

TabularQualReader

Reader for TabularQual files, via conversion to SBML-qual.

Functions

read_tabularqual(model_path[, validate])

Parse a TabularQual file into the data needed to construct a

Module Contents

booldog.io.tabularqual._TABULARQUAL_AVAILABLE = True
booldog.io.tabularqual.logger
class booldog.io.tabularqual.TabularQualReader(model_path, validate=True)

Reader for TabularQual files, via conversion to SBML-qual.

Requires the optional tabularqual package to be installed (part of the sbml extra).

Parameters:
  • model_path (str) – Path to the TabularQual spreadsheet file.

  • validate (bool, optional) – Whether tabularqual validates the annotations while converting (default True).

model_path

Path to the TabularQual spreadsheet file, as given at construction.

Type:

str

validate = True

Whether the annotations are validated while converting.

Type:

bool

read()

Convert the TabularQual file to SBML-qual (in a temporary file) and parse it with booldog.io.sbml.read_sbmlqual().

Returns:

data – Dictionary with keys "nodes", "modelinfo" and "primes" as returned by booldog.io.sbml.read_sbmlqual(). Suitable for BoolDogModel(**data).

Return type:

dict

booldog.io.tabularqual.read_tabularqual(model_path, validate=True)

Parse a TabularQual file into the data needed to construct a BoolDogModel.

Parameters:
  • model_path (str) – Path to the TabularQual spreadsheet file.

  • validate (bool, optional) – Whether tabularqual validates the annotations (identifiers.org namespaces and patterns, via sbmlutils) while converting; invalid annotations are reported but don’t stop the conversion. False skips the validation (faster, no messages). Default True.

Returns:

data – Dictionary with keys "nodes", "modelinfo" and "primes", as returned by TabularQualReader.read(). Suitable for BoolDogModel(**data).

Return type:

dict

Raises:

ImportError – If the optional tabularqual package is not installed.