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

Possibly replace missing with NaN in convert functions #18

Open
biona001 opened this issue Sep 27, 2020 · 0 comments
Open

Possibly replace missing with NaN in convert functions #18

biona001 opened this issue Sep 27, 2020 · 0 comments

Comments

@biona001
Copy link
Member

biona001 commented Sep 27, 2020

Currently convert_gt, convert_ht, and convert_ds represent missing data as missing. This causes the output genotype matrix to be of type Array{Union{Missing, T}, 2}. If we use NaN to represent missing instead, the output matrix type will be Array{Float64,2}, so BLAS will work by default. Is there any opinion on this?

It comes down to the following:

  • NaN only works for floating-point numbers (i.e. no more integer matrices)
  • NaN can be confusing because it can mean invalid math operations (e.g. division by 0) or the absence of a value.
  • We lose functions like skipmissing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant