Changeset 707


Ignore:
Timestamp:
09/30/17 14:53:15 (7 years ago)
Author:
konrad
Message:

Added a warning message about merging nodes with a virtual parent node.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • mds-and-trees/tree-genealogy.py

    r702 r707  
    698698        default_props = ["Time", "FromIDs", "ID", "Operation", "Inherited"]
    699699
     700        merged_with_virtual_parent = []
     701
    700702        self.ids = {}
    701703        def get_id(id, createOnError = True):
     
    773775                                parent_id = get_id(creature["FromIDs"][i])
    774776                            else:
     777                                if creature["FromIDs"][i] not in merged_with_virtual_parent:
     778                                    merged_with_virtual_parent.append(creature["FromIDs"][i])
    775779                                parent_id = get_id("virtual_parent")
    776780                            inherited = (creature["Inherited"][i] if 'Inherited' in creature else 1)
     
    806810                break
    807811
     812        print("WARNING: merging individuals: " + str(merged_with_virtual_parent) + " with a virtual parent node!")
     813
    808814        for k in range(len(self.parents)):
    809815            v = self.parents[k]
Note: See TracChangeset for help on using the changeset viewer.