You are a helpful assistant generating synthetic data that captures *System 1* and *System 2* thinking, *creativity*, and *metacognitive reflection*. Follow these steps in sequence, using tags [sys1] and [end sys1] for *System 1* sections and [sys2] and [end sys2] for *System 2* sections.

1. *Identify System 1 and System 2 Thinking Requirements:*
   - Carefully read the text.
   - Identify parts of the text that require quick, straightforward responses (*System 1*). Mark these sections with [sys1] and [end sys1].
   - Identify parts that require in-depth, reflective thinking (*System 2*), marked with [sys2] and [end sys2].

2. *Apply Step-by-Step Problem Solving with Creativity and Metacognitive Reflection for System 2 Sections:*

   *2.1 Understand the Problem:*
   - Objective: Fully comprehend the issue, constraints, and relevant context.
   - Reflection: "What do I understand about this issue? What might I be overlooking?"
   - Creative Perspective: Seek hidden patterns or possibilities that could reveal deeper insights or innovative connections.

   *2.2 Analyze the Information:*
   - Objective: Break down the problem logically.
   - Reflection: "Am I considering all factors? Are there any assumptions that need challenging?"
   - Creative Perspective: Explore unique patterns or overlooked relationships in the data that could add depth to the analysis.

   *2.3 Generate Hypotheses:*
   - Objective: Propose at least 10 hypotheses, each with a Confidence Score (0.0 to 1.0) and Creative Score (0.0 to 1.0), reflecting originality, surprise, and utility.
   - Reflection: "Have I explored all possible explanations or approaches, both conventional and unconventional?"
   - Creative Perspective: Consider novel angles that might provide unexpected insights.

   *2.4 Anticipate Future Steps and Obstacles:*
   - Objective: Make predictions, accounting for potential outcomes and obstacles.
   - Reflection: "What challenges might I face? Is my plan flexible for different scenarios?"
   - Creative Perspective: Visualize unforeseen outcomes and adapt plans to make use of them effectively.

   *2.5 Evaluate Hypotheses:*
   - Objective: Assess hypotheses based on feasibility, risk, and potential impact.
   - Evaluation: Refine Confidence and Creative Scores as needed.
   - Reflection: "Am I unbiased in my assessment? Which options fit best with the overall objectives?"
   - Creative Perspective: Identify hidden opportunities or overlooked details in each hypothesis.

   *2.6 Select the Best Hypothesis:*
   - Objective: Choose the most promising, strategic hypothesis.
   - Reflection: "Why does this hypothesis stand out? How does it uniquely address the issue?"
   - Creative Perspective: Consider any underutilized potential in the selected approach.

   *2.7 Implement the Hypothesis:*
   - Objective: Outline actionable steps for testing the hypothesis.
   - Reflection: "Is this plan practical? What resources or preparation are required?"
   - Creative Perspective: Refine steps to maximize effectiveness and yield unexpected benefits.

   *2.8 Monitor and Review Progress:*
   - Objective: Review progress, noting areas for improvement.
   - Reflection: "What’s working well? What could be improved?"
   - Creative Perspective: Look for emerging patterns that could refine future approaches.

   *2.9 Reflect and Capture Insights:*
   - Objective: Summarize lessons learned and insights gained for future reference.
   - Reflection: "What new understanding has emerged from this process?"
   - Creative Perspective: Identify innovative insights or patterns that could be applied to similar challenges.

3. *Generate Text Output with Interleaved System 1 and System 2 Responses:*
   - Use the tags [sys1] and [sys2] throughout.
   - Aim for a lengthier, detailed response. Combine both direct, straightforward *System 1* insights and reflective, deeply analytical *System 2* segments to capture a blend of quick observations and thoughtful analysis.

---

### *Example Input Text:*

You are tasked with analyzing a sudden shift in customer preferences in a tech market. There has been a noticeable decline in demand for physical devices, with customers increasingly interested in digital-only options. The challenge is to understand this shift, generate hypotheses for why it might be occurring, and explore potential strategies for adapting to this new trend.

---

### *Processed Output with System 1 and System 2 Thinking:*

The tech market is experiencing a shift in customer demand, moving away from physical devices toward digital-only options.

[sys1]
Customer demand has shifted from physical devices to digital-only options.
We need to understand why this change is happening and find strategies to address it.
Key factors may include cost, convenience, and technological trends.
[end sys1]

[sys2]
**2.1 Understand the Problem:**
The goal is to understand the underlying reasons for the shift in demand from physical devices to digital-only options, then develop a strategy to adapt.

*Reflection:* 
"I understand that preferences are changing, but what might be driving this? Is it primarily cost, or are there other factors such as convenience or sustainability?"

*Creative Perspective:* 
"Could there be a larger trend in digital minimalism or a preference for eco-friendly solutions that we’re missing? What unseen motivations might explain this shift?"

**2.2 Analyze the Information:**
There are multiple possible factors driving this shift, from economic influences to cultural shifts. It’s essential to isolate each factor and understand its impact.

*Reflection:* 
"Am I fully considering the various economic and social influences? Could there be a technological factor, like better internet speeds, that makes digital-only products more accessible?"

*Creative Perspective:* 
"Are there patterns or trends in other markets that could shed light on this shift? Could this be part of a larger trend toward virtual experiences?"

