Metacontextify: automated environmental annotation of marine metagenomic samples
Abstract
Abstract Background Environmental metadata is essential for using metagenomic and microbiome data to gain relevant biological insights like relations between the environment and microbial communities, genome content and protein-level adaptations. Unfortunately, obtaining standardized environmental context for those samples remains difficult. One possible solution is to use Earth observation data to retrieve the missing metadata. However, using such data requires spatiotemporal coordinate matching and handling large environmental datasets in specialized file formats, creating a barrier for its applicability. Results Metacontextify addresses this gap by automatically retrieving environmental properties (e.g., temperature, salinity, pH, nutrients) for marine metagenomic samples using Copernicus Marine Service data. The tool connects ENA and MGnify identifiers or sampling coordinates and dates to historical environmental observations, enabling large-scale ecological, genomic, and functional analyses. The tool is used to study the difference in environmental context between cold-shock proteins, involved in adaptation to temperature decreases, and antifreeze proteins, which prevent ice formation in the cell. We show that cold-shock proteins are present across the full range of marine temperatures observed in the dataset, while antifreeze proteins are predominantly found below 5 ∘ C (83% of matched proteins). However, we observe a negative association between temperature and the number of cold-shock proteins per sample (Spearman correlation of -0.439, p -value 1.2 × 10 −70 ). After a genome-level analysis, we find a negative correlation between genome length and temperature ( ρ = − 0.28, p = 4.2 × 10 −65 ) and a positive correlation between genome length and the count of cold-shock proteins in a genome ( ρ = 0.41, p = 1.5 × 10 −144 ). Conclusion Metacontextify enables researchers to integrate environmental context into large-scale metagenomic analyses, even when original datasets lack environmental metadata. This is shown for a collection of marine samples where the number of samples with temperature annotations increased 1.45-fold. For the use case, we identified distinct temperature-associated distributions of cold-shock and antifreeze proteins and demonstrated how environmental contextualization can reveal biologically meaningful patterns in large metagenomic datasets. Metacontextify is implemented in Python and is freely available under an MIT license. It can be installed via pip, conda or a container image and is accessible as a Python library and command-line tool with source code available on GitHub.
// Source
Authors: Maarten Langen, Vera van Noort
Institutions: KU Leuven, Leiden University, University of Applied Sciences Leiden, 3D Systems (Belgium)