SKILL.md
Version Compatibility
Reference examples tested with: OptiType 1.3+, STAR 2.7.11+, pandas 2.2+, samtools 1.19+
Before using code patterns, verify installed versions match. If versions differ:
- Python:
pip show <package>thenhelp(module.function)to check signatures - CLI:
<tool> --versionthen<tool> --helpto 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.
HLA Typing
"Determine HLA genotype from my sequencing data" → Call HLA alleles from WGS/WES/RNA-seq reads for transplant matching, neoantigen prediction, or pharmacogenomic screening.
- CLI:
OptiTypefor HLA class I typing from DNA/RNA reads - CLI:
arcasHLA extract→arcasHLA genotypefor RNA-seq based typing
OptiType (HLA Class I)
Goal: Call HLA Class I alleles (HLA-A, B, C) at 4-field resolution from WGS, WES, or RNA-seq data.
Approach: Extract HLA region reads from BAM, then run OptiType's integer linear programming algorithm to determine optimal allele assignment.
From DNA-seq
# Extract HLA reads from BAM
samtools view -h input.bam chr6:28000000-34000000 | \
samtools fastq -1 hla_R1.fq -2 hla_R2.fq -
# Run OptiType
OptiTypePipeline.py \
-i hla_R1.fq hla_R2.fq \
-d \
-o optitype_output \
-c config.ini
# Output: optitype_output/sample_result.tsv
# Contains HLA-A, HLA-B, HLA-C alleles (4-field resolution)
From RNA-seq
# RNA mode
OptiTypePipeline.py \
-i rna_R1.fq rna_R2.fq \
-r \
-o optitype_rna_output \
-c config.ini
