AWS Public Sector Blog

AI-enabled genomic pattern discovery in Epstein-Barr virus on Amazon EC2

The world of genomics holds the key to understanding and combating many human diseases. However, analyzing the immense volume of genomic data necessary to find meaningful patterns is a monumental task. Traditional methods, although essential, face challenges in scalability and the discovery of novel, complex patterns across large datasets.

This post, which details a collaboration between a national genomics research institute and Temus using Amazon Web Services (AWS), demonstrates the power of combining deep bioinformatics with advanced AI models and machine learning methods in a scalable AWS environment to uncover novel patterns in complex viral genomes. In this post, we explore the details of a scalable proof of concept (POC) pipeline built on AWS that uses an advanced genomic foundation model and unsupervised clustering to transform raw genomic sequences into signals for further research.

This project provides a blueprint that can help researchers accelerate biomedical discovery. This work is part of Singapore’s broader Nasopharyngeal Carcinoma (NPC) Large Collaborative Grant program, a national research effort focused on improving early detection and understanding of Epstein-Barr virus (EBV)-driven NPC.

Analyzing viral genomes at scale

The national genomics research institute wanted to explore whether emerging genomic foundation models could help researchers analyze EBV genomes at the strain level, with a focus on NPC, healthy controls, sample type, and geography.

The challenge was both scientific and computational. Full-length EBV genomes are large and complex, and comparing them at scale using traditional analytical workflows alone involves immense manual effort. The crucial turning point came with the recent maturation of AI models capable of generating reliable representations called embeddings from complex genomic sequences.

Previously, these models were often viewed as untrustworthy black boxes. Their growing sophistication combined with collaborative efforts between Temus and the research institute to build trust and integrate AI-driven insights into expert workflows made this type of analysis both feasible and efficient.

An AI-powered pipeline on AWS

Temus developed a scalable POC pipeline to support this exploration, providing expertise spanning solution architecture, pipeline engineering, and collaborative validation.

The architecture used Amazon Simple Storage Service (Amazon S3) for durable storage of more than 1,300 EBV genome samples, metadata, and resulting analysis artifacts. For the intensive computational tasks, the team used GPU-powered Amazon Elastic Compute Cloud (Amazon EC2) instances and powerful NVIDIA H200 and L40 GPUs to meet the memory and compute requirements of full-length EBV analysis.

The workflow involved several key steps:

  • Preprocessing raw genomic data – A key challenge was processing the raw genomic data, which came in both full-length FASTA format (a text-based format for storing full-length genome sequences) and the much larger, more complex FASTQ format (a text-based format for storing raw, fragmented sequence reads along with quality scores). The FASTQ files, containing tens of millions of short sequencing reads, presented a significant compute challenge. To address this, the team engineered a multistep preprocessing pipeline using specialized bioinformatics tools. This pipeline efficiently extracted the relevant EBV reads from the raw data, removed duplicates, and intelligently subsampled the information to make the subsequent AI analysis computationally manageable.
  • Selecting the right foundation model – After researching various open source genomics foundation models, the team selected Evo2. It was chosen for its ability to process long sequences and its hybrid Transformer-Convolution architecture (StripedHyena 2), which combines the strengths of different deep learning approaches to effectively convert the genomic data into rich numerical embeddings.
  • Dimensionality reduction and clustering – The team experimented with several methods to find meaningful patterns in the high-dimensional embeddings. They used principal component analysis (PCA) for initial dimensionality reduction, followed by hierarchical density-based spatial clustering (HDBSCAN). HDBSCAN was chosen over other methods because it doesn’t require presetting the number of clusters and handles uneven cluster density well, which was relevant given the dataset’s complex composition.
  • Visualization – To visualize the natural structure of the clusters, the team used Uniform Manifold Approximation and Projection (UMAP), which preserves local relationships in the data, making the clusters more straightforward to interpret visually.

From a security standpoint, the architecture employed standard AWS Identity and Access Management (AWS IAM) roles for authentication and relied on Amazon Virtual Private Cloud (Amazon VPC) security groups to enforce strict network access controls so only authorized team members had access permissions.

From raw sequence to actionable biological signal

The proof of concept demonstrated that an AI-driven approach can effectively extract meaningful biological signals from complex genomic data.

