def separateLeafNameFromLeafAnnotation( leafName , sepSp = "_" , sepAnnot = (".","@") ):
    """
    Takes:
        - leafName (str) : name of a leaf, potentially containing reconciliation information (exemple: "g_g3.T@4|3@1|g" )
        - sepSp (str) [default = "_" ] : separator between species name and gene name
        - sepAnnot (tuple) [default = (".","@") ] : possible separators between gene name and annotations

    Returns:
        (tuple)
            (str) : gene name
            (str) : reconciliation annotation  (empty string if there is none)

    """

    spName, j , gNameAndAnnot = leafName.partition( sepSp )

    x = 0
    AnnotFound = False

    while (not AnnotFound) and (x < len(gNameAndAnnot)):

        if gNameAndAnnot[x] in sepAnnot:
            AnnotFound=True
            break

        x+=1
    #print "->", leafName[:x] , leafName[x:]
    return spName + sepSp + gNameAndAnnot[:x] , gNameAndAnnot[x:]