This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
from ete3 import Tree | |
import random | |
def get_json(node): | |
# Read ETE tag for duplication or speciation events | |
if not hasattr(node, 'evoltype'): | |
dup = random.sample(['N','Y'], 1)[0] | |
elif node.evoltype == "S": | |
dup = "N" |