{'fraction_non_alphanumeric': 0.04024496937882765, 'fraction_numerical': 0.02347623213764946, 'mean_word_length': 5.179279279279279, 'pattern_counts': {'":': 0, '<': 1, '<?xml version=': 0, '>': 0, 'https://': 2, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
HLA predictions from long sequence read alignments, streamed directly into HLAminer

The rapidly changing landscape of sequencing technologies brings new opportunities to genomics research. Longer sequence reads and higher sequence throughput coupled with ever-improving base accuracy and decreasing per-base cost is now making long reads suitable for analyzing polymorphic regions of the human genome, such as those of the human leucocyte antigen (HLA) gene complex. Here I present a simple protocol for predicting HLA signatures from whole genome shotgun (WGS) long sequencing reads, by directly streaming sequence alignments into HLAminer. The method is as simple as running minimap2, it scales with the number of sequences to align, and can be used with any read aligner capable of sam format output without the need to store bulky alignment files to disk. I show how the predictions are robust even with older and less [base] accurate WGS nanopore datasets and relatively low (10X) sequence coverage and present a step-by-step protocol to predict HLA class I and II genes from the long sequencing reads of modern third-generation technologies.


Introduction
The landscape of commercially available nucleic acid sequencing technologies is rapidly changing [1], and in recent years, long (N50 ∼ 10-20 kbp) and ultra-long (<1 Mbp) DNA sequencing reads such as those offered by Pacific Biosciences of California, Inc. (PacBio, Menlo Park, CA) and Oxford Nanopore Technologies PLC (ONT, Oxford, UK) are becoming embedded in more genome sequencing projects [2] [3]. This is in part because long reads are able to span large genomic repeats, enable allele phasing, and even provide methylation signals without the need for specialized nor additional sample preparation [4]. And with the recently released Q20+ chemistry from ONT and CCS (HiFi) technology from PacBio, the base accuracy gap between long and short reads is shrinking, providing unprecedented opportunities for the analysis of genomes, including the characterization of challenging polymorphic gene loci like the Major Histocompatibility Complex (MHC).
The human MHC, also known as the Human Leucocyte Antigen (HLA) complex, is a multi-gene locus with closelylinked variable genes, which play key roles in adaptive immunity. HLA includes two main classes of genes (I and II), which are further divided into several main groups (class I: A, B, C; class II: DQA1, DQB1, DRB1, DPA1, DPB1). Overall, thousands of genes have been catalogued [5], each one encoding a version of the HLA cell surface receptor with a certain specificity to foreign-derived antigen peptide epitopes. HLA-epitope presentation to T cells is at the heart of the immune response in humans, pinning HLA as a disease determinant [6]. HLA can also inform disease susceptibility/risk in population/patient cohorts [7] and in the clinic, knowing the HLA signature of patients is vital to organ transplant, to ensure a match between graft and host, for instance.
A decade ago, I developed HLAminer, the first bioinformatics approach for automated prediction of HLA genes from random whole-genome shotgun (WGS), transcriptome (RNA-seq) or whole-exome sequencing (WES) short read datasets, alleviating the need for additional sample preparation, sequencing kit, costs, specialized and manual labour typically required for analysis of clinical HLA typing data [8]. The approach originally relied on either targeted de novo sequence assembly or direct sequence alignments of short, Illumina-sized reads. Over time, other methods followed suit and new approaches emerged [9] [10]. Back in 2018, I adapted HLAminer (v1.4) to predict HLA genes from any long sequences, by streaming sequence alignment output directly into HLAminer. Here I present a simple protocol along with benchmarks using four ONT PromethION and PacBio HiFi whole genome shotgun datasets derived from three individuals with known, clinically-derived HLA types.

Methods
Data Nanopore long read WGS datasets for human individuals NA12878 and NA19240 and PacBio CCS data for individual NA24385 were downloaded from the ENA https://www.ebi.ac.uk/ena using accessions SRR10965087, ERR2585115 and SRX5327410, respectively. The NA24385 (HG002) ONT dataset was downloaded as per the instructions provided in https://labs.epi2me.io/gm24385_2021.05/. HLAminer requires up-to-date HLA genes files (Protocol section step 2, below) and, to be successful, predictions from direct read alignments must include all known HLA genes and unrelated genomic regions in one reference (GCA_000001405.15_GRCh38_genomic.chr-only-noChr6-HLA-I_II_GEN.fa.gz), to help prevent spurious off-target long read alignments to HLA genes.

Results
HLAminer was used to predict the main HLA-I (Table 1) and HLA-II (Table 2) alleles from three ONT and one PacBio HiFi human WGS datasets corresponding to three individuals (NA12878, NA19240 and NA24385), directly from streamed minimap2 sequence alignments. Group-level (2-digit) predictions matched all but one (94% accuracy) and three (88% accuracy) clinically-derived types for HLA-I and -II, respectively (Tables 1 and 2). Allele-level (4digit) predictions were largely consistent between HLAminer and clinically determined types, for both HLA-I and -II, and considering the low sequencing coverage (e.g. 10X) and low-base accuracy of earlier base-called dataset versions (guppy v1.4.0), performed robustly well. Interestingly, when compared to HLA-II, HLA-I allele predictions from higher-coverage (39X and 67X) promethION datasets were closer to their clinically typed counterparts, and in one case is even corroborated between two different sequencing platforms (HLA-B*35:01 predicted from both ONT and PacBio vs. clinically typed as B*35:08, for NA24385/HG002). The run time for predictions varied between datasets, and roughly scaled with the number of sequencing reads to align, with minimap2 being the primary pipeline bottleneck for both run time and random-access memory (Table 3). Table 1: HLA-I predictions from HLAminer (A,B,C,D) directly from human whole genome shotgun long sequencing reads datasets, compared to their clinically determined HLA types (bold). The lowest numbered allele is indicated when two or more alleles are predicted for a group

Conclusions
I present a simple protocol for predicting the likely HLA makeup of human samples, by streaming associated WGS (or RNA-seq) long sequencing read alignments directly into HLAminer. The method is as easy as running minimap2 itself, is agnostic to sequence aligners as long a they output alignments in the sam format, and is robust to relatively high base error and low sequence coverage. As more and more genomics projects include a long sequencing read data component, I expect HLAminer to continue providing valuable HLA predictions and insights to the scientific community.