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

Create API class to define the mapping between PhasedGenotypeState and NucleotideState #48

Open
walterxie opened this issue Feb 19, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@walterxie
Copy link
Collaborator

Encapsulate the mapping between PhasedGenotypeState and NucleotideState, and using the API method to replace the follow code in loops, such as int[] getNucIndex(int phasedGTInd) and PhasedGenotypeState getPhasedGenotypeState(NucleotideState parent1st, NucleotideState parent2nd)

for (int i = 0; i < numStates; i++) {

            int fromParent1State = i / 4;
            int fromParent2State = i % 4;
            for (int j = i + 1; j < numStates; j++) {
                int toParent1State = j / 4;
                int toParent2State = j % 4;

...
@walterxie walterxie added the enhancement New feature or request label Feb 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant