Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improve flatten overrides #42

Merged
merged 8 commits into from
Mar 19, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix grouping
  • Loading branch information
FFroehlich committed Mar 18, 2021
commit d90c7a1faf4264b2de118da70986543053f81ffb
2 changes: 1 addition & 1 deletion petab/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ def flatten_timepoint_specific_output_overrides(
for (obs_id, obs_pars, noise_pars), measurements in \
petab_problem.measurement_df.groupby([
OBSERVABLE_ID, OBSERVABLE_PARAMETERS, NOISE_PARAMETERS,
SIMULATION_CONDITION_ID, PREEQUILIBRATION_CONDITION_ID
], dropna=False):
replacement_id = \
f'{obs_id}__{obs_pars.replace(";", "_")}__' \
Expand Down Expand Up @@ -166,7 +167,6 @@ def flatten_timepoint_specific_output_overrides(
new_measurement_dfs.append(measurements)
new_observable_dfs.append(observable)


petab_problem.observable_df = pd.concat(new_observable_dfs, axis=1).T
petab_problem.observable_df.index.name = OBSERVABLE_ID
petab_problem.measurement_df = pd.concat(new_measurement_dfs)
Expand Down