-
Notifications
You must be signed in to change notification settings - Fork 32
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
Add mean imputation function #892
base: main
Are you sure you want to change the base?
Changes from all commits
2c903f2
259c1e9
ed6eaa8
1264861
3c5453e
f636587
4f66de3
4b0e01f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -214,6 +214,15 @@ def _check_field( | |
) | ||
) | ||
|
||
call_dosage_imputed, call_dosage_imputed_spec = SgkitVariables.register_variable( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure we want to create a whole new bunch of variables here. Wouldn't it be simpler if we returned a copy of the original dataset in which all the missing data for the variable in question was replaced with the mean, and the mask was unset? This would be more useful for downstream work, wouldn't it? We'd surely want to use the (say) imputed |
||
ArrayLikeSpec( | ||
"call_dosage_imputed", | ||
kind="f", | ||
ndim=2, | ||
__doc__="""Dosages imputed, encoded as floats, with NaN indicating a missing value.""", | ||
) | ||
) | ||
|
||
call_dosage_mask, call_dosage_mask_spec = SgkitVariables.register_variable( | ||
ArrayLikeSpec( | ||
"call_dosage_mask", | ||
|
@@ -293,6 +302,16 @@ def _check_field( | |
) | ||
) | ||
|
||
call_genotype_imputed, call_genotype_imputed_spec = SgkitVariables.register_variable( | ||
ArrayLikeSpec( | ||
"call_genotype_imputed", | ||
kind="f", | ||
ndim=3, | ||
__doc__=""" | ||
Call genotype imputed """, | ||
) | ||
) | ||
|
||
( | ||
call_genotype_probability, | ||
call_genotype_probability_spec, | ||
|
@@ -305,6 +324,19 @@ def _check_field( | |
) | ||
) | ||
|
||
( | ||
call_genotype_probability_imputed, | ||
call_genotype_probability_imputed_spec, | ||
) = SgkitVariables.register_variable( | ||
ArrayLikeSpec( | ||
"call_genotype_probability_imputed", | ||
kind="f", | ||
ndim=3, | ||
__doc__="""Genotype probabilities Imputed.""", | ||
) | ||
) | ||
|
||
|
||
( | ||
call_genotype_probability_mask, | ||
call_genotype_probability_mask_spec, | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be helpful to give a more descriptive follow up sentence here, like say