def readSif(fn):
    """reads in the sif file fn and ouptputs a 
    dictionary and a list:
    interDict : has "interaction" as key 
    and [(node1,node2), (node3,node4)] as values 
    nodes list : is the list of unique node names 
    (both on the right or left hand of an interaction)
    """
    interDict = {}
    nodes = []
    with open(fn, "r") as myfile:
        for line in myfile:
            line = line.strip()
            [n1,inter,n2] = line.split("\t")
            if inter not in interDict:
                interDict[inter] = [(n1,n2)]
            else:
                interDict[inter].append((n1,n2))
            
            if n1 not in nodes:
                nodes.append(n1)
            if n2 not in nodes:
                nodes.append(n2)
    
    return interDict,nodes