PT - JOURNAL ARTICLE AU - Heupink, Tim H. AU - Verboven, Lennert AU - Sharma, Abhinav AU - Rennie, Vincent AU - de Diego Fuertes, Miguel AU - Warren, Robin M. AU - Rie, Annelies Van TI - The MAGMA pipeline for comprehensive genomic analyses of clinical <em>Mycobacterium tuberculosis</em> samples AID - 10.1101/2023.10.04.23296533 DP - 2023 Jan 01 TA - medRxiv PG - 2023.10.04.23296533 4099 - http://medrxiv.org/content/early/2023/10/05/2023.10.04.23296533.short 4100 - http://medrxiv.org/content/early/2023/10/05/2023.10.04.23296533.full AB - Background Whole genome sequencing (WGS) holds great potential for the management and control of tuberculosis. Accurate analysis of samples with low mycobacterial burden, which are characterized by low (&lt;20x) coverage and high (&gt;40%) levels of contamination, is challenging. We created the MAGMA (Maximum Accessible Genome for Mtb Analysis) bioinformatics pipeline for analysis of clinical Mtb samples.Methods and results High accuracy variant calling is achieved by using a long seedlength during read mapping to filter out contaminants, variant quality score recalibration with machine learning to identify genuine genomic variants, and joint variant calling for low Mtb coverage genomes. MAGMA automatically generates a standardized and comprehensive output of drug resistance information and resistance classification based on the WHO catalogue of Mtb mutations. MAGMA automatically generates phylogenetic trees with drug resistance annotations and trees that visualize the presence of clusters. Drug resistance and phylogeny outputs from sequencing data of 79 primary liquid cultures were compared between the MAGMA and MTBseq pipelines. The MTBseq pipeline reported only a proportion of the variants in candidate drug resistance genes that were reported by MAGMA. Notable differences were in structural variants, variants in highly conserved rrs and rrl genes, and variants in candidate resistance genes for bedaquiline, clofazmine, and delamanid. Phylogeny results were similar between pipelines but only MAGMA visualized clusters.Conclusion The MAGMA pipeline could facilitate the integration of WGS into clinical care as it generates clinically relevant data on drug resistance and phylogeny in an automated, standardized, and reproducible manner.- Accurate analysis of clinical samples is challenging when samples have high levels of contamination and low Mycobacterium tuberculosis genome coverage- When analyzing primary liquid (MGIT) cultures, the MAGMA pipeline generates clinically relevant drug resistance information (including major, minor and structural variants) and phylogeny in an automated, standardized and reproducible way.- MAGMA-generated phylogenetic trees are annotated with drug resistance information and updated with every run so that they can be used to make clinical or public health decisions- MAGMA reports drug resistance variants for all tier 1 and tier 2 candidate drug resistance conferring genes, with interpretation of their relevance to drug resistance (associated with drug resistance, not associated with drug resistance or unknown significance) based on the WHO catalogue of mutations in Mycobacterium tuberculosis.Competing Interest StatementA.S. was an employee of Seqera Labs S.L. during the initial development of the pipeline. Seqera Labs S.L. is the driving company behind the open source Nextflow software. A.S. has also worked on a Nextflow wrapper for the MTBseq pipeline. The remaining authors declare that they have no competing interests.Funding StatementThis research was funded by the Research Foundation Flanders (FWO) strategic basic research grant 1SB4519N, (PhD funding for L.V.), the FWO Odysseus grant G0F8316N, and the FWO applied biomedical research with a primary social finality T001018N. The funding body played no role in the design of the study and will not play any role in data collection, analysis, and interpretation of data and in writing the manuscript.Author DeclarationsI confirm all relevant ethical guidelines have been followed, and any necessary IRB and/or ethics committee approvals have been obtained.YesThe details of the IRB/oversight body that provided approval or exemption for the research described are given below:Ethics approval was obtained in context of the SMARTT trial from ethics committees of the University of the Free State Health Sciences Research Ethics Committee (UFS-HSD2019/0364/2004), Stellenbosch University Health Research Ethics Committee (N19/07/100), and the University of Antwerp (21/18/239).I confirm that all necessary patient/participant consent has been obtained and the appropriate institutional forms have been archived, and that any patient/participant/sample identifiers included were not known to anyone (e.g., hospital staff, patients or participants themselves) outside the research group so cannot be used to identify individuals.YesI understand that all clinical trials and any other prospective interventional studies must be registered with an ICMJE-approved registry, such as ClinicalTrials.gov. I confirm that any such study reported in the manuscript has been registered and the trial registration ID is provided (note: if posting a prospective study registered retrospectively, please provide a statement in the trial ID field explaining why the study was not registered in advance).YesI have followed all appropriate research reporting guidelines, such as any relevant EQUATOR Network research reporting checklist(s) and other pertinent material, if applicable.YesAll data produced in the present work are contained in the manuscript, or available upon reasonable request to the authors.