6

I am looking for a good pseudo code - or better yet actual code snippets - on implementing wrights algorithm on a genealogy database I have for sheep stored in SQL Server database.

I have a very old C program that worked against a flat text file until the population got so large the algorithm broke - as the entire thing was done in memory, so an implementation against a database would be preferable...

Anyone seen anything like this they can point me to?

Jon Seigel
  • 12,251
  • 8
  • 58
  • 92
E.J. Brennan
  • 45,870
  • 7
  • 88
  • 116

2 Answers2

5

If you didn't want to roll your own, you could use the Python pypedal package for calculating the inbreeding coefficient, which supports SQL databases.

Pypedal's code for computing inbreeding coefficient is here.

fgregg
  • 3,173
  • 30
  • 37
0

In genealogy we refer to this as coefficient of relationship (COR). There is some java code for this designed for a Neo4j PlugIn at GitHub; it calls on other function there. It uses the path lengths between individuals to common ancestors to compute the COR. With inbreeding there are multiple common ancestors and "pedigree collapse" which is also much easier to svg visualization of the graphs.

David A Stumpf
  • 753
  • 5
  • 13