Skip to content

Calculate summary statistics for a given line#12

Merged
adamltyson merged 13 commits intomainfrom
km/historical_stats
Mar 10, 2026
Merged

Calculate summary statistics for a given line#12
adamltyson merged 13 commits intomainfrom
km/historical_stats

Conversation

@K-Meech
Copy link
Collaborator

@K-Meech K-Meech commented Mar 9, 2026

Description

What is this PR

  • Bug fix
  • Addition of a new feature
  • Other

Why is this PR needed?

Based on a csv file of historical data, we need to calculate various summary statistics for each line:

What does this PR do?

  • Adds a calculate_historical_stats_for_line function that takes a standardised dataframe, and calculates summary statisics for any given line name.
  • Adds tests for 1, 2 and 3 mutation examples (+ updated the relevant test data on gin to add further edge cases - like specific combinations of father ID x mother ID x date of birth)

References

Closes #2

How has this PR been tested?

Added tests for 1/2/3 mutation line statistics

Is this a breaking change?

No

Does this PR require an update to the documentation?

Docstrings have been updated

Checklist:

  • The code has been tested locally
  • Tests have been added to cover all new functionality
  • The documentation has been updated to reflect any changes
  • The code has been formatted with pre-commit

@K-Meech K-Meech requested a review from a team March 9, 2026 14:23
@adamltyson adamltyson merged commit d76da74 into main Mar 10, 2026
12 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.

Calculate breeding statistics from a csv of historical data

2 participants