sbmlsim.combine.sedml.data

Reading NUML, CSV and TSV data from DataDescriptions.

Module Contents

Classes

DataDescriptionParser

Class for parsing DataDescriptions.

Attributes

logger

sbmlsim.combine.sedml.data.logger[source]
class sbmlsim.combine.sedml.data.DataDescriptionParser[source]

Class for parsing DataDescriptions.

FORMAT_URN = 'urn:sedml:format:'[source]
FORMAT_NUML = 'urn:sedml:format:numl'[source]
FORMAT_CSV = 'urn:sedml:format:csv'[source]
FORMAT_TSV = 'urn:sedml:format:tsv'[source]
SUPPORTED_FORMATS[source]
classmethod parse(dd, working_dir=None)[source]

Parse single DataDescription.

Returns dictionary of data sources {DataSource.id, slice_data}

Parameters:
  • dd (libsedml.SedDataDescription) – SED-ML DataDescription

  • working_dir (pathlib.Path) – workingDir relative to which the sources are resolved

Returns:

dictionary of pandas.Series

Return type:

Dict[str, pandas.Series]

classmethod _determine_format(source_path, format=None)[source]

Determine format of file.

Parameters:
  • source_path (pathlib.Path) – path of file

  • format (Optional[str]) – format given in the DataDescription

Returns:

format str

Return type:

str

classmethod _load_csv(path)[source]

Read CSV data from file.

Parameters:

path (pathlib.Path) –

Return type:

pandas.DataFrame

classmethod _load_tsv(path)[source]

Read TSV data from file.

Parameters:

path (pathlib.Path) –

Return type:

pandas.DataFrame

classmethod _load_sv(path, separator)[source]

Load tsv/csv data from given source.

CSV files must have a header. Handles file and online resources.

Parameters:
  • path (pathlib.Path) –

  • separator (str) –

Return type:

pandas.DataFrame