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

QC for Gamma_H17 (HomSap) #1100

Open
petrelharp opened this issue Nov 10, 2021 · 10 comments
Open

QC for Gamma_H17 (HomSap) #1100

petrelharp opened this issue Nov 10, 2021 · 10 comments
Labels
Milestone

Comments

@petrelharp
Copy link
Contributor

PR for new model: #1099
Original paper: https://doi.org/10.1073/pnas.1619508114

Potential issues that might lead to differences between the model implementations:
@chriscrsmith couldn't find the proportions that @xin-huang used in the paper.

QC'er requests: @xin-huang

@petrelharp petrelharp added the Model QC Quality control process for model addition label Nov 10, 2021
@xin-huang
Copy link
Member

Should I QC this DFE? The proportions is in the supplementary https://www.pnas.org/doi/full/10.1073/pnas.1619508114#supplementary-materials

@petrelharp
Copy link
Contributor Author

That'd be great!

@xin-huang
Copy link
Member

Hi @petrelharp

how to qc a DFE model? Should I follow the review process for demographic models and put the codes in ./stdpopsim/qc/HomSap.py ?

@grahamgower
Copy link
Member

This is a dupe of #1054.

@grahamgower grahamgower added DFE QC and removed Model QC Quality control process for model addition labels May 18, 2022
@petrelharp
Copy link
Contributor Author

I'll close this in favor of #1054, but it looks like we need to actually decide on a QC procedure and implement it - in #1055 we said that it should copy the demographic model QC method, but the first step is to write the code to do that. Do you feel up to starting that, @xin-huang?

@xin-huang
Copy link
Member

ok, but what are the codes here for ?

@petrelharp
Copy link
Contributor Author

ok, but what are the codes here for ?

That's doing a comparison of the output of a simulation with a DFE to what's expected in some other way. Instead, we're writing code so that someone can re-implement the DFEs independently and then the code will automatically compare the original implementation to the QC implementation, and error on discrepancies. How about I'll get this started?

@xin-huang
Copy link
Member

ok, but what are the codes here for ?

That's doing a comparison of the output of a simulation with a DFE to what's expected in some other way. Instead, we're writing code so that someone can re-implement the DFEs independently and then the code will automatically compare the original implementation to the QC implementation, and error on discrepancies. How about I'll get this started?

sounds good

@petrelharp
Copy link
Contributor Author

petrelharp commented Jan 18, 2025

Well, that was annoying, but I finally figured out where the proportions [0.3, 0.7] come from. It's here:
Image
confirmation:

> 1/(1 + 2.31)
[1] 0.3021148

Maybe the code should be changed to reflect this; i.e., instead of

        proportions=[
            0.3,
            0.7,
        ],  # [0.3 and 0.7 were used in Xin's analysis,
        #  but I couldn't find these values in the Huber paper]

do

# p. 2 in supplement says that the total sequence length of synonymous sites LS
# related to the total sequence length LNS by LNS = 2.31 * LS
proportion_synonymous = 1 / (1 + 2.31)
# <snip>
        proportions=[
            proportion_synonymous,
            1 - proportion_synonymous,
        ],

Hm - on second thought, 1 / (1 + 2.31) = 0.3021148036253776, so 0.3 is just as good and nicer to write, but we should put the explanation in.

@clararehmann
Copy link
Contributor

It looks like this is addressed by commit 8def1f7?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants