It is easy to obtain a list of an animal's relatives using pyp_metrics.related_animals():
list_a = pyp_metrics.related_animals(example.pedigree[6].animalID,example) list_b = pyp_metrics.related_animals(example.pedigree[13].animalID,example)
[5, 1, 2] [14, 5, 1, 2, 6, 3, 4]
list_r = pyp_metrics.common_ancestors(example.pedigree[4].animalID,example.pedigree[13].ani malID,example) print list_r
[1, 2, 5]
>>> set_a = set(list_a) >>> set_b = set(list_b) >>> set_c = set_a.intersection(set_b) >>> set_c set([1, 2, 5]) >>> list_c = list(set_c) >>> list_c [1, 2, 5]
>>> pyp_metrics.descendants(5,example,{})
{7: 7, 8: 8, 9: 9, 10: 10, 11: 11, 12: 12, 13: 13, 14: 14}
>>> pyp_metrics.founder_descendants(example)
{1: {5: 5, 7: 7, 8: 8, 9: 9, 10: 10, 11: 11, 12: 12, 13: 13, 14: 14},
2: {5: 5, 7: 7, 8: 8, 9: 9, 10: 10, 11: 11, 12: 12, 13: 13, 14: 14},
3: {6: 6, 7: 7, 8: 8, 9: 9, 10: 10, 11: 11, 12: 12, 13: 13, 14: 14},
4: {6: 6, 7: 7, 8: 8, 9: 9, 10: 10, 11: 11, 12: 12, 13: 13, 14: 14}}
See About this document... for information on suggesting changes.