Skip to content

Join ancestral state annotations to sources strictly - #1206

Merged
jeromekelleher merged 1 commit into
tskit-dev:mainfrom
jeromekelleher:more-duncan-fixes
Oct 27, 2026
Merged

jeromekelleher merged 1 commit into
tskit-dev:mainfrom
jeromekelleher:more-duncan-fixes

Conversation

@jeromekelleher

Copy link
Copy Markdown
Member

The [ancestral_state] annotation was joined to the sources by position, silently treating ambiguous duplicate rows as unknown and only checking REF alleles at duplicate positions.

  • [ancestral_state] accepts include, exclude, regions and targets filters, applied as for sources.
  • More than one annotation variant at a site after filtering is an error.
  • Ancestral states ".", "N" and "" are unknown

Closes #1197

@codecov

codecov Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.42%. Comparing base (5f01f81) to head (756b262).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1206      +/-   ##
==========================================
+ Coverage   92.18%   92.42%   +0.24%     
==========================================
  Files          16       16              
  Lines        4834     4844      +10     
  Branches      770      766       -4     
==========================================
+ Hits         4456     4477      +21     
+ Misses        273      263      -10     
+ Partials      105      104       -1     
Flag Coverage Δ
C 82.61% <ø> (ø)
c-python 72.72% <ø> (ø)
python-tests 93.24% <100.00%> (+0.38%) ⬆️

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

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

The [ancestral_state] annotation was joined to the sources by position,
silently treating ambiguous duplicate rows as unknown and only checking
REF alleles at duplicate positions. Sources with inconsistent REF alleles
were dropped with a warning.

- [ancestral_state] accepts include, exclude, regions and targets filters,
  applied as for sources.
- More than one annotation variant at a site after filtering is an error.
- Any difference in REF allele at a site, between the sources or between
  the sources and the annotation, is an error naming the sources and
  position. Sources may have different ALT alleles.
- Ancestral states ".", "N" and "" are unknown, and sites with an unknown
  ancestral allele are skipped by augment_sites rather than polarised by
  parsimony.
@jeromekelleher
jeromekelleher merged commit d965371 into tskit-dev:main Oct 27, 2026
13 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.

Validate source compatibility before merging by position

1 participant