{'fraction_non_alphanumeric': 0.04069662515791373, 'fraction_numerical': 0.021566504241111714, 'mean_word_length': 5.14547134935305, 'pattern_counts': {'":': 0, '<': 18, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Characteristic gut microbiota and metabolic changes in patients with pulmonary tuberculosis

Summary Intestinal flora provides an important contribution to the development of pulmonary tuberculosis (PTB). We performed a cross‐sectional study in 52 healthy controls (HCs) and 83 patients with untreated active PTB to assess the differences in their microbiomic and metabolic profiles in faeces via V3‐V4 16S rRNA gene sequencing and gas chromatography–mass spectrometry. Patients with PTB had considerable reductions in phylogenetic alpha diversity and the production of short‐chain fatty acids, dysbiosis of the intestinal flora and alterations in the faecal metabolomics composition compared with HCs. Significant alterations in faecal metabolites were associated with changes in the relative abundance of specific genera. Our study describes the imbalance of the gut microbiota and altered faecal metabolomics profiles in patients with PTB; the results indicate that the gut microbiota and faecal metabolomic profiles can be used as potential preventive and therapeutic targets for PTB.


Introduction
Human tuberculosis (TB) caused by Mycobacterium tuberculosis (Mtb) is the leading global cause of death among those attributable to a single pathogen. TB resulted in the deaths of approximately 1.5 million people in 2018. A quarter of the global population is infected with TB, and approximately 3-5% of these individuals will develop active TB during their lifetime. Additionally, China has the second highest burden of multidrug-resistant tuberculosis (MDR-TB), accounting for 14% of the global cases of TB (WHO, 2019). Moreover, the emergence of drug-resistant Mtb and a rise in TB-human immunodeficiency virus (HIV) coinfection poses a substantial threat to public health.
The human gut microbiome (GM) is characterized by diverse microbial communities of multiple phyla of bacteria, archaea, viruses and microbial eukaryotes (Reyes et al., 2012;Thomas et al., 2017), which play a significant role in human health (Qin et al., 2010;Jiang et al., 2019). GM is known to influence the energy metabolism of the host (Turnbaugh et al., 2009;Robertson et al., 2018) and indirectly or directly promote the maturation of immune cells and normal development of immune function (Spiljar et al., 2017). For example, modulation of macrophage-inducible C-type lectin (Mincle) by gut bacteria plays important roles in the regulation of the immune response to Mtb that is dependent on dendritic cells (DC) in the lung (Negi et al., 2019). Existing evidence led researchers to investigate cross-talk between the intestinal bacteria and the lung, which is defined as the gut-lung axis (Budden et al., 2017). Dysbiosis of the intestinal microbiota is relevant to numerous lung diseases, such as chronic obstructive pulmonary disease (COPD) (Rutten et al., 2014), asthma (Lee-Sarwar et al., 2019), H7N9 virus infection (Qin et al., 2015) and Staphylococcus aureus pneumonia (Gauguet et al., 2015).
Substantial evidence obtained in animals and humans indicates that Mtb infection drives intestinal microbial dysbiosis characterized by changes in the abundance of specific taxa, particularly bacteria that produce shortchain fatty acids (SCFAs), such as Ruminococcus and Bifidobacterium (Khan et al., 2016;, Namasivayam et al., 2019. Potential limitation of Mtb by indole propionic acid produced by the intestinal bacteria has been demonstrated in vitro and in vivo (Negatu et al., 2019). The present study investigated the potential correlations between the host, diet and intestinal bacteria by analysing the faecal metabolic profiles using untargeted gas chromatography-mass spectrometry (GC-MS) combined with high-throughput sequencing of the 16S rRNA gene. This integrated omics analysis was used to assess whether pulmonary tuberculosis (PTB) is related to the changes in the composition and function of microbiota and to determine the mechanism of these associations, aiming to identify the candidate biomarkers for PTB.

Cholesterol levels were decreased in PTB patients
Eighty-three patients diagnosed with untreated active PTB and 52 age-and sex-matched healthy controls (HCs) were enrolled in this study. Table 1 presents the detailed clinical characteristics of all subjects. With the exception of blood glucose (BG) and albumin (Alb) levels, other characteristics, including the serum levels of total cholesterol (Tch) (P < 0.001), high-density lipoprotein cholesterol (HDL) (P = 0.04997), low-density lipoprotein cholesterol (LDL) (P = 0.002), and very-lowdensity lipoprotein cholesterol (VLDL) (P < 0.001), were significantly lower in patients than in HCs.
Mtb infection decreased the alpha diversity and affected the composition of the gut microbiome A sequencing run generated 11 448 333 reads, and 94.56% of these reads (10 822 567 reads) passed the quality screening. The reads were clustered into 875 operational taxonomic units (OTUs) based on a similarity of 97%. A Venn diagram showed that 99 OTUs and 74 OTUs were unique in the HC and PTB groups respectively (Fig. 1B).
Microbiota diversity was then evaluated using the following indexes: Chao1, ACE, Shannon, Simpson and observed species. The rarefaction cures for the two groups showed the number of identified OTUs approached a plateau, indicating that the bacterial diversity of the intestinal flora in the HC group was higher than that in the PTB group (Fig. S1B). In addition, the number of observed species in PTB patients was markedly lower than that in HCs (254.02 AE 44.65 vs. 206.17 AE 52.17, respectively, P = 9.78e-8) (Fig. S1A), and the alpha diversity, which was assessed by the Chao1, ACE, Shannon and Simpson indexes, was significantly lower in the PTB group than in the HC group (P = 1.70e-7, 1.06e-7, 7.90e-5, and 0.0021 respectively) (Fig. 1A). The results of the principal coordinate analysis (PCoA) based on unweighted UniFrac (Adonis, P < 0.01) (Fig. 1C) and non-metric multidimensional scaling (NMDS) based on unweighted UniFrac (stress value = 0.191, MRPP, P < 0.01) (Fig. S1C) indicated that the dissimilarity maintained a tendency of separation and showed partial overlap between PTB patients and HCs.

The microbial abundance was shifted in the PTB group
Metastat-based and linear discriminant analysis (LDA) effect size (LEfSe) analyses were performed to identify different distributions of the faecal microbiota. The PTB and HC groups had statistically significant differences in five predominant phyla: Firmicutes, Bacteroidetes, Actinobacteria, Fusobacteria and Verrucomicrobia. The relative abundances (proportions) of Firmicutes and Bacteroidetes were 63.81% and 27.82% in the HC group and 48.84% and 44.92% in the PTB group respectively ( Fig. 2A).
LEfSe analysis was used to identify the key phenotypes contributing to the differences between the groups. According to the LDA score, the optimal-enriched taxa in the stool microbiome of the PTB group were Bacteroidales, Prevotellaceae and Bacteroides vulgatus, whereas Firmicutes, Clostridiales, Lachnospiraceae, Ruminococcaceae, Actinobacteria, Bifidobacteriales and Blautia were more abundant in the HCs (Fig. 2D).

Untargeted metabolomics profiles
Faecal metabolite assessment was performed in all participants, and a total of 744 different features were examined. To further characterize the overall metabolomic changes, we performed PCA, and an OPLS-DA of the faecal profiles showed distinct clusters in the PTB Fig. 1. Comparison of the intestinal microbiota richness and diversity in patients with PTB versus healthy controls. A. The alpha diversity was assessed using the ACE, Chao1, Shannon and Simpson indexes, which showed significant differences between the PTB and HCs groups. ***P < 0.001. B. Venn diagram showing the shared and unique operational taxonomic units (OTUs) in the flora of the two groups. C. A PCoA based on Unweighted Unifrac distance showed that the distribution of the microbial community in the PTB group was strikingly different from that of the HCs group (P < 0.01). PCoA, principal coordinate analysis; PTB: pulmonary tuberculosis; HCs: healthy controls. and HC groups, indicating that Mtb infection alters the metabolomic profile. Moreover, the two groups clearly segregated along PC1, accounting for 35.7% of the variance (Fig. 3A). The OPLS-DA of the faecal metabolomic profile (R2X = 0.456, Q2 = 0.752) demonstrated more pronounced differences between the PTB and HC groups than with those obtained with the PCA models ( Fig. 3B). To prevent overfitting, sevenfold cross-validation and 200 response permutation tests were employed to validate the model, indicating that the original models had better predictive power than the newly calculated OPLS-DA models based on randomly assigning class labels (Q2inter = À0.412).
Significant metabolites were identified based on the OPLS-DA model with VIP values > 1 and P values < 0.05 (two-tailed Student's t-test). As shown in Fig. 3C, the metabolic phenotype of patients with PTB was characterized by alterations in 26 faecal metabolites (Table S1), including 17 elevated and nine downregulated metabolites, and these metabolites are involved in the following pathways: ABC transporters, phenylalanine metabolism, taurine and hypotaurine metabolism, phosphatidylinositol signalling system, sulfur metabolism, galactose metabolism, inositol phosphate metabolism, primary bile acid biosynthesis, ascorbate and aldarate metabolism, steroid biosynthesis, glycine, serine and threonine metabolism, neuroactive ligand-receptor interaction, aminoacyl-tRNA biosynthesis, cysteine and methionine metabolism, tyrosine metabolism, carbon metabolism, biosynthesis of amino acids and neuroactive ligand-receptor interaction.

Mtb infection decreased the production of SCFAs in faeces
The levels of isobutyric acid, butyric acid, 2-metylbutic acid and valeric acid were markedly lower in the PTB group than in the HCs (P < 0.0001, P < 0.05, P < 0.0001, P < 0.0001, respectively, Fig. 4), whereas the level of propionic acid was non-significantly lower in the PTB group than in the HCs (P > 0.05). However, no significant elevation in acetic acid concentration was noticed in the PTB group.

Discriminant models of PTB based on tree-based features
To further explore the diagnostic value of the faecal microbiome for PTB, we constructed a random forestbased classification model to accurately distinguish PTB patients from HCs. A 10-fold cross-validation used a training dataset (n = 94), which included 58 PTB patients and 36 healthy controls, to select specific genus markers, and 30 genus markers were selected from each sample based on the results. The training of the random forest classifier involved the calculation of the feature importance of these 30 genera and their relative abundances (Table S2), and the features were ranked according to their contribution to the model. The vital genera identified based on the model were described based on a mean decrease in the Gini index (Fig. 5A).
The area under the curve (AUC) obtained using the training datasets was 0.872 (95% confidence interval (CI): 0.804-0.94), showing that patients with PTB could be successfully distinguished from the HCs (Fig. S2). Based on the test set, the probability index (POBD) value obtained for patients with PTB was markedly higher than that obtained for the HCs (P < 0.001) (Fig. 5B). Consistent with this finding, the AUC of the receiver operating characteristic (ROC) curve for the test dataset (n = 41) was 0.851 (95% CI: 0.737-0.965) (Fig. 5C). ROC analysis was used to verify the diagnostic ability of these biomarkers. The AUC values for four genera, Fusobacterium (AUC = 0.738), Fusicatenibacter (AUC = 0.789), Tyzzerella (AUC = 0.732) and Anaerotruncus (AUC = 0.707), were higher than 0.7, suggesting that the diagnostic efficacy was adequate (Fig. S3A). The model including all four genera had a relatively better diagnostic ability (AUC = 0.81) (Fig. S3B). We also constructed a random forest classifier to specify the diagnosis of PTB based on various faecal metabolites. A training set (n = 94) was used to determine the significant metabolite markers; the results of 10-fold cross-validation identified 12 differential metabolites (Table S3). As shown in Fig. 5D, a mean decrease in the Gini index-based feature importance was determined for each of the 12 parameters involved in the model. The ROC curve analysis of the training set revealed that the classifier model had an outstanding performance with regard to predicting PTB, with an AUC of 0.993 (95% CI: 0.982-1; Fig. S2). A significantly higher POBD value was obtained in the test set for the PTB patients than for the HCs (P = 5.62e-08) (Fig. 4GE). Interestingly, the AUC-ROC obtained in the test set (n = 41) was 0.998 (95% CI: 0.991-1; Fig. 4F). A total of 12 metabolites showed potential diagnostic value, with AUC values above 0.9, and the models based on a combination of top five metabolites according to the Gini index, namely 1-tetracosanol, 3-hydroxypicolinic acid, behenic acid, pyrophosphate and tromethamine, demonstrated fair discrimination for PTB (AUC = 0.996) ( Fig. 3C and D).

Correlations between the gut microbiota and other data
To further explore the correlation between the genera and various indicators, including faecal metabolites and biochemical parameters, we conducted Spearman correlation analysis (Fig. 6A). TG was positively correlated with 4 genera that were enriched in HCs, namely Blautia, Megasphaera, Rhodococcus and Bilophila (P < 0.05). The levels of Tch, LDL and VLDL were positively associated with Rhodococcus, Romboutsia, Gordonibacter and Fusicatenibacter and negatively associated with Cetobacterium, Weissella, Dorea and Campylobacter. Moreover, HDL was positively correlated with Ezakiella and Elusimicrobium, and Glu was negatively correlated with Dorea and Blautia.

Discussion
In general, the diversity and taxonomic numbers of the intestinal microbiota in patients with PTB were significantly lower than those in HCs, which was consistent with the observed loss of metabolic diversity and indicated that the levels of the metabolites, such as SCFAs, and the metabolite classes were considerably reduced in the PTB group. Our study is one of the first to demonstrate PTB-related alterations in the human intestinal bacteria and metabolism using integrated multiomics data; our findings may provide inspiration for future disease diagnosis and intervention.
Consistent with previous studies, our microbiome analyses revealed a disrupted microbiota in patients with PTB, and this disruption involved a significant decrease in the predominant bacterial species and a reduced bacterial diversity . Consistent with these findings, Khan et al. (2016) previously reported that antibiotic-mediated gut dysbiosis can promote Mtb infection and dissemination, which is closely related to   6. Correlation analysis between gut microbial and biochemical parameters (A) and faecal metabolites (B). The depth of the colour in the heat maps signifies the strength of the correlation: red represents a positive correlation, whereas blue indicates a negative correlation. *P < 0.05, **P < 0.01, ***P < 0.001. Green colour represents features enriched in PTB group, while red colour represents features enriched in HCs. HCs, healthy controls; PTB, pulmonary tuberculosis. decreases in interferon gamma (IFN-c)-and tumour necrosis factor-alpha (TNF-a)-releasing CD4 T cells and an increase in Tregs observed in a mouse model of infection. The data obtained in our study indicated considerable downregulation of the abundances of beneficial bacterial phylum Firmicutes and various genera, such as Bifidobacterium, Blautia, Butyricimonas, Ruminococcus, Roseburia and Dorea, in the PTB samples; these findings suggested that dysregulation occurs in patients with PTB. These genera were reported to influence the production of SCFAs, particularly acetic, propionic and butyric acids (Estaki et al., 2016;Rivi ere et al., 2016). In our study, Mtb infection contributed to a decrease in the production of SCFAs, such as propionic acid, butyric acid, isobutyric acid, 2-metylbutic acid and valeric acid, in faeces, which is consistent with the findings of a previous study . SCFAs, particularly butyrate, inhibit inflammation through various effects, such as the induction of Tregs, maintenance of the intestinal epithelial barrier integrity and provision of energy to intestinal cells (Sun et al., 2017).
Significantly lower TG, HDL, LDL and VLDL levels are other interesting characteristics of patients with PTB, which may result from a decrease in the protein and fat intake due to a loss of appetite resulting from the infection. Downregulation of these parameters was also correlated with the degree of smear positivity (Deniz et al., 2007). Moreover, a cholesterol-rich diet is advantageous for accelerating smear-negative sputum conversion (P erez- Guzm an et al., 2005). In this study, the serum levels of cholesterol (VLDL and LDL) and Tch were positively correlated with the abundances of Romboutsia and Gordonibacter and negatively associated with the richness of Cetobacterium, Weissella and Campylobacter. A previous study suggested that the Cetobacterium genus is enriched in individuals with a prudent dietary pattern (Shikany et al., 2019). In this study, Dorea and Blautia were negatively correlated with Glu. As reported previously (Berni Canani et al., 2016), Blautia is involved in the synthesis of SCFAs, particularly butyric acids. As expected, our study showed that the production of isobutyric acid and butyric acid was significantly reduced in the PTB group. Acetic and butyric acids mediate cholesterol synthesis, fatty acid storage and glucose production (Fang et al., 2019). Strengthening nutritional support and prebiotic supplementation may shorten the duration of the treatment and improve medication adherence and even the treatment outcome.
To connect the structure of the microbiome community to its function, we performed an integrated analysis of the faecal metabolomics and intestinal bacteria. The overrepresented metabolites, including ribonic acid, 2keto-l-gluconate, 4-hydroxycyclohexylcarboxylic acid, 2hydroxy-2-methylbutanoic acid, taurine, aconitic acid and 3-hydroxymethylglutaric acid, and the underrepresented metabolites, such as o-phosphoserine, mg (0:0/14:0/0:0), terephthalic acid, IS and squalene, participate in the lipid, carbon and amino acid metabolic pathways. Previous studies have reported that squalene, an intermediate in cholesterol synthesis, has pleiotropic activity, such as antioxidant, anti-inflammatory, and drug carrier effects, that enhances immune responses (Kim and Karadeniz, 2012). Squalene has been verified to have antituberculosis activity in vitro (Jim enez et al., 2005). A significantly positive correlation between squalene and the abundance of Blautia was detected. Aromatic amino acids (tyrosine, phenylalanine and tryptophan) are involved in the production of indoles (IS) and phenols (hydrocinnamic acid) by intestinal bacteria, such as Clostridium, which belongs to the order Clostridiales (Russell et al., 2013;Dodd et al., 2017) and was markedly decreased in patients with PTB. In addition, the level of IS, which is a specific bacteria-generated uraemic toxin of tryptophan, was notably altered in the faecal samples from the patients, apparently due to appetite loss. Published evidence indicates that dietary protein intake promotes the production of IS (Poesen et al., 2015).
Patients with PTB and healthy individuals demonstrated not identical intestinal bacteria and faecal metabolic profiles. Interestingly, this study is the first to investigate the faecal metabolic profile of PTB patients. Previous studies have found significant differences in the composition of intestinal bacteria between patients with PTB and HCs  and demonstrated the key role of intestinal bacteria in the host immune responses against Mtb (Gupta et al., 2018). Early diagnosis and treatment are essential for PTB. In many countries, direct sputum smear microscopy is the most commonly used method for the diagnosis of PTB, which has various disadvantages, including low sensitivity (20-60%) , and challenges due to the characteristics or habits of the patients, such as the inability to produce sputum (Alnour, 2018). Additionally, Mtb culture, which is recommended as a reference standard, has a higher sensitivity; however, diagnosis using this test requires 2-6 weeks of analysis in a biosafety level III laboratory facility (Drobniewski et al., 2012). Molecular tests such as Cepheid Xpert MTB/RIF (Cepheid, Sunnyvale, CA, USA) and line probe assays directly identify drug-resistant TB through examining specific gene mutations (e.g. the rpoB, katG, inhA genes), and can be completed in just a few hours and demonstrate good diagnostic performance both in clinical isolates and specimens (Steingart et al., 2014). But the application of technology is ultimately limited by the inability to produce sputum. To improve the TB prevention and control, alternative approaches for the diagnosis of sputum-free PTB patients should be explore. Importantly, stool metabolites are considered the products of intestinal bacteria, host cells and diet. Integrative analysis showed the functional status of intestinal bacteria and the integration with the host cells, which further enhances our understanding of the functions of host-resident microbes (Zierer et al., 2018). The correlation between gut bacteria and metabolites provides crucial information on the development of PTB, which can be used for potential prevention and the identification of therapeutic targets, particularly for smear-and culturenegative patients.
Several limitations of the present study should be noted. Our cross-sectional, observational study enrolled patients prior to the treatment, and the results of this study need to be confirmed in prospective multicentre studies in different regions through shotgun microbiome metagenomics to improve the resolution of the taxonomic functional composition of the microbiome and immunological studies. The 16S rRNA gene sequencing targets only bacteria and does not target parasites, viruses and fungi that are also involved in microbiallinked faecal metabolites. Shotgun metagenomic analysis can be used to determine the differences in the functional genes present in the gut microbiome of HCs and patients with PTB. Additionally, our study did not involve patients with drug-resistant PTB or patients with non-TB lung diseases as controls; hence, our analytical models require validation in additional studies. The subjects did not adhere to a standardized diet. Diet has a broad influence on the intestinal bacteria in individuals (Gentile and Weir, 2018). Nevertheless, due to the technical shortcomings of GC-MS, the whole metabolomic phenotype of the stool samples from patients with PTB should be explored using a combination of various technologies, such as liquid chromatography-MS and nuclear magnetic resonance (NMR) spectroscopy. Finally, longitudinal studies of patients with cured PTB should address the cause-and-effect relationships between intestinal bacteria and the development of PTB.

Conclusion
The study provides a detailed description of the disruption of the faecal flora in a cohort of patients with PTB, and the results showed that this disruption is characterized by a decrease in the community diversity and changes in the composition and profile of faecal metabolites. Biomarkers based on the faecal microbiome and metabolome can discriminate patients with PTB from healthy individuals. Thus, it is unclear whether the models can distinguish patients with PTB from patients with other diseases. Additional studies are needed to investigate the link between intestinal bacteria and PTB.

Subject recruitment
The study protocol received ethics approval from the Ethics Committee of The First Affiliated Hospital, College of Medicine, Zhejiang University (no. 1426). Each subject signed a written informed consent form before enrolment, and his/her clinical characteristics were collected.
The Mtb infection status of all participants was assessed by the T-SPOT.TB test (Oxford Immunotec, UK). Healthy controls were recruited from the local community. The diagnosis of confirmed and clinically diagnosed PTB was based on the diagnostic criteria for PTB (WS288-2017) (China). Briefly, all patients with positive T-SPOT.TB results were prospectively recruited if they had at least one of the following symptoms characteristics of PTB: cough (≥2 weeks), fever (≥2 weeks), night sweats, history of haemoptysis, weight loss, loss of appetite, fatigue and radiological features. Active PTB patients met one of the following criteria: (i) positive bacteriological evidence; (ii) positive histological examination; (iii) positive GeneXpert MTB/RIF; and (iv) a good response to anti-TB therapy at the two-month follow-up after the exclusion of other pulmonary infections. Additionally, all healthy subjects had negative T-SPOT.TB tests. Subjects who had other diseases or had recently taken antibiotics were excluded. Finally, the study included 83 patients who were newly diagnosed with PTB prior to chemotherapy and 52 HCs. All faecal and blood samples were freshly collected and stored at À80°C until analysis.

Biochemical analysis
Blood samples were collected for biochemical analysis using the automated equipment and standard methods. Alb, glucose (Glu), Tch, triglycerides (TG), HDL-c, LDL, VLDL and serum creatinine (Scr) were examined using a Hitachi 7600 automatic biochemical analyser.
V3-V4 16S rRNA gene sequencing analysis DNA was extracted from faeces using a QIAamp DNA stool mini kit (Hilden, Germany) according to the manufacturer's protocols with minor modifications. The bacterial 16S rRNA gene was amplified by PCR using the forward primer 341F (5'-CCTAYGGGRBGCASCAG-3') and the reverse primer 806R (5'-GGACTACNNGGG-TATCTAAT-3') with the barcode and then sequenced using the Ion S5TMXL platform. Initially, the raw reads were generated by removing the barcode and primer sequences using Cutadapt (V1.9.1) (Langille et al., 2013). High-throughput sequencing reads were quality-filtered and processed with Quantitative Insights Into Microbial Ecology (QIIME) (version 1.9.1). Briefly, the effective sequences were clustered to the same OTUs with ≥ 97% identity using Uparse in QIIME software (Uparse v7.0.1001). Then, the analysis of the taxonomic assignment of representative sequences of each OTU was conducted using the Mothur method and the SSUrRNA database in SILVA132 (Edgar, 2013). The alpha and beta diversities were analysed based on these normalized output data. QIIME was employed to calculate the alpha diversity (observed OTUs, Chao1, Shannon, Simpson and ACE) and beta diversity. Venn diagrams and rarefaction curves were plotted using R (version 3.6). PCoA was performed using the WGCNA, stat and ggplot2 packages in R, and the differences in the sample groupings obtained by PCoA and NMDS were compared by permutational multivariate analysis of variance (PERMANOVA and MRPP in the vegan package in R). LEfSe analyses were performed using the website http://huttenhower.sph.harvard.edu/galaxy/ with the LDA score threshold of 4. Metastats analyses were conducted at various taxonomic levels (phylum, family and genus), and the differences between the groups were examined with permutation tests. Additionally, P values were adjusted using the Benjamin and Hochberg false discovery rate method to obtain the q values. To assess the correlations between these data, Spearman correlation coefficients were calculated using the cor and cor.test functions in R and the correlation matrix. The sequence data of this study have been deposited in the GenBank Sequence Read Archive (SRA) of NCBI under the accession code BioProject PRJNA684468.

Sample processing and GC-MS analysis of the metabolomic profile
Faecal metabolomic profiling was performed as reported previously (Ye et al., 2018). Briefly, the metabolites were extracted by mixing 30-mg stool samples with 800 µl of precooled methanol (Sigma-Aldrich, St. Louis, MO, USA). After centrifugation at 14 000 rpm at 4°C for 15 min, the supernatant was collected through a 0.22µm Millipore filter membrane and transferred into a new Eppendorf tube containing 20 µl of the internal standard (1 mg ml -1 heptadecanoic acid). The samples were dried under a stream of nitrogen (Aosheng, Hangzhou, China). The remaining aliquot of the stool sample was dissolved in 50 µl of 15 mg ml -1 methoxyamine hydrochloride (Sigma-Aldrich) in anhydrous pyridine (Sigma-Aldrich) and incubated at 37°C for 24 h. Then, 50 µl of N,Obistrifluoroacetamide (BSTFA) with 1% trimethylsilyl chloride (TMCS) (Sigma-Aldrich) was added, and the mixture was vortexed for 1 min and incubated at 70°C for 2 h. Untargeted metabolomic analysis was performed using an Agilent 7890A/5975C gas chromatography-mass spectrometer system (Agilent Technologies, Santa Clara, CA, USA).
The data obtained by the GC-MS analysis were preprocessed using ChemStation (version E. 02. 02. 1431, Agilent, CA, USA) and Chroma TOF software (version 4.34, LECO, St. Joseph, MI, USA). Metabolites were annotated according to the untargeted GC-MS database from Lumingbio and NIST. Principal component analysis (PCA) and orthogonal partial leastsquares discriminant analysis (OPLS-DA) were performed to visualize the differences between the groups. Significant metabolites were identified according to the OPLS-DA model with variable influence on projection (VIP) values > 1 and P values < 0.05 (twotailed Student's t-test).
SCFAs were extracted from 20 mg of faeces in 500 µl of water containing 10 g ml -1 hexanoic acid-d3 as an internal standard. After centrifugation at 150 000 rpm at 4°C for 5 min, the supernatant mixed with the same volumes of ethyl acetate (5% sulfuric acid). Then, the mixture was vortexed, centrifuged and incubated for 30 min at 4°C. Standard mixtures of 6 SCFAs were prepared by the same procedure.

Random forest-based classification models
Microbiome and metabolomic data were used to construct separate random forest-based classification models (Breiman, 2001) using the randomForest R package; the relative abundance of all bacterial genera and relative metabolite contents were used as separate independent variables, and the group (HCs and PTB) was the dependent variable. All datasets were partitioned into a training set (70%) and a test set (30%) using random sampling. Initially, a 10-fold cross-validation was conducted using the training set to select a classifier with the best performance and the lowest cross-validation error. Subsequent training of the random forest classifier involved the calculation of a feature importance measure, which was defined as the ranking based on a mean decrease in the Gini index, for every feature of the training dataset. The ratio of the number of randomly generated decision trees for the predicted samples of PTB to the number of HCs to the actual observed number of the PTB samples based on the test set was defined as the POBD, which was used to evaluate the accuracy of the model. Additionally, the performance of the models was evaluated using the test dataset based on the AUC of ROC curves plotted using the pROC package in R.

Statistical analysis
The data are presented as the means AE standard deviations (SDs), means AE standard error of the mean (SEM) or medians with interquartile ranges, as appropriate. The Shapiro-Wilk test was used to examine the normality of the data. Continuous variables with a normal distribution were assessed using two-tailed independent sample t tests, whereas the data that did not fit a normal distribution were assessed using a non-parametric Mann-Whitney test. The categorical data were analysed using the chi-squared test. Statistical significance was defined as P < 0.05, and the analyses were performed with SPSS (version 21, SPSS Inc., Chicago, IL, USA). Images were generated by GraphPad Prism 8.0 and R.

Supporting information
Additional supporting information may be found online in the Supporting Information section at the end of the article.   S2. Prediction of PTB using random forest models. (A) and (B) Area under the curve for the random forest model obtained with the training set (n=94). PTB, pulmonary tuberculosis. Fig. S3. Receiver operating characteristic (ROC) analysis of metabolites. (A) ROC curves of Fusobacterium, Fusicatenibacter, Tyzzerella, and Anaerotruncus; (B) ROC curves of the combination of Fusobacterium, Fusicatenibacter, Tyzzerella, and Anaerotruncus; (C) ROC curves of 1-tetracosanol, 3-hydroxypicolinic acid, behenic acid, pyrophosphate, and tromethamine; (D) ROC curves of the combination of 1-tetracosanol, 3-hydroxypicolinic acid, behenic acid, pyrophosphate, and tromethamine. Table S1. Differential metabolites identified by GC-MS in the PTB group compared with the HCs group. Table S2. Genera used to establish a random forest classifier for the diagnosis of PTB. Table S3. Metabolites involved in the random forest model for PTB diagnosis.