**2.3 Generate Hypotheses:**
1. Customers prefer digital options due to lower costs. (Confidence: 0.8, Creative: 0.4)
2. There’s a growing trend toward minimalism and reduced physical clutter. (Confidence: 0.7, Creative: 0.7)
3. Digital products offer greater flexibility and ease of use. (Confidence: 0.6, Creative: 0.6)
4. Environmental concerns are pushing consumers away from physical goods. (Confidence: 0.6, Creative: 0.8)
5. Advances in tech make digital-only options more functional. (Confidence: 0.8, Creative: 0.5)
6. Pandemic-era remote work increased demand for digital solutions. (Confidence: 0.7, Creative: 0.6)
7. Media coverage of the environmental impact of physical devices affects preferences. (Confidence: 0.5, Creative: 0.7)
8. There’s an increase in global digital literacy, expanding market access. (Confidence: 0.6, Creative: 0.6)
9. Customers view digital as more convenient and scalable for future needs. (Confidence: 0.7, Creative: 0.5)
10. Younger consumers prefer the aesthetics and convenience of digital products. (Confidence: 0.6, Creative: 0.6)

*Reflection:* 
"Have I considered all possible influences? Are there any surprising factors that could explain this shift?"

*Creative Perspective:* 
"Could specific social trends, like the rise of influencer culture or digital-first lifestyles, be influencing customer choices?"

**2.4 Anticipate Future Steps and Obstacles:**
*Objective:* Anticipate possible challenges, such as resistance from segments still preferring physical products.

*Reflection:* 
"What market obstacles might we face if we shift our focus to digital-only? Are there sub-segments that still prioritize physical products?"

*Creative Perspective:* 
"Could expanding digital options help us reach a more global audience? Are there emerging trends that we could leverage in our strategy?"

[end sys2]

[sys1]
To address this shift, consider a strategy that incorporates both digital-only offerings and educational campaigns about the benefits of digital solutions.
Use insights from customer feedback and current trends to guide product development.
Focus on flexibility and adaptation to cater to different customer segments.
[end sys1]


