Pangenome-based functional profiles for microbial communities