FetchM: streamlining genome and metadata integration for bacterial comparative genomics
Abstract
<h4>Motivation</h4>Large-scale bacterial comparative genomics require comprehensive metadata describing genome assemblies and their biological context. While NCBI Genome holds the assemblies and BioSample stores key contextual fields such as collection date, host, and location, the lack of integration requires researchers to manually merge the two sources, slowing large-scale comparative studies. To address the gap, we built FetchM, a Python-based tool for automated retrieval, integration, analysis, and visualization of bacterial genome metadata from NCBI Genome and BioSample records. FetchM links genome assemblies to their corresponding BioSample entries via the NCBI Entrez API, appends missing contextual fields, and generates summary tables and plots. The tool supports sequence filtering by user-defined criteria (e.g. year, host, country, continent) and produces ready-to-analyze datasets for downstream workflows.<h4>Results</h4>FetchM was applied to 14 382 <i>Vibrio cholerae</i> genome assemblies retrieved from NCBI, successfully integrating BioSample-associated metadata at scale. Temporal metadata were available for 89.07% of records, geographic metadata for 86.37%, and host metadata for 40.92%, highlighting persistent gaps in publicly available contextual data. Genome assembly sizes and annotation features were consistent with known biological expectations, supporting the accuracy of the retrieval workflow. Manual validation of selected records demonstrated high agreement between FetchM outputs and source metadata across key fields. These results indicate that FetchM enables reliable, scalable integration of genomic and contextual metadata, while also exposing limitations in metadata completeness across public repositories.<h4>Availability and implementation</h4>FetchM is licensed under MIT and is freely available at https://github.com/Tasnimul-Arabi-Anik/FetchM and PyPI.