Skip to content

More carefully define two-locus haplotypes in docs#3447

Open
apragsdale wants to merge 3 commits intotskit-dev:mainfrom
apragsdale:ld_doc_fix
Open

More carefully define two-locus haplotypes in docs#3447
apragsdale wants to merge 3 commits intotskit-dev:mainfrom
apragsdale:ld_doc_fix

Conversation

@apragsdale
Copy link
Copy Markdown
Contributor

As pointed out in #3445, there is room for improvement in defining the haplotype counts that are passed to the summary functions in the two-locus statistics methods. This more carefully defines those, following advice from @petrelharp, and clarifies the number of times summary functions are called for a given number of alleles at the left and right loci.

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 15, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.66%. Comparing base (c1f8d80) to head (a2c7979).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3447   +/-   ##
=======================================
  Coverage   91.66%   91.66%           
=======================================
  Files          38       38           
  Lines       32184    32184           
  Branches     5150     5150           
=======================================
  Hits        29503    29503           
  Misses       2348     2348           
  Partials      333      333           
Flag Coverage Δ
C 82.23% <ø> (ø)
c-python 77.54% <ø> (ø)
python-tests 96.40% <ø> (ø)
python-tests-no-jit 33.19% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
Python API 98.70% <ø> (ø)
Python C interface 91.23% <ø> (ø)
C library 91.24% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment thread docs/stats.md Outdated
{math}`n(a_i,\sim b_j)` is the number that carry the allele {math}`a_i`
and do not carry the allele {math}`b_j`, and
{math}`n(\sim a_i, b_j)` is the number that carry the allele {math}`b_j`
and do not carry the allele {math}`a_i`. We refer to these haplotypes
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Perhaps say something more concrete here? "We refer to these haplotypes" is not very precise (what haplotypes? "ai ~bj" is not a haplotype). You've set up this notation, now use it?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

And a concrete example would help?

Comment thread docs/stats.md Outdated
Comment on lines +1013 to +1014
derived alleles, as we do not compute the summary function for the ancestral
alleles. For unpolarised statistics, we compute the summary function over all
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

You don't mean "for the ancestral alleles" here, since no-where have you defined what it means to compute it "for" an allele. Don't you mean something like "the ancestral allele is not used as the focal allele", where "focal allele" is something that probably should have been defined earlier?

@petrelharp
Copy link
Copy Markdown
Contributor

Thanks for this. Good start, needs more preciseness.

@apragsdale
Copy link
Copy Markdown
Contributor Author

Gotta run to some things today, but tried to add some preciseness here. Thanks Peter.

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.

2 participants