Pangenome-based functional profile for microbial communities