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

confused results of gamma #19

Open
sandyplus opened this issue Feb 20, 2021 · 1 comment
Open

confused results of gamma #19

sandyplus opened this issue Feb 20, 2021 · 1 comment

Comments

@sandyplus
Copy link

Dear @pblischak ,
In your paper "HyDe: A python package for genome-scale Hybridization detection", it suggests that the gamma is the probabilities of P2.

However, in your source code, it suggested that gamma is the probabilities of P1:

cpdef dict test_triple(self, str p1, str hyb, str p2):
        """
        Main method for testing a hypothesis on a specified triple.
        ((P1,Hyb),P2)::math:`\gamma` and (P1,(Hyb,P2))::math:`1-\gamma`.
        ...
        """

Moreover, our results suggested that the gamma in out-filtered.txt should be the probabilities of P1 (I calculated gamma in out-filtered.txt manually, and found that the gamma = 1 - (AABB-ABAB)/(AABB+ABBA-2*ABAB)).

I am confused about the "gamma" in filtered-out.txt. Would you mind give me any suggestion?

Best regards,
Sandy

PS:
the test results:

P1 P1 Hybrid P2 Zscore Pvalue Gamma AAAA AAAB AABA AABB AABC ABAA ABAB ABAC ABBA BAAA ABBC CABC BACA BCAA ABCD
sp1 sp1 i6 sp3 1.593522109 0.055521558 0.074873654 895827 47673 45106 31853 4386 63858 15012 4055 16375 101188 5967 4019 5371 8899 411
sp1 sp1 i7 sp3 2.60956678 0.004532883 0.114143664 895408 48097 45525 31774 4041 63297 14669 3779 16873 101249 6128 4082 5653 9102 323
sp1 sp1 i8 sp3 2.962820534 0.00152424 0.122324308 893470 47230 47463 32558 4124 63085 14599 3916 17102 101899 5959 4065 5073 9103 354
sp1 sp1 i9 sp3 2.307708986 0.010507637 0.103607183 894791 48019 46142 31712 4181 63504 14789 3997 16745 101024 5926 4003 5758 9049 360
sp1 sp1 i10 sp3 1.771350954 0.038251133 0.080454255 894980 47790 45953 32129 3993 63940 14882 3933 16391 101904 6330 3921 4785 8772 297
@pblischak
Copy link
Owner

Hi Sandy,

Sorry for the long delay in responding! I've been trying to double check things to see where the discrepancy between the paper and the code arises and it's mainly in how things are ordered when the test is done.

The short answer is that you are correct that the gamma reported by HyDe is the proportion of the genome from P1.

I'll keep you posted of any changes but please also let me know if there is anything else

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

No branches or pull requests

2 participants