I have a number of gene families and a species tree. I would like to map each character back onto the tree , to find out where the family first emerged i.e. the common ancestor of all members of the gene family. I have a presence/absence matrix for each family and there are may families - so need something that can scale well. Any ideas ?
I tried to use the ete package's function "get_common_ancestor" but this cannot account for independent gains within a family i.e. it just finds the common ancestor of all the genes with disregard for the number of losses. This is overly simplistic and unrealistic.
Can anyone point me in a direction to help solve my problem ?