VirGrapher: a graph-based viral identifier for long sequences from metagenomes

Lin, Chen, Yan Miao, Zhenyuan Sun, Chenjing Ma, Chen Lin, Guohua Wang, Chunxue YangBriefings in Bioinformatics 2024 · DOI

TL;DR

VirGrapher introduces a novel graph-based approach to identify long viral sequences in metagenomic data. By representing sequences as graphs and leveraging Graph Convolutional Networks (GCNs), it captures relationships between subsequences that are missed by existing methods, leading to improved accuracy in viral identification.

What Problem Does This Paper Address?

Metagenomics allows us to study microbial communities without culturing, offering a glimpse into the vast and diverse world of viruses. However, accurately identifying viral sequences within these complex mixtures is a significant challenge, especially for longer sequences. Current deep learning methods often break down long viral sequences into smaller, non-overlapping chunks, analyze them independently, and then average their scores. This approach can lose crucial information about the relationships between different parts of a long sequence, potentially leading to misclassification and reduced accuracy. This paper aims to bridge this gap by developing a method that explicitly models these inter-sequence relationships for more robust long viral sequence identification.

Methods

The core of VirGrapher lies in its innovative use of graph neural networks. The process begins by dividing a long sequence into smaller subsequences, which are then treated as nodes in a graph. A GCN-based node embedding network is employed to learn representations (embeddings) for these nodes. Crucially, VirGrapher constructs a graph with "multilayer connections" that capture relationships between these subsequences. This graph structure is then processed by a Graph Convolutional Network (GCN) model, enhanced with a Graph Self-Attention (GSA) mechanism and relative positional coding. This allows the model to learn complex, long-range dependencies within the sequence. Finally, a graph-based classifier, using a softmax layer, makes the final viral/non-viral prediction.

Datasets

The study utilizes several datasets for training and evaluation:

  • Training Data: Approximately 13,274 virus RefSeq genomes and 4,410 host RefSeq genomes were used. For embedding training, sequences were progressively split into smaller fragments (9000 bp, 900 bp, 90 bp, 9-mer, and individual bases).
  • Validation Set: 10,000 viral and 10,000 host sequences (9000 bp each) were used for validation.
  • Testing Datasets:
    • CAMI Challenge Datasets: CAMI_high Dataset and CAMI Marine Dataset were used. These datasets were curated by mapping sequences to virus and host RefSeqs using BLAST.
  • Real Human Gut Metagenome: Reads were downloaded from NCBI (accession ID: SRA052203) and processed similarly.
  • Novel Viral Sequences: A set of 4,129 long viral sequences (9000 bp) discovered between October 2020 and December 2022 were used to assess the potential for identifying unknown viral species.

Key Insights and Ideas

  • The Importance of Context: The paper strongly emphasizes that breaking down long sequences into independent short ones discards valuable contextual information. VirGrapher's success hinges on its ability to re-establish and leverage these relationships.
  • Graph Representation for Sequences: Treating sequences as graphs is a powerful paradigm shift. It allows for the application of graph-based learning techniques to capture intricate dependencies that linear models might miss.
  • Layered Embedding for Hierarchical Information: The multi-stage GCN-based node embedding process is key to learning representations at different granularities, from large segments down to individual bases, effectively capturing hierarchical information within the sequence.
  • Self-Attention for Relationship Weighting: The integration of Graph Self-Attention (GSA) allows the model to dynamically weigh the importance of different connections within the graph, further refining its understanding of sequence relationships.

Key Results

VirGrapher demonstrated superior performance compared to three benchmark methods (DeepVirFinder, PPR-Meta, and CHEER) across various datasets:

  • Validation Set: Achieved the highest AUC of 0.9604 and an accuracy of 0.9413.
  • CAMI_high Dataset: Achieved an AUC of 0.7727 and an accuracy of 0.7437.
  • CAMI Marine Dataset: Achieved an AUC of 0.8494 and an accuracy of 0.8014.
  • Human Gut Metagenome: Achieved the highest AUC of 0.9193 and an accuracy of 0.8590.
  • Novel Viral Sequences: VirGrapher identified the most novel viral sequences (2016 out of 4129), suggesting its potential for discovering new viruses.
  • Short Viral Sequences: While VirGrapher's performance on short sequences (500 bp) was slightly lower than some benchmarks, the difference was deemed acceptable given its strength in long sequence identification.
  • Running Time: VirGrapher had the highest testing time consumption (653s) due to its complex GCN-based embedding and graph feature extraction, but remained within practical limits.

Limitations and Future Work

  • Short Sequence Performance: The authors acknowledge that VirGrapher's performance on very short viral sequences is not as strong as its performance on long sequences. This is attributed to the simpler graph structure and potentially insufficient information for robust learning.
  • Computational Cost: The GCN-based node embedding and graph-based feature extraction contribute to a higher computational cost during testing compared to some other methods.
  • Future Work: The paper suggests that VirGrapher's improved accuracy in identifying viral sequences could have a significant impact on downstream analyses, such as understanding viral taxonomy, host prediction, and exploring virus-host interactions. The authors hope VirGrapher will be a valuable tool in the field of virus analysis.

Summary updated

BibTeX
@article{chen2024virgrapher,
  author = {LIN, CHEN and Yan Miao and Zhenyuan Sun and Chenjing Ma and Chen Lin and Guohua Wang and Chunxue Yang},
  title = {{VirGrapher: a graph-based viral identifier for long sequences from metagenomes}},
  journal = {Briefings in Bioinformatics},
  year = {2024},
  doi = {10.1093/bib/bbae036},
}
Figure