Changeset 563 for mds-and-trees


Ignore:
Timestamp:
08/05/16 23:15:07 (4 years ago)
Author:
konrad
Message:

updated to the new input format

File:
1 edited

Legend:

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

    r562 r563  
    5656        sline = line.split(' ', 2)
    5757        if len(sline) == 3:
    58             if sline[1] == "[CLONE]" or sline[1] == "[MUTANT]":
     58            if sline[1] == "[OFFSPRING]":
    5959                creature = json.loads(sline[2])
    6060                #print("B" +str(creature))
    61                 if "FromID" in creature:
    62                     nodes[creature["ToID"]] = creature["FromID"]
    63                     if not creature["FromID"] in nodes:
    64                         firstnode = creature["FromID"]
     61                if "FromIDs" in creature:
     62                    nodes[creature["ID"]] = creature["FromIDs"][0]
     63                    if not creature["FromIDs"][0] in nodes:
     64                        firstnode = creature["FromIDs"][0]
    6565
    6666    for k, v in sorted(nodes.items()):
Note: See TracChangeset for help on using the changeset viewer.