Stool microbiota composition is related to clinical and immunological factors and to CD4 status of HIV-infected pneumonia patients. a Unsupervised hierarchical clustering (using Bray–Curtis dissimilarity (BC) and Ward 2 clustering) and abundance heat map of the top 20 bacterial families present in at least one sample at ≥ 3% relative abundance (ordered from highest to lowest abundance) indicate patterns of microbial co-colonization in stool. b Principal coordinates analysis (PCoA) of BC dissimilarity for n = 106 stool samples illustrates that dominant bacterial family explains a high degree of variation in bacterial microbiota composition [PERMANOVA, R2 = 0.319, p < 0.001; other = Streptococcaceae (covered by Enterococcaceae on left) and Porphyromonadaceae]. Mortality at hospital discharge is significantly associated with c stool Shannon’s diversity (Mann–Whitney U test, p < 0.01) and d CD4 count (cells μl−1; Mann–Whitney U test; p < 0.01). e CD4 count (cells μl−1) is significantly related to stool dominant bacterial family (Mann–Whitney U test; KW, p = 0.02; only families with > 2 samples are included in this analysis). f CD4 count (quartile 1 versus 4) is significantly related to stool Faith’s phylogenetic diversity. Similarity between lower airway and stool samples (Bray–Curtis paired distance) is significantly related to g mortality at hospital discharge (MW, p = 0.01) and h to stool Faith’s phylogenetic diversity (MW, p < 0.03) when grouped by quartiles and quartile 1 versus 4 are compared. PC, principal coordinate; PERMANOVA, permutational multivariate ANOVA; MW, Mann–Whitney U test