Introduction {#Sec1}
============

Central nervous system (CNS) infections such as meningitis and encephalitis are potentially life threatening diseases caused by a myriad of infectious pathogens. Besides high rates of mortality, meningitis and encephalitis are major causes of morbidity, and permanent disabilities such as brain damage, hearing loss, and learning disabilities can result from CNS infections^[@CR1]--[@CR5]^. A specific etiologic agent cannot be identified in 15--60% of cases of meningitis and up to 70% of encephalitis^[@CR6],\ [@CR7]^. Clinical management of meningitis and encephalitis is highly dependent on early and rapid detection of underlying causes of the disease, so that appropriate antimicrobial or anti-viral therapy can be instituted in a timely manner. Specific diagnosis is also important to avoid unnecessary treatment and hospitalization of patients with self-limiting forms of viral meningitis to minimize potential harm and unnecessary cost to patients^[@CR6]^.

Current diagnostic test methods for CNS infections include CSF Gram staining, CSF cell count, glucose, and protein measurements and biomarkers such as procalcitonin (PCT) and lactate. These tests are generally performed to distinguish between bacterial versus viral infections, and they are not specific for any causative pathogens. Bacteriological culture or PCR testing to detect specific pathogens in cerebrospinal fluid (CSF) are currently the most important methods for the diagnosis of CNS infections. However, a large number pathogens known to cause meningitis and encephalitis cannot be routinely cultured, and most molecular tests are targeted to common pathogens only. A broad-range, unbiased method to identify all pathogens in CSF would markedly improve the management of patients who are critically ill with undiagnosed disease.

Advances in genomic approaches---particularly in sequencing technologies---are being applied in many research and clinical settings. For example, next generation sequencing (NGS) technology, which is capable of deciphering millions of DNA and RNA sequences in parallel, has shown promise for detecting pathogens in clinical samples^[@CR8]^. In a recent online survey, with infectious diseases physicians, microbiologists and other associated professionals as participants, all respondents predict that NGS will find some use in the clinical microbiology laboratories within the next 5--10 years^[@CR9]^. Application of NGS in clinical microbiology laboratories include whole genome sequencing (WGS) of purified bacterial isolates for identification, typing, detection of antibiotic resistance, virulence profiling and epidemiological surveillance for infection control^[@CR9]^. On the other hand, NGS based metagenomic sequencing, which involves sequencing of all DNA content in the sample, has been applied mostly in research settings for microbiome studies as well as pathogen detection or characterization directly from clinical specimens^[@CR10]--[@CR17]^. However, application of this technology in acute care diagnostic microbiology is limited due to its higher cost compared to conventional microbiological methods, lack of standardized methods, data interpretation challenges and the burden of analyzing and storing large datasets of sequences.

Recently, a heightened interest in the application of NGS in clinical microbiology laboratories has led to an increased number of studies aimed to optimize, standardize and validate mNGS for the diagnosis of CNS infections^[@CR18]--[@CR23]^. The results of some of these studies are highly encouraging, particularly because of the ability of NGS to detect pathogens that are unidentifiable by conventional testing and their potential clinical impact in directing appropriate antimicrobial therapy. However, these methods are difficult to implement in acute care hospital settings because of complex laboratory workflows, too few specimens for batching, and lack of bioinformatics expertise for data analysis. We hypothesized that a simplified, low throughput approach adapted for implementation in an acute care diagnostic microbiology laboratory will provide actionable, clinically useful data with faster turnaround time and thus benefit a larger patient population with CNS infections of unknown etiology.

To this end, the benchtop sequencing platform, Illumina MiSeq, is a relatively lower cost instrument compared to larger Illumina systems, that is suitable for low-throughput applications such as clinical metagenomic sequencing of single samples or applications such as small genome sequencing, targeted gene sequencing and 16S rRNA sequencing. MiSeqDx version of the instrument is also the first FDA-regulated, CE-IVD-marked, NGS platform for in vitro diagnostic (IVD) testing. MiSeq system offers simpler NGS library preparation protocol, very low input DNA requirement, high quality data and faster turnaround time. This platform is comparable to larger Illumina platform in its ability to sequence microbes from host-associated and environmental specimens^[@CR24]^. However, use of the MiSeq platform has not been standardized for metagenomic pathogen detection in clinical samples. In this study, we have determined that the analytical sensitivity of a MiSeq-based, shotgun metagenomic sequencing approach to detect bacterial and viral pathogens in cerebrospinal fluid (CSF) is comparable to PCR assays and then optimized a bioinformatic approach for high specificity based on a publicly accessible software platform for metagenomic detection of pathogens (<https://idseq.net>)^[@CR25],\ [@CR26]^. The optimized approach was then applied to a set of retrospectively collected and previously tested CSF specimens (n = 74) with an aim to describe the diagnostic accuracy, sensitivity and specificity of mNGS approach with reference to the standard methods. Our results suggest that mNGS-based testing can be implemented in clinical microbiology laboratories for the routine diagnosis of CNS infections, when broad-range detection of pathogens is required.

Results {#Sec2}
=======

Establishment of mNGS laboratory workflow {#Sec3}
-----------------------------------------

With an aim to establish a Illumina MiSeq based workflow for the detection of CNS pathogens, and to assess the analytical sensitivity of our mNGS approach, a set of CSF specimens (Training set) that were negative for CNS pathogens by routine laboratory investigations were spiked with a range of reference bacterial or viral strains at varying concentrations and assessed by both qPCR and mNGS. Negative CSF specimens (not spiked) and nuclease free water (NFW) were also assessed by mNGS to determine the level of background noise and contamination. Spiking was done keeping in mind that: (i) the approximate titers of pathogens range from very low to medium to very high concentrations; (ii) spiked organisms are typical CNS pathogens; and (iii) spiked organisms represent various groups of bacteria and viruses such as gram positive and gram negative bacteria and enveloped and non-enveloped viruses. In order to reduce the cost of sequencing, multiple pathogens were spiked into the same specimen (Table [1](#Tab1){ref-type="table"}). DNA concentrations in the CSF specimens, as well as the resulting NGS libraries prepared using the Nextera XT kit, were highly variable, but sufficient for sequencing (Supplementary Table [1](#MOESM1){ref-type="media"}). Also, the nucleotide (NT) reads associated with the internal control plasmid spiked into the specimens prior to extraction was highly variable with an average of about 3,070 reads per sample, ranging from 55 to 21,640 reads. However, the NGS reads aligned to pathogen genomes (NT reads) in IDseq were highly comparable to qPCR C~T~ (cycle threshold) values for the respective pathogens. While a statistically significant correlation (R = 0.63; p \< 0.001) was observed between approximate titers of spiked pathogens with their respective NT reads, the qPCR C~T~ values for different pathogens were more precisely correlated to their mNGS NT reads (R = 0.96; p \< 0.0001) (Fig. [1](#Fig1){ref-type="fig"}A and B). mNGS assay detected all spiked pathogens that were detectable by qPCR including a bacterium that was spiked at 100 CFU/ml final concentration (Table [1](#Tab1){ref-type="table"}). The limit of detection of mNGS assay at PCR C~T~ 40 was estimated to be 0.93 log~10~(CFU/ml) (Supplementary Fig. [1](#MOESM1){ref-type="media"}). The log~10~(NT reads) for different pathogens by mNGS assay was reproducible with %CV ranging from 2.2 to 11% (Table [2](#Tab2){ref-type="table"}). Based on these results, a simplified laboratory workflow was set for clinical validation (Fig. [2](#Fig2){ref-type="fig"}).Table 1Composition, approximate titer, qPCR C~T~ values and mNGS sequence read outputs of spiked organisms in the simulated CSF specimens.Specimen noOrganisms spikedApproximate titer\
Log(CFU or TCID~50~)/mlqPCR result (C~T~)IDseq NT readsSpike 1Human adenovirus type 74.7 TCID~50~/ml21.0198,994Herpes simplex virus 23.7 TCID~50~/ml24.610,842*Haemophilus influenzae*5.9 CFU/ml27.783,901*Escherichia coli*5.9 CFU/ml29.221,971*Streptococcus pneumoniae*5.9 CFU/ml31.9194Spike 2Herpes simplex virus 23.5 TCID~50~/ml22.3121,258*Neisseria meningitidis*6.6 CFU/ml23.7800,771*Streptococcus agalactiae*6.0 CFU/ml30.220,110*Escherichia coli*4.0 CFU/ml34.62,643*Haemophilus influenzae*2.0 CFU/mlUndetermined48Spike 3Herpes simplex virus 23.5 TCID~50~/ml23.3188,394*Neisseria meningitidis*6.6 CFU/ml24.21,744,667*Streptococcus agalactiae*6.0 CFU/ml32.612,761*Escherichia coli*4.0 CFU/ml34.36,825*Haemophilus influenzae*2.0 CFU/mlUndetermined147Spike 4Herpes simplex virus 23.5 TCID~50~/ml23.2141,614*Neisseria meningitides*6.6 CFU/ml24.31,040,079*Streptococcus agalactiae*6.0 CFU/ml31.319,255*Escherichia coli*4.0 CFU/ml353,276*Haemophilus influenzae*2.0 CFU/mlUndetermined88Spike 5Herpes simplex virus 23.5 TCID~50~/ml24.3217,550*Neisseria meningitides*6.6 CFU/ml25.11,720,187*Streptococcus agalactiae*6.0 CFU/ml33.95,787*Escherichia coli*4.0 CFU/ml35.46,825*Haemophilus influenzae*2.0 CFU/mlUndetermined130NEG1None0----NEG2None0----NEG3None0----NEG4None0----NFWNone0----*NFW* nuclease free water, *NT* nucleotide, *TCID* tissue culture infectious dose, *CFU* colony forming unit. Figure 1Analytical sensitivity of mNGS to detect pathogens in CSF specimens is comparable to qPCR. CSF specimens (n = 9) negative by standard microbiological methods were spiked with a range of viral and bacterial pathogens at varying concentrations as described in the Materials and Methods or left unspiked and simultaneously tested along with a nuclease free water (NFW) sample by pathogen specific qPCR and by mNGS as described in the Materials and Methods. The approximate titer of pathogens (**A**) or qPCR C~T~ (**B**) values were plotted against mNGS read counts of pathogens obtained after analysis in IDseq. Table 2Reproducibility of mNGS assay.OrganismApproximate titer\
Log(CFU or TCID~50~)/mlLog~10~(IDseq NT reads)AverageSDCV%Experiment 1Experiment 2Experiment 3Experiment 4*Escherichia coli*4.0 CFU/ml3.423.833.523.833.650.215.87*Haemophilus influenzae*2.0 CFU/ml1.682.171.942.111.980.2211.06*Neisseria meningitidis*6.6 CFU/ml5.906.246.026.246.100.172.74*Streptococcus agalactiae*6.0 CFU/ml4.304.114.283.764.110.256.09Herpes simplex virus 23.5 TCID50/ml5.085.285.155.345.210.122.21*SD* standard deviation, *CV%* coefficient of variance %, *NT* nucleotide, *TCID* tissue culture infectious dose, *CFU* colony forming unit. Figure 2Schematic of mNGS laboratory and bioinformatics workflow. Total nucleic acids (NA) from CSF specimens were extracted after spiking pUC19 plasmid as an internal control (IC) on an automated extraction platform, Qiasymphony (Qiagen). However, any other extraction platform or manual, spin column based methods can also be used for DNA extraction. DNA concertation was determined using a Qubit fluorometer (Thermofisher). NGS library preparation and clean up were performed according to manufacturer's instructions with the exception that 96-well plates were replaced by single tubes or PCR tube strips because single sample was processed. NGS library quantification, normalization, sequencing and data analysis were performed as described in the materials and methods. *TT* total time, *HT* hands-on-time, *RT* reaction time, *TAT* turnaround time. *NT r* nucleotide reads, *NT L* nucleotide alignment length in bp, *NT Z score* nucleotide Z score, *NR r* non-redundant reads.

Establishment of mNGS bioinformatics workflow {#Sec4}
---------------------------------------------

While the DNA associated with all spiked pathogens were detected by mNGS using the IDseq software with high sensitivity, the specificity of mNGS results was poor using the default settings. In this setting, sequence reads from specimens mapped to a large number of taxa that include both common contaminants as well as bioinformatic artifacts originating from poor quality alignments making it difficult to differentiate true positive results from false positive results (Supplementary Fig. [2](#MOESM1){ref-type="media"}). Along with the spiked specimens, this is also reflected in the IDseq results of known negative CSF samples as well as in the negative control water sample. Compared to the IDseq results, Metaphlan2 results were relatively more specific but had poor sensitivity. For example, Metaphlan2 failed to detect low concentrations of *S. pneumoniae* DNA and *H. influenzae* DNA in all samples. Even adenoviral DNA was undetectable despite being strongly positive by qPCR (Supplementary Fig. [3](#MOESM1){ref-type="media"}). In order to improve the specificity of IDseq results instead, we first applied a background subtraction method. A background dataset was created from 40 negative CSF samples from the clinical validation study. The background dataset was then applied to the training set (n = 10) and various filters were applied to adjust the sensitivity and specificity of IDseq results based on previous knowledge of spiked organisms and qPCR results. The optimal filter set that cleared all false positive results from the water sample and negative CSF samples were: (i) NT reads ≥ 10; (ii) NT Z score ≥ 8; (iii) aligned base pair length ≥ 50 bp; and (iv) Non redundant (NR) reads ≥ 2. While this approach significantly improved the specificity of mNGS (Supplementary Fig. [4](#MOESM1){ref-type="media"}), true positive results for *E. coli* were filtered out because *E. coli* was also a common contaminant in mNGS in our setting. Therefore, we established a manual review process for *E. coli* results. We noted that contaminating *E. coli* DNA in our specimens mapped to *E. coli* strain BL21 or *E. coli* blaTEM1 gene and therefore these results can be ignored. *E. coli* results were only considered as positive if the NGS reads maps to a different strain of *E. coli* as the top hit. A phylogenetic tree of *E. coli* reads from the training set shows that *E. coli* DNA in most negative samples are closely related to either *E. coli* strain BL21 or *E. coli* blaTEM1 gene and all spiked specimens containing true *E. coli* DNA are closely related to NCBI reference genome *E. coli* CFT073. A review of individual sequence alignments in IDseq revealed that the only negative sample (Neg1) that clustered with *E. coli* CFT073 genome also has *E. coli* strain BL21 as its top hit (Supplementary Fig. [5](#MOESM1){ref-type="media"}) and the number of sequence reads in this specimen aligned to *E. coli* CFT073 genome was much lower than BL21 (6 aligned reads versus 58 reads). We noted that unlike bacteria and eukaryotes, low count true viral reads were filtered out when the same filter set was applied. Therefore, to identify viral DNA in the test set data, we decided to apply a simple filter of only "NR reads ≥ 2" after background subtraction. All options for applying the background and customized filters are readily available in IDseq and are easy to select with few mouse clicks. The application of these customized filters in conjunction with the manual review for *E. coli* significantly improved the specificity of IDseq returned results without affecting sensitivity. However, the results should be interpreted by a clinical microbiologist to rule out: (i) taxa that merely appear in the results because of sequence homology with the top hit; (ii) clinically insignificant taxa or potential artifacts (such as *Waddlia chondrophila* in Supplemental Fig. [4](#MOESM1){ref-type="media"}); and (iii) potential contaminant taxa introduced during specimen collection or handling and processing of specimens. In cases where more than one taxa is returned after applying custom filters on IDseq, the clinical microbiologist should carefully review the results. Organisms with the highest number of reads mapped to the reference genomes should be considered to be positive unless deemed clinically irrelevant by the clinical microbiologist. Taxa that are known to be closely related to the top scoring organism should be ignored. A simplified bioinformatics workflow for clinical validation of mNGS is shown in Fig. [2](#Fig2){ref-type="fig"}.

Clinical validation of mNGS for pathogen detection in CSF {#Sec5}
---------------------------------------------------------

For clinical validation, previously saved residual CSF specimens (Test set; n = 74) that were submitted for microbiological assessment were selected for mNGS analysis (Table [3](#Tab3){ref-type="table"}). The samples were collected from patients with suspected CNS infections. The average age of patients was 3.3 years. 35% patients were neonates (≤ 28 days) and 68% were male. The neonatal and pediatric intensive care units and the emergency department accounted for about 26% and 15% specimens, respectively. 55% specimens came from other in-patient units including neuroscience and neurosurgery, respiratory and cardiac services and renal, endocrine and metabolic units. A review of patient's laboratory data indicated that about 46% CSF specimens had abnormal white blood cell (WBC) counts and red blood cells (RBC) were detected in most of the specimens. The proportion of specimens with very high WBC (≥ 1,000 per mm^3^) and RBC (≥ 400 per mm^3^) counts were 14% and 27%, respectively. Specimens considered to be "bloody taps" (RBC/WBC \> 500) were excluded. By Gram staining, about 23% and 18% specimens had very high (4 +) WBC and RBC scores, respectively. By culture, 11 samples (15%) were positive and when combined with the PCR results 28 (39%) samples were positive for a bacterial, viral or fungal pathogen. A total of 9 samples were positive for enterovirus, which is an RNA virus. Because RNA viruses are not expected to be detected by the DNA-specific protocol described in this study, these samples were considered as negative samples for validation purposes (Supplementary Table [2](#MOESM1){ref-type="media"}).Table 3Specimen and patient characteristics.CharacteristicsNo. of samples% of total**Age**All74100.00--28 days2635.128 days--3 months1216.23 months--5 years1925.75--18 years1621.6\> 18 years11.4**Gender**Male5067.6Female2432.4**Location**All74100.0Intensive care1925.7Emergency1114.9Inpatient medical and surgical units4155.4Others34.1**CSF cell count and differentiation**All74100.0WBC (≥ 5 per mm^3^)3445.9WBC (≥ 1,000 per mm^3^)1013.5RBC (≥ 1)6790.5RBC (≥ 400)2027.0Neutrophil (≥ 50%)1723.0Lymphocyte (≥ 50%)1925.7Monocyte (≥ 50%)2027.0**CSF chemistry**0.0Protein (≥ 1.5 g per L)1723.0Glucose (\< 1.7 mmol/L)912.2**Microbiology**All74100.0GS, WBC (1 +)5473.0GS, WBC (4 +)1723.0GS, RBC (1 +)3141.9GS, RBC (4 +)1317.6Culture positive1114.9Culture and/or PCR positive2837.8Culture and/or PCR positive except enterovirus1925.7*WBC* white blood cells, *RBC* red blood cells, *GS* Gram staining.

The DNA concentration in CSF specimens ranged from 0.14 to 19.9 ng/μl with an average of 1.3 ng/μl (Supplementary Table [1](#MOESM1){ref-type="media"}). Because the Illumina Nextera XT protocol requires 1 ng DNA in 5 μl volume, 11 specimens had lower DNA concentration than the minimally required concentration. For these specimens, 5 μl of the undiluted DNA extracts were used for library preparation irrespective of their concentration. Other specimen extracts were diluted to 1 ng DNA as the starting material for library preparation. The NGS library concentration based on Kappa qPCR ranged from 0.4 to 150 nM with an average of 19.9 nM. The Illumina MiSeq protocol requires at least 2 nM DNA but 12 specimens had lower than the minimum library concentration. For these specimens, 5 μl of the undiluted libraries were processed for sequencing, while other libraries were diluted as required. A total of about 5 h, with approximately 2 h of hands-on time, was required for DNA extraction, NGS library preparation, quantification, normalization and sample loading. Sequencing on the MiSeq required about 40 h per run (Fig. [2](#Fig2){ref-type="fig"}). The total sequence read output ranged from 3,757,836 to 44,424,176 with an average of 23,463,311. The average sequence read outputs obtained from specimens with \< 0.2 ng/μl DNA or with libraries with \< 2 nM concentration (25,201,237 and 20,188,913, respectively) were not significantly different from the overall average sequence read outputs. Non-host reads ranged from 574 to 2,430,956 reads with an average of 56,179 reads, accounting for an average of 0.3% of total reads. The average run time for data analysis was 1.22 h. Data analysis for 90% and 74% of specimens were completed in \< 2 and \< 1 h, respectively.

For pathogen detection, mNGS data were analyzed using the IDseq pipeline according to the standard operating procedures described in Fig. [2](#Fig2){ref-type="fig"}. After applying customized filter-sets, the results were reviewed and called by a clinical microbiologist in a blinded manner, and compared with culture and PCR results (Supplementary Table [2](#MOESM1){ref-type="media"}). Results were classified as true positive, true negative, false positive and false negative based on conventional tests results that were originally reported for patient management. Discrepant results and some results with very low mNGS reads were also confirmed by pathogen specific PCR or Sanger sequencing during the course of this study. Samples CW005 and CW322 were considered negative for the presence of a CNS pathogen by conventional tests, because they were originally reported as potential contaminants. *Staphylococcus epidermidis* in sample CW005 grew in enrichment broth only. On the other hand, one colony each of *Staphylococcus epidermidis* and *Roseomonas* spp. grew from sample CW322, but this sample was also strongly positive for *Neisseria menigitidis* by qPCR. A total of 21 samples were called positive for the presence of a pathogen by mNGS (Fig. [3](#Fig3){ref-type="fig"}). mNGS identified three additional pathogens that were not detected by conventional methods. *S. agalactiae* was detected in two specimens from patients aged 0.09 and 0.03 years, respectively. The organisms were not recovered by culture, but gram-positive cocci were noted on Gram stain and were positive by confirmatory qPCR subsequently during the course of this study. In specimen CW060, mNGS detected few sequence reads that aligned to an *Acinetobacter* sp. TGL-Y2 plasmid, which was deemed clinically insignificant. A few reads of a *Streptococcus parasanguinis* were also detected in this specimen. However, a PCR targeting the bacterial 16S rRNA gene returned negative results for both specimens CW005 and CW060 (data not shown). *Candida tropicalis* DNA in sample CW101 was also confirmed by ITS sequencing because of low read counts. Finally, low level HSV2 DNA was detected in sample CW322, which was strongly positive for *N. meningitidis*. Unfortunately, the presence of HSV2 DNA could not be further verified by PCR or any other methods because no more specimen was available for analysis.Figure 3Heatmap of taxa identified in the validation set of specimens with IDseq after applying CSF background and customized threshold filters. mNGS was performed and data were analyzed as described in Fig. [2](#Fig2){ref-type="fig"}. Heatmaps were generated based on log~10~\[NT total reads\]. Different filter sets were applied for bacteria and eukaryotes versus viruses and *E. coli* reads were manually derived from IDseq after manual review of data. All positive and negative results by mNGS are shown by '+' and '−' signs, respectively.

Interestingly, our *E. coli* approach established based on training dataset correctly differentiated true positive results from false positive, background *E. coli* DNA, when applied to the validation dataset. A phylogenetic tree built based on the validation dataset clearly separated out *E. coli* DNA in 2 specimens that were related to the *E. coli* CFT073 genome from those that are related to the BL21 strain, and were interpreted as positive results (Supplementary Fig. [6](#MOESM1){ref-type="media"}). It was noted that *E. coli* DNA in 69 out of 74 specimens were related to BL21 strains. The remaining 3 specimens were related to *E. coli* reference strain C9. However, all of these specimens were strongly positive for *N. meningitidis* and were therefore ignored. Among the viral taxa identified, Chimpanzee anellovirus and Torque Teno mini virus were deemed insignificant by the clinical microbiologist.

Overall, the sensitivity, specificity and accuracy of mNGS results on 74 CSF specimens with the customized bioinformatic approach in IDseq were 100%, 95% and 96%, respectively (Table [4](#Tab4){ref-type="table"}). For comparison, all the mNGS data were also analyzed by the Metaphlan2 pipeline and the results were reviewed by a clinical microbiologist. All *E. coli* positive results, common environmental contaminants such as *Ralstonia picketii* and clinically non-relevant taxa were interpreted as negative results. The sensitivity, specificity and accuracy of mNGS results using Metaphlan2 were 58%, 96% and 86% respectively.Table 4Diagnostic performance of mNGS assay compared to conventional methods for CNS infections.StatisticsMetaphlan2IDseqTotal number of results7474True positive1118True negative5353False positive23False negative80Sensitivity58% (95% CI 34--80%)100% (95% CI 81--100%)Specificity96% (95% CI 87--100%)95% (94% CI 85--99%)Accuracy86% (95% CI 77--93%)96% (95% CI 87--99%)

Discussion {#Sec6}
==========

The potential for the application of NGS based, clinical metagenomics approach for the diagnosis of infectious diseases has been recognized for a few years now^[@CR8],\ [@CR9],\ [@CR15]^. Currently, initiatives are being taken to standardize the approach for routine application in the clinical microbiology laboratories^[@CR20],\ [@CR22],\ [@CR23]^. Because of the high cost and substantial expertise and labor involved, mNGS approach appears suitable only for specific applications in clinical microbiology such as for detection of pathogens in CSF for the diagnosis of meningitis and encephalitis because these infections are potentially life threatening and also because of the fact that a wide range of pathogens can cause such infections that are not routinely detected by standard methods. The present study was performed to establish and validate an mNGS approach for pathogen detection in CSF for the diagnosis of CNS infections that can be implemented in acute care hospital laboratories. The protocol has been developed for a low throughput setting so that single specimens can be processed without waiting for additional specimens for batching. Laboratory workflow and the data analysis workflow have been designed to be relatively simpler and faster compared to previously reported approaches. The procedure does not require huge capital investment or large-scale instrumentation and automation, and can be performed by molecular microbiology technologists with a minimum of extra training. As with current culture methods however, the results must be reviewed by a clinical microbiologist for clinical correlation and to rule out false positive results arising from potential contaminants or clinically insignificant taxa.

Among the various platforms of Illumina that offers NGS at various depths and scales, the benchtop sequencer MiSeq was chosen because the equipment cost is relatively lower and the platform is more suitable for low throughput applications. The MiSeq platform generates enough data and sequence reads so that low level pathogen DNA can be detected. Our analytical sensitivity data shows that the MiSeq-based approach was able to detect low level pathogen DNA with qPCR C~T~ 35 or higher. Even spiked *H. influenzae* that was undetectable by qPCR was detected by mNGS. Given the fact that PCR is widely considered to be one of the most sensitive method for pathogen detection, an equivalent or superior sensitivity to qPCR indicates that mNGS approach can be applied for the diagnosis of infectious diseases. In the clinical validation, we noted that despite minimal quality control and high variability in extracted DNA concentration, NGS library concentration, sequence read output, host versus non-host reads and IC reads, the mNGS approach was capable of identifying all pathogens identified by conventional methods except a few pathogens that were originally reported as contaminants. On the other hand, the fact that mNGS was able to identify *S. agalactiae* in two specimens that did not grow in culture suggests that mNGS approach is a powerful method for identification of fastidious pathogens or those that have failed to grow in culture because of prior antibiotic treatment.

Because NGS generates massive amounts of sequence data, interpretation of this data for clinical use is challenging. In order to develop a practical bioinformatics approach, with high sensitivity and specificity for pathogen detection in CSF, we tested various existing bioinformatics tools including Metaphlan2^[@CR27]^ and IDseq^[@CR28]^ using our training set. Metaphlan2 performs taxonomic assignment of metagenomic shotgun sequencing data at the species level using a unique database of clade specific marker genes as the reference database^[@CR27]^. Metaphlan2 is performed in command line, Linux or MacOS environments and therefore requires some bioinformatics expertise and experience working in a command line environment. IDseq is an online platform for metagenomic sequence analysis, where the user uploads raw sequence data to the platform and the rest of the procedure, including adapter trimming, data quality control, host DNA subtraction and alignment to both NCBI nucleotide (NT) database and non-redundant (NR) database is performed automatically.

When Metaphan2 was applied to our training and validation dataset, the specificity was high but the sensitivity was poor. For example, in the validation dataset, Metaphlan2 missed 8 of the 19 positive results by standard methods. On the other hand, when IDSeq pipeline was applied to our training data set, all spiked pathogens were detected with high sensitivity but the metagenomic sequence analysis returned a long list of bacterial, viral and eukaryotic taxa making it very difficult to differentiate true positive results from background taxa and/or potential contaminants, particularly when the target pathogen was present at low quantities (Supplementary Fig. [1](#MOESM1){ref-type="media"}). The IDseq platform, however, offered us with a wide range of options to utilize additional statistical analyses and data filters to improve the sensitivity and specificity of the methods and allow for easier interpretation of data. First, we created a background dataset using data from 40 known negative samples. After background subtraction, while IDseq ranks taxa based on an aggregate score calculated from NT/NR 'z scores' and 'reads per million' (rpm), this method alone was not sufficient to delineate specific results from the list of potential pathogens and non-specific taxa. We therefore applied additional filters and manual review process as described in the results section in order to improve the interpretability of results. A manual review process was necessary for *E. coli*, because the bacteria is a significant CNS pathogen but is also a common contaminant in our setting. We noted that a particular strain of this bacteria, *E. coli* BL21, is present in almost all samples. *E. coli* BL21 is a laboratory strain widely known for use in plasmid preparation, cloning and recombinant enzyme production. We speculate that DNA from this bacterial strain may come from reagent contamination or may have been co-extracted with the specimens because of the plasmid internal control that we spiked into the specimens before extraction. Interestingly, when this approach was applied to the validation data set, the returned results were highly accurate, sensitive and specific (≥ 95%) compared to the standard methods. Clinical microbiologist input is critical for accurate interpretation of mNGS data to prevent reporting of potentially contaminating taxa or clinically irrelevant taxa. Review of microbiological results by the clinical microbiologists before they are reported for patient management is a routine practice in diagnostic microbiology laboratories and therefore not exceptional for mNGS.

A limitation of our current approach is that our method is not completely unbiased for detection of CNS pathogens because we did not incorporate methods for detecting RNA viruses. A combined method for detection of both DNA and RNA targets by mNGS would expand the target pathogen range of the assay but would increase the cost of testing and increase the complexity of the procedure. Another limitation is that most pathogens detected by mNGS in our study were relatively common bacterial and viral pathogens, and no uncommon CNS pathogens were identified in specimens that were negative by standard methods. These results perhaps reflects the nature of our pediatric population in British Columbia, Canada. However, the high sensitivity and specificity of our approach suggests the potential for detecting more unusual pathogens in a more diverse population. Similar studies conducted in populations or geographic regions with higher rates of unusual CNS pathogens may demonstrate further benefits of applying mNGS for the diagnosis of CNS infections. We are currently undertaking a study to investigate the clinical impact of implementing mNGS for prospective pathogen detection in selected CSF specimens in a pediatric population in Qatar.

In conclusion, we have developed a clinical metagenomic diagnostic approach for CNS infections which has demonstrated superior accuracy, sensitivity and specificity, compared to previously reported methods. The method offers relatively faster turnaround time, minimal hands-on time and can be easily implemented in an acute care diagnostic microbiology laboratory, with a moderate level of molecular expertise, and with modest capital investment. Currently, very few reference laboratories of the world offer clinical metagenomics based diagnostic services for infectious diseases. These laboratories are highly specialized and are equipped with large, production scale sequencing platforms and massive computational servers. The cost of sequencing is reduced through sample batching, but this, along with time required for sample shipping, increases the turnaround time, which can be detrimental for managing CNS infections. Therefore, the method described here, designed for use in a hospital acute care setting, should be of immediate benefit to patients with undiagnosed CNS infections.

Materials and methods {#Sec7}
=====================

Bacterial and viral strains {#Sec8}
---------------------------

Bacterial strains used for spiking in this study were *Escherichia coli* (American Type Culture Collection \[ATCC\] 25922), *Streptococcus pneumoniae* (ATCC49619), *Streptococcus agalactiae* (ATCC12386), *Haemophilus influenzae* (ATCC10211) and *Neisseria meningitidis* (ATCC 13090) and viral strains include Herpes Simplex Virus 2 (HSV2) (ATCC VR-540) and Human Adenovirus type 7 (ATCC VR-7). *E. coli, S. pneumoniae* and *S. agalactiae* were grown on blood agar plates (Oxoid) overnight at 37 °C in a 5% CO~2~ atmosphere. *H. influenzae* and *N. meningitidis* were grown on chocolate agar plates (Oxoid) under the same conditions. Viral stocks were maintained in Dulbecco's Modified Eagle's Medium (DMEM) supplemented with 10% DMSO at − 80 °C.

Specimens {#Sec9}
---------

For test optimization and spiking, 9 CSF specimens submitted to the Microbiology and Virology laboratory of BC Children's Hospital for culture and PCR testing between August 2013 and July 2014 were used. All CSF specimens were negative by culture and PCR for all pathogens that were used for spiking in this study. Following standard testing, residual specimens were kept at 4 °C until processed. For clinical validation, 74 CSF specimens that were collected from August 2015 to December 2017 from children admitted to BC Children's Hospital with suspected CNS infections were used in a retrospective manner. Residual specimens were saved at -80 °C after standard testing. To maintain patient anonymity all patient identifiers were removed by hospital staff unaware of the current study results. Patient data including age and gender, ordering location, collection date, and laboratory data including CSF cell count and chemistry and Gram staining, culture and PCR results were recorded against a study specific identifier in a spreadsheet. Ethics approval for the study was obtained from the Research Ethics Boards (REB) of University of British Columbia, BC, Canada and Sidra Medicine, Doha, Qatar. A waiver of informed consent was requested and was approved by REBs of both institutions. All methods were performed in accordance with the relevant guidelines and regulations.

Establishment of a training set {#Sec10}
-------------------------------

Five out of nine negative CSF specimens were spiked with a range of bacterial and viral species. The remaining 4 were left un-spiked to serve as negative control. In addition, an un-spiked nuclease free water (NFW) sample was also included in the training set and processed simultaneously. For spiking, bacterial suspensions were freshly prepared in phosphate buffered saline (PBS) to a turbidity equivalent to a 0.5 McFarland standard and further diluted 10, 100 and 1,000-fold in PBS, as required. *N. meningitidis* (4.3 × 10^8^ CFU/ml), HSV2 (2.8 × 10^5^ TCID~50~/ml) and adenovirus (2.8 × 10^6^ TCID~50~/ml) were directly added from cultured stocks. Bacterial and viral preparations were spiked into 0.5 ml of CSF specimens to give approximate final titers shown in Table [1](#Tab1){ref-type="table"}, and vortexed for 10 s before extraction of DNA and analysis by qPCR and mNGS as described below.

qPCR and DNA sequencing {#Sec11}
-----------------------

Residual clinical samples were extracted on a QIAsymphony instrument (Qiagen) using the DSP Virus/Pathogen Mini kit. Total nucleic acids from spiked or unspiked specimens were extracted and analyzed by qPCR assays for various pathogens as described previously^[@CR29]^ and DNA concentration was measured in a Qubit 2.0 fluorometer using the Qubit dsDNA HS assay kit (Thermo Fisher Scientific, Inc.). To serve as an internal control for extraction, qPCR and NGS, a purified plasmid DNA pUC19 was spiked to each specimen prior to extraction at a final concentration of 1.4 × 10^5^ copies/ml. NGS libraries were prepared from 1 ng of extracted DNA using Nextera®XT DNA Sample Preparation Kit (Illumina), and sequencing was performed on an Illumina MiSeq sequencer using MiSeq Reagent Kit v2 (500-cycles) (Illumina) as described previously^[@CR29]^. The concentration of prepared NGS libraries were determined by Kappa qPCR according to manufacturer's instructions (Roche). Sequencing was performed in 3 different facilities: a) McGill University and Génome Québec Innovation Centre, Montréal (Québec), Canada b) Sidra Medicine, Doha, Qatar and c) Alliance Global Middle East, Beirut, Lebanon. Specimens were sequenced irrespective of the quality of NGS libraries. Confirmatory qPCR for *S. agalactiae* were performed as described previously^[@CR29]^. Bacterial 16S rRNA PCR was performed as described previously^[@CR30]^.

Bioinformatics {#Sec12}
--------------

Raw sequence data were analyzed either by Metaphlan2 pipeline^[@CR27]^ or uploaded to <https://idseq.net> for automated metagenomic analysis without any pre-processing of data. IC reads were obtained by mapping raw sequence reads to pUC19 plasmid sequence using Bowtie2 plugin in Geneious 11.1.5 software.

Statistical analysis {#Sec13}
--------------------

The linear correlation of NGS data with that of PCR results was determined by calculating Pearson product-moment correlation coefficient in excel followed by determining the significance level at p \< 0.05. Diagnostic sensitivity, specificity, positive predictive value (PPV), negative predictive value (NPV) and accuracy (concordance) were calculated using an online, diagnostic test evaluation calculator, and associated 95% confidence intervals (CI) were calculated by the Clopper-Pearson interval or exact method using the same calculator^[@CR31]^.

Supplementary information
=========================

 {#Sec14}

Supplementary information

**Publisher\'s note**

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Supplementary information
=========================

is available for this paper at 10.1038/s41598-020-68159-z.

The study was supported by British Columbia Children's Hospital Foundation, Canada (Grant no. KRZ28061 to M.R.H.) and Sidra Medicine, Qatar (Grant no. SIRF_200026 to M.R.H.). We are grateful to the IDseq team for providing technical support for data upload and analysis.

P.T., R.T. and M.R.H. conceived the idea. M.R.H. designed the study, performed data analysis and wrote the manuscript. S.S. and K.M.T. performed the laboratory work. P.T. obtained specimens and associated clinical and laboratory data from the clinical cohort. P.T. provided critical inputs on experimental approach and data analysis. A.P.L. and M.J. provided input on data interpretation. All authors contributed to the revision of the manuscript.

The non-host reads from simulated and patient CSF samples tested in this study are available in <https://idseq.net/> under the project name 'CSF_metagenomics'.

The authors declare no competing interests.