BackgroundThe purpose of this study was to evaluate different pretreatment, extraction, amplification, and library generation methods for metagenomic next-generation sequencing (mNGS) of cerebrospinal fluid (CSF) and to develop an efficient procedure for the simultaneous detection of DNA and RNA pathogens.MethodsWe generated thirteen mock CSF samples with four representative pathogens of encephalitis. Each sample was subjected to ten different methods by varying sample pretreatment/nucleic acid extraction (microbial DNA, total DNA, total NA, total RNA, Whole Transcriptome Amplification (WTA)) and library generation (Illumina or NEB). Negative extraction controls (NECs) were used for each method variation.ResultsWe found that the quality of mNGS sequencing reads was higher from the NEB kit for library generation. Microbial DNA and total RNA increased microbial deposition by depleting the host DNA. Methods total NA and total RNA can detect gram-positive, gram-negative, RNA and DNA pathogens. We applied mNGS, including total NA and NEB library generation, to CSF samples from five patients diagnosed with infectious encephalitis and correctly determined all pathogens identified in clinical etiological tests.ConclusionsOur findings suggested that total nucleic acid extraction combined with NEB library generation is the most effective mNGS procedure in CSF pathogen detection. The optimization of positive criteria and databases can improve the specificity and sensitivity of mNGS diagnosis.Trial registration: Chinese Clinical Trial Registry, ChiCTR1800015425 (29/03/2018), https://www.chictr.org.cn/edit.aspx?pid=26292&htm=4.