Skip to main content

HLA Consensus Genotyping

Pipeline VersionDate UpdatedDocumentation AuthorQuestions or Feedback
aou_9.0.0August, 2025WARP PipelinesFile an issue

Introduction to the HLA Consensus Genotyping workflow​

HLAGenotyping performs HLA typing from aligned sequencing reads. It extracts HLA-region reads, runs HLA-HD, and conditionally runs Polysolver/OptiType when two-field uncertainty is detected, then builds a consensus callset.

The workflow is designed for GRCh38-aligned data and outputs harmonized consensus calls suitable for downstream aggregation.

Quickstart table​

Pipeline FeatureDescriptionSource
Analysis typePer-sample HLA genotyping and consensus calling
Workflow languageWDL 1.0openWDL
Data input file formatBAM/CRAM + reference + HLA intervals + helper scripts
Data output file formatTSV-style HLA result tables
Primary softwareGATK, HLA-HD, Polysolver, OptiType, samtoolsGATK

Set-up​

HLA Consensus Genotyping installation and requirements​

The workflow code can be downloaded by cloning the WARP GitHub repository. For the latest release, please see the HLAGenotyping changelog.

The pipeline can be deployed using Cromwell, a GA4GH-compliant workflow management system.

Inputs​

Input descriptions​

Input variable nameDescriptionType
gatk_dockerDocker image containing GATK/samtools tools.String
hlahd_dockerDocker image containing HLA-HD.String
polysolver_dockerDocker image containing Polysolver.String
optitype_dockerDocker image containing OptiType.String
original_bamInput BAM or CRAM.File
original_bam_idxIndex for original_bam.File
ref_fastaReference FASTA.File
ref_faiFASTA index.File
ref_dictReference dictionary.File
hla_intervalsInterval list for HLA region extraction.File
convert_alleles_python_scriptHelper script for allele conversion/normalization.File
count_two_field_alleles_python_scriptHelper script to count two-field calls in HLA-HD output.File
hla_groups_fileHLA group mapping file used during conversion.File
gcs_project_for_requester_pays(Optional) requester-pays project for cloud reads.String?
EMPTY_STRING_HACK(Optional) Terra compatibility helper for optional empty values.File?

HLA Consensus Genotyping tasks and tools​

The workflow chains extraction, primary typing, conditional fallback typing, and consensus.

  1. Extract HLA-only reads and FASTQs
  2. Run HLA-HD typing
  3. Run conditional Polysolver/OptiType and consensus
Task name and WDL linkToolSoftwareDescription
MakeHLAOnlyBamsAndFastqsGATK + samtoolsuser-supplied gatk_dockerExtracts HLA intervals, sorts/indexes HLA BAM, and emits paired FASTQs.
HLAHDHLA-HD + Python post-processinguser-supplied hlahd_dockerPerforms primary HLA typing and conversion to harmonized output format.
PolysolverPolysolveruser-supplied polysolver_dockerConditional secondary caller for low-confidence loci.
OptitypeOptiTypeuser-supplied optitype_dockerConditional secondary caller for A/B/C loci.
Consensuscustom merge logicworkflow-internalProduces final consensus callset across callers.

1. Extract HLA-only reads and FASTQs​

MakeHLAOnlyBamsAndFastqs slices input alignment to HLA intervals and prepares paired FASTQ inputs for downstream callers.

2. Run HLA-HD typing​

HLAHD runs primary typing and outputs converted/harmonized calls plus two-field count for conditional branching.

3. Run conditional Polysolver/OptiType and consensus​

When two-field calls are present, Polysolver and OptiType are run; Consensus combines outputs with HLA-HD to produce final consensus results.

Outputs​

Output variable nameFilename, if applicableOutput format and description
hlahd_raw_resulttask-produced text fileRaw normalized HLA-HD result table.
hlahd_converted_resulttask-produced text fileConverted HLA-HD calls in harmonized allele naming.
hlahd_two_field_countinteger valueCount of two-field loci from HLA-HD output.
hlahd_overrideninteger valueNumber of loci overridden during consensus generation.
consensusconsensus text fileFinal per-sample consensus HLA calls.
optitype_resultoptional text fileOptiType output when conditional branch runs.
polysolver_resultoptional text filePolysolver output when conditional branch runs.

Versioning​

All HLAGenotyping releases are documented in the changelog.

Feedback​

Please help us make our tools better by filing an issue in WARP; we welcome pipeline-related suggestions or questions.