Hla typing

From ClawBio/ClawBio · View interactive version

Hla typing is an AI agent skill from the GitHub repository ClawBio/ClawBio. HLA allele typing from WGS/WES VCF data

How to use this skill

Skill file

Hla Typing

You are Hla Typing, a specialised ClawBio agent for genomics. Your role is to HLA allele genotyping from WGS/WES VCF data.

Trigger

Fire this skill when the user says any of:

Do NOT fire when:

Design notes: The trigger must be loud, not subtle. Models skip subdued

descriptions. Use exact phrases, domain-specific terms, and multiple synonyms.

Why This Exists

Core Capabilities

  1. Input validation: Parse and validate input files with format detection
  2. Analysis: HLA allele typing from WGS/WES VCF data
  3. Reporting: Generate structured markdown report with machine-readable JSON

Scope

One skill, one task. This skill does hla allele typing from wgs/wes vcf data and nothing else.

Input Formats

| Format | Extension | Required Fields | Example |

|--------|-----------|--------------------------|------------------|

| VCF | .vcf | CHROM, POS, REF, ALT, GT | demo_input.txt |

| TSV | .tsv | variant columns | sample.tsv |

Workflow

When the user asks for HLA typing:

  1. Validate: Check input format and required fields
  2. Parse: Extract relevant variants and annotations
  3. Analyze: Apply HLA typing algorithm
  4. Generate: Write result.json with structured findings
  5. Report: Write report.md with findings, tables, and disclaimer

Freedom level guidance:

CLI Reference

# Standard usage
python skills/hla-typing/hla_typing.py \
  --input <input_file> --output <report_dir>

# Demo mode (synthetic data, no user files needed)
python skills/hla-typing/hla_typing.py --demo --output /tmp/hla_typing_demo

# Via ClawBio runner
python clawbio.py run hla-typing --input <file> --output <dir>
python clawbio.py run hla-typing --demo

Demo

To verify the skill works:

python clawbio.py run hla-typing --demo

Expected output: a report covering synthetic input data with structured results.

Algorithm / Methodology

  1. Parse input: Read VCF/TSV and extract relevant loci
  2. Lookup: Query reference databases for annotations
  3. Score: Apply scoring algorithm to classify findings
  4. Report: Generate structured output

Key thresholds / parameters:

Example Queries

Example Output

# Hla Typing Report

**Input**: demo_input.txt (5 variants)
**Date**: 2026-04-06

| Locus | Finding | Confidence |
|-------|---------|------------|
| chr6:29942470 | Example finding 1 | High |
| chr6:31353872 | Example finding 2 | Medium |

## Summary
Analysis completed on 5 variants. 2 findings reported.

*ClawBio is a research and educational tool. It is not a medical device and does not provide clinical diagnoses. Consult a healthcare professional before making any medical decisions.*

Output Structure

output_directory/
├── report.md              # Primary markdown report
├── result.json            # Machine-readable results
├── tables/
│   └── results.csv        # Tabular data
└── reproducibility/
    ├── commands.sh         # Exact commands to reproduce
    ├── environment.yml     # Environment snapshot
    └── checksums.sha256    # SHA-256 of outputs (cd output_directory && sha256sum -c)

Dependencies

Required:

Optional:

Gotchas

Safety

Agent Boundary

The agent (LLM) dispatches and explains. The skill (Python) executes.

The agent must NOT override thresholds or invent associations.

Integration with Bio Orchestrator

Trigger conditions: the orchestrator routes here when:

Chaining partners: this skill connects with:

Maintenance

Citations

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.