Visually, the analysis revealed distinct, well-separated clusters, indicating a clear, non-random structure within the EBV embedding space, as shown in Figure 1. This snapshot of a 3D UMAP plot shows the relationships between more than 1,300 EBV genomes as understood by the AI model.

Each point is a single virus, and colors indicate distinct clusters identified by the HDBSCAN algorithm. The clear separation between large clusters, such as the NPC-majority group (red) and the Healthy-majority group (brown), suggests that the AI-driven analysis captured patterns related to clinical outcomes. Furthermore, the model identified smaller but highly pure clusters, such as the Burkitt lymphoma (BL) majority group (dark green), demonstrating its ability to surface rare but potentially significant biological signals.

3D UMAP scatter plot of sample clusters. Four labeled clusters form distinct shapes: Cluster 3 (red, NPC majority) is a long arc across the top; Cluster 5 (brown, Healthy majority) is a long, branching trail running vertically through the center; Cluster 8 (gold, CaEBV majority) is a diagonal line at upper right; and Cluster 2 (green, BL majority) is a small vertical segment at left. Several smaller unlabeled clusters (purple, blue, orange, pink, gray) appear as isolated groups, and all clusters are well separated.

Figure 1: Visualizing the hidden patterns in viral genomes

This was supported by strong statistical validation:

  • High cluster purity – High purity was achieved for disease-type labels, ranging from 69–97 percent across various clusters associated with different clinical conditions.
  • Strong cluster stability – For key clusters, the average assignment probability for the dominant disease type exceeded 0.85, indicating strong cluster cohesion.
  • Statistical significance – Near-zero p-values indicated that the cluster structure was statistically significant and not a result of random chance.

Although these findings require further biological and clinical validation, the POC suggests that genome embeddings might help researchers surface candidate signals for downstream investigation, including EBV disease-risk studies, NPC subtyping research, and biomarker exploration.

Conclusion and next steps

This project demonstrates how cloud infrastructure, AI engineering, and biomedical research expertise can be combined to create scalable, repeatable workflows for genomic pattern discovery. The immediate focus is on strengthening the infrastructure and governance foundation to support broader experiments, which could provide the possibility of larger cohort validation at scale.

To establish true biological and clinical relevance, the critical next steps are to validate these findings for both reproducibility and robustness. This involves reproducing the analysis in a larger, independent sample cohort and cross-validating the results using alternative genomic AI foundation models. This rigorous validation is essential to establish that the findings represent fundamental biological signals rather than artifacts of a specific dataset or a single generation of AI models.

Additional relevant resources

To learn more about how AWS is helping to accelerate research and discovery, you can explore the following resources:

Acknowledgements

We would like to express our thanks to Dr. Charlie Lee, AWS Genomics industry lead for Asia-Pacific and Japan, and Mike Lim, AWS senior solutions architect, for their assistance with AWS services and for their valuable review and feedback on this post.

We would like to thank the wider Temus team, including Kitty Lee (MD, Healthcare), Kah Lin Goh (director, Healthcare), Jia Hao Tan (senior manager, AIxData), and Ryan Loi (AI engineer), who helped make this work possible.

Dr. Nandini Sahu

Dr. Nandini Sahu

Dr. Nandini Sahu is a senior AI engineer at Temus. She applies her deep background in data-driven science, gained from a PhD in astrophysics, to build scalable, production-grade AI solutions. Her work at Temus focuses on foundation models and applying machine learning to complex challenges, including the analysis of high-dimensional genomic data.

Dr. Charlie Lee

Dr. Charlie Lee

Dr. Charlie Lee is genomics industry lead for Asia-Pacific and Japan at Amazon Web Services (AWS) and has a PhD in computer science with a focus on bioinformatics. An industry leader with more than two decades of experience in bioinformatics, genomics, and molecular diagnostics, he is passionate about accelerating research and improving healthcare through genomics with cutting-edge sequencing technologies and cloud computing.

Eddie Chin

Eddie Chin

Eddie Chin is a senior manager at Temus. He works across consulting, product management, and innovation projects that explore emerging technologies such as AI, with experience spanning both private and public sector engagements. He brings this cross-disciplinary background to translate complex research into practical, deployable outcomes.

Mike Lim

Mike Lim

Mike Lim is a Senior Solutions Architect at Amazon Web Services (AWS) supporting healthcare, genomics and social customers across Singapore, with technical focus on AI/ML, security, and cloud operations. He works closely with customers to achieve their business goals with AWS cloud services.