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.
- Attributes:
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 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 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
- Arguments:
hdf5_file_name: 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
- Arguments:
mapped_parameter: value mapped to some model parameter optimization_parameter_name_to_index: Dictionary mapping
optimization parameter IDs to their position in the optimization parameter vector
- Returns:
Index of parameter to map to, and value for override matrix
- Return type
Tuple
[int
,float
]
-
handle_offset_parameter
(offset_candidates)[source]¶ Write list of offset parameters selected for hierarchical optimization
-
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
- Arguments:
hdf5_file_name: 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
- Arguments:
mapped_parameter: value mapped to some model parameter optimization_parameter_name_to_index: Dictionary mapping
optimization parameter IDs to their position in the optimization parameter vector
- Returns:
Index of parameter to map to, and value for override matrix
- Return type
Tuple
[int
,float
]