Efficient and scalable algorithms for phylogenomics and overlapping communities