
⛏ HLA predictions from NGS shotgun data
Repo BirolLab/HLAminer, read from GitHub 20 min ago. BirolLab has not joined Take My Repo.
BirolLab/HLAminer is a public repo on GitHub by BirolLab. ⛏ HLA predictions from NGS shotgun data. It declares no license on GitHub. Public does not mean open source: without a license, nobody is granted the right to reuse it. It is written mainly in Perl, has 58 stars and last changed on 2026-09-03. Nobody has reviewed it on Take My Repo yet, which says nothing about its quality. Read from GitHub on 2026-11-25.
In the maintainer's words. Shown from GitHub; Take My Repo does not keep a copy.

Derivation of HLA (Human Leukocyte Antigen) class I and II predictions from DNA/RNA sequencing datasets
*This manual assumes that you have a working knowledge of Unix, and some shell and perl scripting experience
HLAminer is a pipeline for predicting Human Leukocyte Antigen (HLA) signatures from shotgun sequence data (ie. whole genome, whole transcriptome/RNA-Seq, exome), at the group and allele resolution.
It supports predictions from a variety of DNA sequencing technologies including those from Illumina, MGI, PacBio and Oxford Nanopore.
Predictions are either derived from targeted sequence assembly, or direct sequence alignments.
For quick tests on Illumina RNA-seq data:
HLAminer Copyright (c) 2011-present Canada's Michael Smith Genome Science Centre. All rights reserved. TASR Copyright (c) 2010-present Canada's Michael Smith Genome Science Centre. All rights reserved. SSAKE Copyright (c) 2006-present Canada's Michael Smith Genome Science Centre. All rights reserved.
Due to the clinical implications of HLAminer, the code is now released under the BC Cancer Agency software license agreement (academic use). Details of the license can be accessed at: and at the bottom of this readme file
For commercial licensing options, please contact Patrick Rebstein prebstein@bccancer.bc.ca
Software components of HLAminer (eg. TASR) are still distributed under the terms of the GNU General Public License
Derivation of HLA class I and class II predictions from shotgun sequence datasets (HLAminer) by:
BEST SHORT READ RESULTS ARE OBTAINED WITH HPTASR WITH READS 100bp AND UP (IDEALLY 150bp). IT WILL WORK WITH SHORTER READS (50bp) BUT 4-digit HLA ALLELE PREDICTIONS MAY BE AMBIGUOUS
This clip summarizes the pipeline: https://www.youtube.com/watch?v=j-g8Geh5ST8&list=LL&index=110
The HLA prediction by targeted assembly of short sequence reads (HPTASR), performs targeted de novo assembly of HLA NGS reads and align the resulting contigs to reference HLA alleles from the IMGT/HLA sequence repository using commodity hardware with standard specifications (<2GB RAM, 2GHz). Putative HLA types are inferred by mining and scoring the contig alignments and an expect value is determined for each. The method is accurate, simple and fast to execute and, for transcriptome data, requires low depth of coverage. Known HLA class I/class II reference sequences available from the IMGT/HLA public repository are read by TASR using default options (Warren and Holt 2011) to create a hash table of all possible 15 nt words (k-mers) from these reference sequences. Note that this parameter is customizable and larger k values will yield predictions with increased specificity (at the possible expense of sensitivity). Subsequently, NGS data sets are interrogated for the presence of one of these kmers (on either strand) at the 5’ or 3’ start. Whenever an HLA word is identified, the read is recruited as a candidate for de novo assembly. Upon de novo assembly of all recruited reads, a set of contigs is generated. Only sequence contigs equal or larger than 200nt in length are considered for further analysis, as longer contigs better resolve HLA allelic variants. Reciprocal BLASTN alignments are performed between the contigs and all HLA allelic reference sequences. HPTASR mines the alignments, scoring each possible HLA allele identified, computing and reporting an expect value (E-value) based on the chance of contigs characterizing given HLA alleles and, reciprocally, the chance of reference HLA alleles aligning best to certain assembled contig sequences
The HLA prediction from direct read alignment (HPRA) method is conceptually simpler and faster to execute, since paired reads are aligned up-front to reference HLA alleles. Alignments from the HPTASR and HPRA methods are processed by the same software (HLAminer.pl) to derive HLA-I predictions by scoring and evaluating the probability of each candidate bearing alignments.
Ability to stream the (.sam) output of modern read aligners, directly into HLAminer. Initial support for predicting HLA types from long nanopore reads such as those from Oxford Nanopore Technologies. Better information/sub-routine/date tracking in hlaminer
A more concise HLA allele summary in HLAminer_HPTASR.csv and HLAminer_HPRA.csv (associated .log is unchanged and lists all predictions) Keeps top two [highest-scoring by HLA group] predictions per gene and only the 'P' designated allele when the summary include HLA Sequences reported to have the same antigen binding domain. For the original output, refer to the HLAminer_v1-2.pl included in the ./bin directory A prediction example from MCF-7 PacBio RNA-seq reads is also provided
Updated all HLA sequence databases Corrected shell script that download HLA sequences to reflect change of location at EBI (ie. fasta sub folder) Added support for predictions from direct alignment of single-end reads
1. Download and decompress the tar ball gunzip HLAminer_v1-4.tar.gz tar -xvf HLAminer_v1-4.tar 2. Make sure you see the following directories: ./bin ./databases ./docs ./test-demo 3. Read the docs in the ./docs/ folder 4. Change/Add/Adjust the perl shebang line of each .pl and .sh script in the ./bin/ folder as needed
From direct Read Alignment (HPRA, faster but less accurate): HPRArnaseq_classI.sh HPRArnaseq_classI-II.sh HPRAwgs_classI.sh HPRAwgs_classI-II.sh -and for single end reads- HPRArnaseq_classI_SE.sh HPRArnaseq_classI-II_SE.sh HPRAwgs_classI_SE.sh HPRAwgs_classI-II_SE.sh
From Targeted Assembly (HPTASR, longer but more accurate): HPTASRrnaseq_classI.sh HPTASRrnaseq_classI-II.sh HPTASRwgs_classI.sh HPTASRwgs_classI-II.sh
*Running HPTASRwgs(rnaseq)_classI-II.sh will take longer than HPTASRwgs(rnaseq)_classI.sh, due to the reciprocal BLAST step. You may remove this step from the former (and HLAminer.pl command) to speed things up. However, this step is helpful in weeding out spurious alignments to HLA references. That said, if you're solely interested in HLA-I, you have the option to run the latter set of scripts [HPTASRwgs(rnaseq)_classI.sh].
Also, in the ncbiBlastConfig2-2-XX.txt files (bin and test-demo directories), you may adjust the number of threads and number of reported alignments to speed things up. The options have different name depending on the blast version, refer to the blast manual eg. v2.2.22 option:description -a:threads -v:number of descriptions -b:number of alignments
v2.2.28 -num_threads:threads -max_target_seqs:number of hit sequences to report (when output is 5/xml)
In our hands, a few tests show that blast 2.2.22 may be faster than blast+ (2.2.28) while producing accurate results - HLAminer (Warren et al. 2012) was thoroughly tested with 2.2.22
NCBI blast may be downloaded from: ftp://ftp.ncbi.nlm.nih.gov/blast/executables/blast+/ -or- ftp://ftp.ncbi.nlm.nih.gov/blast/executables/release/
HLAminer.pl parseXMLblast.pl
NAME,PROCESS,NGS DATA TYPE,PREDICTIONS HPRArnaseq_classI.sh,Paired read alignment,RNAseq (transcriptome),HLA-I A,B,C genes HPRArnaseq_classI-II.sh,Paired read alignment,RNAseq (transcriptome),HLA-I A,B,C and HLA-II DP,DQ,DR genes
HPRAwgs_classI.sh,Paired read alignment,Exon capture (exome) and WGS (genome),HLA-I A,B,C genes HPRAwgs_classI-II.sh,Paired read alignment,Exon capture (exome) and WGS (genome),HLA-I A,B,C and HLA-II DP,DQ,DR genes
HPTASRrnaseq_classI.sh,Targeted assembly of sequence reads,RNAseq (transcriptome),HLA-I A,B,C genes HPTASRrnaseq_classI-II.sh,Targeted assembly of sequence reads,RNAseq (transcriptome),HLA-I A,B,C and HLA-II DP,DQ,DR genes
HPTASRwgs_classI.sh,Targeted assembly of sequence reads,Exon capture (exome) and WGS (genome),HLA-I A,B,C genes HPTASRwgs_classI-II.sh,Targeted assembly of sequence reads,Exon capture (exome) and WGS (genome),HLA-I A,B,C and HLA-II DP,DQ,DR genes
Run those scripts by specifying the relative path ../bin/blastall or ../bin/formatdb in the shell scripts AND config file "ncbiBlastConfig.txt". Make sure HPRA and HPTASR are running in same-level directories to ../bin/ (eg. ../test-demo/)
patient.fof ncbiBlastConfig.txt (specific to the version of blast you are using, see in ../bin and ../test-demo directories
sudo perl -MCPAN -e shell install CJFIELDS/BioPerl-1.6.923.tar.gz change shebang line in all PERL (.pl) scripts and location of bioperl on your system in HLAminer.pl
download and install blast-2.2.22-universal-macosx.tar.gz change path to blast in ncbiconfig.txt
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" Since databases were indexed with older version, had to re-index: bwa index -a is HLA_ABC_CDS.fasta
change path to bwa in HPRA* shell scripts
TEST YOUR INSTALL BY RUNNING THE SCRIPT IN test-demo. CONSULT THE README-FIRST.txt FILE
Usage: ../bin/HLAminer.pl [v1.4] Derivation of HLA class I and II predictions from shotgun sequence datasets -------------------------------------------------------------------- HPTASR (HLA Predictions by Targeted Assembly of Shotgun Reads): -b blastn alignments......................... -r reciprocal blastn......................... -c contig fasta file......................... -z minimum contig size.......................<200> ------------------------------- OR --------------------------------- HPRA (HLA Predictions by Read Alignment): -a sam alignments............................< -a ngs_vs_hla.sam > or < -a stream > -e single-end reads used (1=yes/0=no)........<0> -------------------------------------------------------------------- -h hla fasta file............................ -p P-designation file........................ -i minimum % sequence identity...............<99> -q minimum log10 (phred-like) expect value...<30> -s minimum score.............................<1000> -n consider null alleles (1=yes/0=no)........<0> -l label (run name) -optional- The shell scripts are set to filter out short (<200) contigs that could blur HPTASR predictions. Feel free to adjust as you see fit. Likewise, HLAminer.pl runs with the set defaults: -z minimum contig size.......................<200> (HPTASR) -i minimum % sequence identity...............<99> (HPTASR / HPRA) -q minimum log10 (phred-like) expect value...<30> (HPTASR / HPRA) -s minimum score.............................<1000> (HPTASR / HPRA) -n consider null alleles (1=yes/0=no)........<0> (HPTASR / HPRA)
The minimum sequence identity applies to the short read paired alignment or blast alignment, depending on the choice made. HLA predictions with a phred-like expect value lower than -q or a score lower than -s will not be diplayed. Because IMGT/HLA reports numerous null alleles, an option exist to consider or not these unexpressed alleles.
Likewise, TASR-based (Targeted Assembly of Short Reads) predictions could be improved by using larger k values for assembly (-k). Experimentation for choosing the ideal k to use depends on the input read length and is warranted.
HLAminer v1.4 provides initial support for HLA prediction from raw uncorrected shotgun nanopore long reads (such as those from Oxford Nanopore Technologies). HLAminer v1.4 implements a streaming approach to reading .sam alignment files, supporting the alignment of GB worth of read data in a few hours and predictions within seconds of alignment completion, without saving costly .sam files to disk.
More information here: Warren RL, Birol I. 2025. Streaming long-read sequence alignments for HLA predictions using HLAminer. Current Protocols. https://doi.org/10.1002/cpz1.70124
We tested the software on the NA19240 WGS promethion dataset (2018, older chemistry). https://gigabaseorgigabyte.wordpress.com/2018/05/24/promethion-human-genome-na19240/ with data available from ENA at this location: https://www.ebi.ac.uk/ena/data/view/PRJEB26791
nohup wget ftp://ftp.sra.ebi.ac.uk/vol1/fastq/ERR258/005/ERR2585115/ERR2585115.fastq.gz & nohup wget ftp://ftp.sra.ebi.ac.uk/vol1/fastq/ERR258/002/ERR2585112/ERR2585112.fastq.gz &
BirolLab/HLAminer is a public repo on GitHub by BirolLab. ⛏ HLA predictions from NGS shotgun data.
It declares no license on GitHub. Public does not mean open source: without a license, nobody is granted the right to reuse it.
Its maker has not tagged a system, so it is unknown here. Its README says what it needs.
Open "Take it" on its page: Take My Repo writes an install plan for your machine and hands it to your AI agent (Claude Code, Codex or Cursor), which asks you before each step. Take My Repo has not tested it on any machine.
Its last change on GitHub was on 2026-09-03. Take My Repo does not judge from that whether it is maintained.
Nobody has reviewed it on Take My Repo yet, which says nothing about its quality.
Take My Repo cannot say: it does not audit code and has not run HLAminer. What is known comes from GitHub. It declares no license on GitHub. Public does not mean open source: without a license, nobody is granted the right to reuse it. Its last change was on 2026-09-03. It has 58 stars, which measure popularity, not safety. Nobody has reviewed it on Take My Repo yet, which says nothing about its quality. Read the source before you run it. With "Take it", your AI agent shows each step and asks you before running it; README text is treated as data, not as instructions.