Skip to content

Commit

Permalink
enforce factor value order
Browse files Browse the repository at this point in the history
  • Loading branch information
oganm committed Jul 12, 2024
1 parent 1e36eba commit 1736402
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions gemmapy/_processors.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,11 @@ def process_dea(d):
baseline_factors = sub.process_FactorValueBasicValueObject(d[i].result_sets[j].baseline_group)

else:
factor_ids = [x.id for x in d[i].result_sets[j].experimental_factors]
factor_order = sub.order(factor_ids)
d[i].result_sets[j].experimental_factors = [d[i].result_sets[j].experimental_factors[k] for k in factor_order]
factor_ids = [factor_ids[k] for k in factor_order]

ids = list(map(lambda y: sub.field_in_list(y,'id'),
sub.field_in_list(exp_factors,"values")))
ids = [[x,y] for x in ids[0] for y in ids[1]]
Expand Down

0 comments on commit 1736402

Please sign in to comment.