-
Notifications
You must be signed in to change notification settings - Fork 35
Standardize how intermediate variables are handled #286
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
Comments
In terms of library semantics, I agree it would be considerably simpler if left out the default calculations like this. I'm starting to view the current API as the "expert's" low-level interface, which hopefully we can build something more high-level on top of (at some point), so I think it would be better if we left out user-convenience stuff like this and focused on keeping things simple and efficient. Anyway, yes, I agree, let's ditch the automatic intermediate value calculation.s |
+1 to removing default calculations. |
Taken to its logical conclusion, this would mean that to calculate |
That does seem annoying, and would lead to ugly user code. What's the alternative? -Should we start thinking about the "sgkit-lite" easy interface now? |
From the call, there was agreement on trying this instead:
|
Fixed in #360 (and previous issues for the implementation) |
We currently have several functions with logic like this (from here):
What should we do though if a non-default variable name is provided and that variable doesn't exist in the original dataset? In this case above the code would fail on
ds_new[allele_counts]
. There is also the question of whether or not intermediate variables like this should be in the result or not, which I believe @tomwhite has mentioned before. We have it both ways in the code. Lastly, ifcount_variant_alleles
had any optional behavior (e.g. flags for handling partial calls differently), it wouldn't necessarily make sense for us to use the default behavior transparently like this.At this point, I'm inclined to say we should remove default calculations altogether and require that the variables are present in the first place. What do you think of that @tomwhite / @jeromekelleher / @ravwojdyla?
The text was updated successfully, but these errors were encountered: