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

Develop functional tests for alt_allele_prob_file and est_alt_allele_prob with multiple metafounders #156

Merged

Conversation

XingerTang
Copy link
Contributor

#150

Since the main code is not updated, the test will fail.

There is some redundant/repetitive code in test_alt_allele_prob, it will be re-organized once the main code is done.


self.output = read_and_sort_file(self.output_file_path)

# check if the estimated alt_allele_prob is in between 0.5 and 1 (include 0.5 and exclude 1)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@XingerTang I have not looked at the input files, but is this what we expect for the input files - that alt allele prob will be [0.5, 1]?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gregorgorjanc It is specific to the test case and the test input data I designed. In general, the input values for alt allele prob should in [0, 1].

@gregorgorjanc
Copy link
Member

@XingerTang I looked at these additions, but I am struggling a bit how the different input files come together what should happen and what should be the correct result and hence assert test.

Can we meet at some point and discuss how to make these tests a bit more readable - maybe you just need to teach me what to look for;)

@XingerTang
Copy link
Contributor Author

@gregorgorjanc Sure :)

# est_alt_allele_prob_single: Test the option est_alt_allele_prob
# for a single metafounder
# est_alt_allele_prob_multiple: Test the option est_alt_allele_prob
# for a single metafounder
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@XingerTang change single here to multiple

RosCraddock and others added 10 commits January 15, 2024 15:28
Develop functional tests for alt_allele_prob_file and est_alt_allele_…
Test for Metafounders: single metafounder, two metafounders with separate pedigrees.
Accuracy test for pedigree with two MF that cross.
1. Renamed variables MF_A to MF_A_alt_allele_prob.
2. Added code to separate the base population based on alternative allele for assignment of two metafounders in crossing pedigree (see lines 365 onwards).
3. Pushed all the simulation files as requested.
4. Minor corrections
Update in simulation data for accuracy test to incorporate multiple metafounders
Copy link
Member

@gregorgorjanc gregorgorjanc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@RosCraddock can you help with R code review from @XingerTang?

@gregorgorjanc
Copy link
Member

Looks good so merging this in.

@gregorgorjanc gregorgorjanc merged commit 5189db1 into AlphaGenes:feat_metafounders Jun 10, 2024
0 of 3 checks passed
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

Successfully merging this pull request may close these issues.

3 participants