parpe.hdf5_pe_input.HDF5DataGenerator

class parpe.hdf5_pe_input.HDF5DataGenerator(petab_problem, amici_model, verbose=1)[source]

Bases: object

Generate HDF5 file with fixed parameters and measurements for an AMICI-imported SBML model based on a PEtab problem.

amici_model

AMICI model for which to estimate parameters

petab_problem

PEtab optimization problem (will be modified in place)

compression

h5py compression to be used

condition_ids

numpy.array condition IDs (different condition vectors, both simulation and preequilibration)

num_condition_vectors

Number of condition vectors, including simulation and preequilibration. Not necessarily equal to the number of simulations.

unique_timepoints

time points for which there is data

f

h5py.File hdf5 file which is being created

__init__(petab_problem, amici_model, verbose=1)[source]

fileNameSBML: filename of model SBML file (PEtab-style) fileMeasurements: filename of measurement file fileFixedParameters: filename with AMICI fixed parameter vectors for

all conditions referred to in the measurement file

fileParameters: PEtab parameter table filename

Methods Summary

__init__(petab_problem, amici_model[, verbose])

fileNameSBML: filename of model SBML file (PEtab-style) fileMeasurements: filename of measurement file fileFixedParameters: filename with AMICI fixed parameter vectors for all conditions referred to in the measurement file fileParameters: PEtab parameter table filename

create_fixed_parameter_dataset_and_write_attributes(...)

Create fixed parameters data set and annotations

generate_file(hdf5_file_name)

Create the output file

get_index_mapping_for_par(mapped_parameter, ...)

Get index mapping for a given parameter

handle_offset_parameter(offset_candidates)

Write list of offset parameters selected for hierarchical optimization

write_measurements()

Write measurements to hdf5 dataset

Methods

__init__(petab_problem, amici_model, verbose=1)[source]

fileNameSBML: filename of model SBML file (PEtab-style) fileMeasurements: filename of measurement file fileFixedParameters: filename with AMICI fixed parameter vectors for

all conditions referred to in the measurement file

fileParameters: PEtab parameter table filename

create_fixed_parameter_dataset_and_write_attributes(fixed_parameter_ids, data)[source]

Create fixed parameters data set and annotations

Return type:

Dataset

generate_file(hdf5_file_name)[source]

Create the output file

Parameters:

hdf5_file_name (str) – filename of HDF5 file that is to be generated

Return type:

None

get_index_mapping_for_par(mapped_parameter, optimization_parameter_name_to_index)[source]

Get index mapping for a given parameter

Parameters:
  • mapped_parameter (Any) – value mapped to some model parameter

  • optimization_parameter_name_to_index (Dict[str, int]) – Dictionary mapping optimization parameter IDs to their position in the optimization parameter vector

Return type:

Tuple[int, float]

Returns:

Index of parameter to map to, and value for override matrix

handle_offset_parameter(offset_candidates)[source]

Write list of offset parameters selected for hierarchical optimization

write_measurements()[source]

Write measurements to hdf5 dataset

create_fixed_parameter_dataset_and_write_attributes(fixed_parameter_ids, data)[source]

Create fixed parameters data set and annotations

Return type:

Dataset

generate_file(hdf5_file_name)[source]

Create the output file

Parameters:

hdf5_file_name (str) – filename of HDF5 file that is to be generated

Return type:

None

get_index_mapping_for_par(mapped_parameter, optimization_parameter_name_to_index)[source]

Get index mapping for a given parameter

Parameters:
  • mapped_parameter (Any) – value mapped to some model parameter

  • optimization_parameter_name_to_index (Dict[str, int]) – Dictionary mapping optimization parameter IDs to their position in the optimization parameter vector

Return type:

Tuple[int, float]

Returns:

Index of parameter to map to, and value for override matrix

handle_offset_parameter(offset_candidates)[source]

Write list of offset parameters selected for hierarchical optimization

write_measurements()[source]

Write measurements to hdf5 dataset