bio-clinical-databases-hla-typing
Calls HLA class I and class II alleles at 2/4/6/8-field resolution from WGS/WES/RNA-seq/long-read data using OptiType, HLA-LA, T1K, Polysolver, HLA-HD, arcasHLA, StarPhase, or HIBAG imputation. Use when typing for HSCT, solid-organ transplant, neoantigen prediction, PGx screening (B*57:01, B*15:02, etc.), or disease-association studies, with reconciliation across tools and IPD-IMGT/HLA version mismatch handling.
npx skills add BioTender-max/awesome-bio-agent-skills --skill hla-typing --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
What it does
Provides end-to-end guidance to call HLA class I and II alleles at high resolution from diverse data types, using a primary CLI tool (T1K) and alternative methods (OptiType, HLA-LA, arcasHLA, StarPhase, HIBAG) with explicit commands and workflows. Includes resolution requirements, tool-specific commands, and runtime outputs for each pathway. Also includes pharmacogenomics associations and a decision tree of scenarios with recommended paths. Contains concrete, step-by-step CLI invocations, sample commands, and example outputs for each method, plus per-operation failure modes with fixes.
How it works
Describes concrete command sequences to execute: extract reads from a BAM focused on the MHC region; run T1K with preset hla for combined class I/II typing; run OptiType for class I from WES; run HLA-LA for class II with PRG graph; run arcasHLA for RNA-seq; perform SNP-array imputation via HIBAG with ancestry-matched panels. For each pathway, it provides exact shell commands, file naming conventions, and expected outputs (e.g., sample_hla_genotype.tsv; arcas_out/sample.genotype.json). It further specifies file-level input/output interactions and references for tools, plus a structured decision tree indicating when to apply each method depending on data type and target resolution. It also includes a Representative workflow example titled “Standard Workflow: T1K on WGS/WES” with concrete bash commands and notes about entry points.
When to use it
States scenarios and triggers: WGS/WES with class I only for speed; WGS/WES with class I+II for general use; RNA-seq for ICI neoantigen prediction; transplant-grade long-read typing; SNP-array imputation when sequencing is unavailable; and multi-ancestry GWAS needs. It provides a decision tree mapping scenarios to recommended paths (e.g., OptiType for fast class I; T1K for broad I+II+KIR typing; HLA-LA for best class II accuracy; StarPhase for 8-field long-read typing).
What it can touch
Lists tools and commands explicitly: T1K, OptiType, HLA-LA, arcasHLA, HIBAG, samtools, bwa-mem, PRG graph files, IPD-IMGT/HLA reference bundles. Includes specific CLI invocations, file names like hla_region.bam, hla_sorted.bam, hla_R1.fq/hla_R2.fq, sample_hla_genotype.tsv, arcas_out/sample.genotype.json, and HLA reference files. Also includes R code snippets using HIBAG with panels (EUR, ASN, AFR, HIS) and PFAM-like guidance for loading PLINK genotypes.
Caveats
Covers failure modes: alt-aware alignment missing, stale IPD-IMGT/HLA bundles, EUR-trained imputation on non-EUR samples, and cross-mapping DRB loci. Each caveat includes triggers, mechanism, symptoms, and fixes (e.g., re-align with bwa-mem-alt, update reference bundles, use ancestry-matched panels, or switch to multi-ancestry tools).
## Version Compatibility Reference examples tested with: OptiType 1.3.5, HLA-LA 1.0.4, T1K 1.0.6 (Song 2023), Polysolver 4.0, HLA-HD 1.7.1, arcasHLA 0.6.0, StarPhase 1.0+ (PacBio), HIBAG 1.40+, samtools 1.19+, bwa-mem 0.7.17+. IPD-IMGT/HLA database release frequency is quarterly; tools must be re-bundled with the current release to capture new alleles (~38,000 alleles at Jan 2024; ~43,000+ by Jul 2025). Before using code patterns, verify installed versions match. If versions differ: - Python: `pip show <package>` then `help(module.function)` to check signatures - CLI: `<tool> --version` then `<tool> --help` to confirm flags If code throws ImportError, AttributeError, or TypeError, introspect the installed package and adapt the example to match the actual API rather than retrying. Tool reference-bundle vintage matters more than algorithm choice for non-European cohorts; a 2022-bundled HLA-LA will silently miss thousands of post-2022 alleles dominant in African and South Asian ancestry. # HLA Typing for Clinical Applications **'Determine HLA genotype for HSCT / neoantigen prediction / PGx screening'** -> Call HLA class I (A, B, C) and class II (DRB1, DRB3/4/5, DQA1, DQB1, DPA1, DPB1)
- Version Compatibility
- Resolution Levels and What Each Application Requires
- G-Groups vs P-Groups: Routinely Confused
- DRB1 + DRB3/4/5 Linkage: The Mandatory Sanity Check
- Algorithmic Taxonomy: Short-Read Tools
- Long-Read and Ultra-High-Resolution
- SNP-Based HLA Imputation: The Ancestry Footgun
- Decision Tree by Scenario
- HLA and Pharmacogenomics
- Standard Workflow: T1K on WGS/WES
- OptiType for Class I (TCGA-Compatible)
- HLA-LA for Class II (PRG-Based)
- arcasHLA for RNA-seq
- SNP-Array Imputation (HIBAG): For GWAS Cohorts
Extract chr6:28-34 Mb plus alt contigs (alt-aware alignment is critical) samtools view -b -h input.bam chr6:28000000-34000000 chr6_GL000250v2_alt chr6_GL000251v2_alt \ chr6_GL000252v2_alt chr6_GL000253v2_alt chr6_GL000254v2_alt \ chr6_GL000255v2_alt chr6_GL000256v2_alt > hla_region.bam samtools sort -n hla_region.bam -o hla_sorted.bam samtools fastq -1 hla_R1.fq -2 hla_R2.fq -s singletons.fq -0 /dev/null hla_sorted.bam Run T1K (preset hla; includes class I + II). Some releases ship the entry point as `run-t1k` (a wrapper script) rather than `t1k`; verify with `which run-t1k` / `which t1k` before scripting. t1k --preset hla \
What does the bio-clinical-databases-hla-typing skill do?
Calls HLA class I and class II alleles at 2/4/6/8-field resolution from WGS/WES/RNA-seq/long-read data using OptiType, HLA-LA, T1K, Polysolver, HLA-HD, arcasHLA, StarPhase, or HIBAG imputation. Use when typing for HSCT, solid-organ transplant, neoantigen prediction, PGx screening (B*57:01, B*15:02, etc.), or disease-association studies, with reconciliation across tools and IPD-IMGT/HLA version mismatch handling.
How do I install it?
Run `npx skills add BioTender-max/awesome-bio-agent-skills --skill hla-typing --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From BioTender-max/awesome-bio-agent-skills, a repository with 135 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
