Pangenome-based functional profiles for microbial communitiesd