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

calc_abc: don't change the element lists to hashes #919

Closed
shawnlaffan opened this issue Feb 21, 2024 · 0 comments
Closed

calc_abc: don't change the element lists to hashes #919

shawnlaffan opened this issue Feb 21, 2024 · 0 comments
Assignees
Labels
Refactor Code needs to be refactored
Milestone

Comments

@shawnlaffan
Copy link
Owner

The calc_abc subs return element_list1 and element_list2 as hash refs, desspite their being passed in as array refs.

The issue is that any calculation that does not require the full abc treatment to get the element lists cannot be sure if it is going to be passed arrays or hashes. This is because the precalc process lumps the arguments, so any other index that requires an abc calc will cause them to be converted to hashes.

To further confuse matters, element_list_all is an array ref.

The code needs to be audited to check if any of the methods that use element_list[12] need hashes. If not then we can change the type to arrays. If they do then we can add another method to return hashes.

@shawnlaffan shawnlaffan added the Refactor Code needs to be refactored label Feb 21, 2024
@shawnlaffan shawnlaffan added this to the Release_5.0 milestone Feb 21, 2024
@shawnlaffan shawnlaffan self-assigned this Feb 21, 2024
shawnlaffan added a commit that referenced this issue Feb 22, 2024
No need to calculate calc_abc for the phylo
variant.

This has the knock-on effect of needing to handle
arrays and hashes for the element_list[12] args.
The intent is to clean that up as part of issue #919.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Refactor Code needs to be refactored
Projects
None yet
Development

No branches or pull requests

1 participant