How to use the petab.core.split_parameter_replacement_list function in petab

To help you get started, we’ve selected a few petab examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ICB-DCM / pyPESTO / pypesto / petab / importer.py View on Github external
for _, row in df_for_time.iterrows():
                    observable_ix = observable_ids.index(
                        f'observable_{row.observableId}')

                    if observable_ix in time_ix_for_obs_ix:
                        time_ix_for_obs_ix[observable_ix] += 1
                    else:
                        time_ix_for_obs_ix[observable_ix] = time_ix_0
                    time_ix = time_ix_for_obs_ix[observable_ix]

                    # overrides
                    observable_overrides = \
                        petab.core.split_parameter_replacement_list(
                            row.observableParameters)
                    noise_overrides = \
                        petab.core.split_parameter_replacement_list(
                            row.noiseParameters)

                    # try to insert if hierarchical parameter
                    for override in observable_overrides + noise_overrides:
                        hierarchical_problem.insert_for_id(
                            override, condition_ix, time_ix, observable_ix)
        print([(x.id, x.indices) for x in hierarchical_problem.xs])
github ICB-DCM / pyPESTO / pypesto / petab / importer.py View on Github external
time_ix_for_obs_ix = {}
                
                for _, row in df_for_time.iterrows():
                    observable_ix = observable_ids.index(
                        f'observable_{row.observableId}')

                    if observable_ix in time_ix_for_obs_ix:
                        time_ix_for_obs_ix[observable_ix] += 1
                    else:
                        time_ix_for_obs_ix[observable_ix] = time_ix_0
                    time_ix = time_ix_for_obs_ix[observable_ix]

                    # overrides
                    observable_overrides = \
                        petab.core.split_parameter_replacement_list(
                            row.observableParameters)
                    noise_overrides = \
                        petab.core.split_parameter_replacement_list(
                            row.noiseParameters)

                    # try to insert if hierarchical parameter
                    for override in observable_overrides + noise_overrides:
                        hierarchical_problem.insert_for_id(
                            override, condition_ix, time_ix, observable_ix)
        print([(x.id, x.indices) for x in hierarchical_problem.xs])