Skip to content

Commit 4bc19bb

Browse files
committed
Fix assumption of variants dimension order in test_gwas_linear_regression__validate_statistics
1 parent 34da400 commit 4bc19bb

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

sgkit/tests/test_association.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,10 @@ def _get_statistics(
133133
)
134134
res = _sm_statistics(ds, i, add_intercept)
135135
df_pred.append(
136-
dsr.to_dataframe()
136+
dsr.isel(variants=i)
137+
.to_dataframe()
137138
.rename(columns=lambda c: c.replace("variant_linreg_", ""))
138-
.iloc[i]
139+
.iloc[0]
139140
.to_dict()
140141
)
141142
# First result in satsmodels RegressionResultsWrapper for

0 commit comments

Comments
 (0)