본문으로 건너뛰기
cccskills
무료GitHub에 공개

archaic-introgression

Detect Neanderthal and Denisovan introgression segments from modern human genomes

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

실행 점수 미검증

설치 방법 보기

포함된 파일(8)

  • SKILL.md7.4 KB
  • archaic_introgression.py20.0 KB
  • examples/demo_archaic.vcf676 B
  • examples/demo_modern.vcf772 B
  • pipeline.py23.0 KB
  • tests/__init__.py0 B
  • tests/test_archaic_introgression.py10.7 KB
  • tests/test_pipeline.py10.3 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Archaic Introgression Detector

Trigger

Fire when:

  • User asks about Neanderthal or Denisovan DNA in modern humans
  • User wants to detect archaic introgression segments
  • User mentions IBDmix, Sprime, or hmmix methods
  • User has modern + archaic VCF files and wants to compare them

Do NOT fire when:

  • User asks about general ancestry or population structure (use claw-ancestry-pca)
  • User asks about pharmacogenomics or clinical variants
  • User wants admixture proportions without segment-level detail

Why This Exists

Between 1-4% of non-African modern human genomes derive from archaic hominins (Neanderthals, Denisovans). Identifying these segments matters for understanding human evolution, disease susceptibility, and immune adaptation. Three complementary methods exist (IBDmix, Sprime, hmmix), each with different strengths. This skill wraps all three behind a unified interface with a pure-Python fallback when external binaries are unavailable.

Core Capabilities

  1. IBDmix: Detect segments shared IBD between modern and archaic genomes using LOD score thresholds
  2. Sprime: Identify introgressed haplotypes without requiring an archaic reference panel
  3. hmmix: HMM-based detection of archaic ancestry tracts
  4. Pure-Python fallback: LOD-score-based segment calling when IBDmix binary is not installed
  5. EIGENSTRAT support: Read .ind/.snp/.geno files (text and binary packed formats)
  6. Summary statistics: Per-individual introgression burden, segment count, mean length

Scope

One skill, one task: detect and report archaic introgression segments. Does not perform downstream functional annotation of introgressed variants (chain with vcf-annotator for that).

Input Formats

  • Modern genotypes: VCF (uncompressed or .vcf.gz with .tbi index)
  • Archaic genotypes: VCF (Neanderthal/Denisovan reference panel)
  • EIGENSTRAT: .ind + .snp + .geno files (text or binary packed format)

Workflow

  1. Parse modern VCF to extract sample names and genotype matrix (numpy array)
  2. Parse archaic VCF to extract reference genotypes at matching positions
  3. Identify shared variant positions between modern and archaic panels
  4. Run selected method (IBDmix / Sprime / hmmix) or pure-Python LOD fallback
  5. Collect IntrogressionSegment results per sample
  6. Compute per-individual summary statistics
  7. Write JSON report and optional BED file

CLI Reference

# Run with IBDmix on VCF inputs
python archaic_introgression.py \
  --input modern.vcf --archaic archaic.vcf \
  --method ibdmix --output /tmp/introgression

# Run demo with synthetic data
python archaic_introgression.py --demo --output /tmp/introgression_demo

# Filter to specific samples
python archaic_introgression.py \
  --input modern.vcf --archaic archaic.vcf \
  --samples SAMPLE01,SAMPLE02 --output /tmp/introgression

# Adjust LOD threshold
python archaic_introgression.py \
  --input modern.vcf --archaic archaic.vcf \
  --lod 5.0 --output /tmp/introgression

Demo

python archaic_introgression.py --demo --output /tmp/introgression_demo

Runs on bundled examples/demo_modern.vcf (3 samples, 10 SNPs on chr22) and examples/demo_archaic.vcf (1 Neanderthal sample, same positions).

Example Queries

  • "How much Neanderthal DNA do I have?"
  • "Detect archaic introgression in my VCF"
  • "Run IBDmix on my genotype data"
  • "Show me introgressed segments from Denisova"
  • "Compare my genome against the Vindija Neanderthal"

Output Structure

output_dir/
  introgression_results.json   # Full results with segments and summary
  segments.bed                 # BED file of introgressed regions

JSON structure

{
  "method": "ibdmix",
  "lod_threshold": 3.0,
  "num_samples": 3,
  "segments": [
    {
      "sample": "SAMPLE01",
      "chrom": "chr22",
      "start": 16050075,
      "end": 16051249,
      "archaic_source": "Neanderthal",
      "method": "ibdmix",
      "score": 4.2,
      "num_variants": 6,
      "length": 1174
    }
  ],
  "summary": {
    "SAMPLE01": {
      "total_segments": 1,
      "total_length_bp": 1174,
      "mean_segment_length": 1174.0,
      "mean_score": 4.2
    }
  }
}

Dependencies

  • Python 3.11+
  • numpy
  • Optional: IBDmix binary, Sprime JAR, hmmix binary
  • Optional: bcftools (for indexed VCF extraction)

Gotchas

  1. The model will want to report percentage of genome that is Neanderthal from 10 SNPs. Do not. Demo data is too sparse for genome-wide estimates. State the segment coordinates and LOD scores only.
  2. The model will want to assume all archaic segments are Neanderthal. Do not. Check the archaic source label. Denisovan segments have different frequency distributions in different populations.
  3. The model will want to skip the pure-Python fallback and just say IBDmix is required. Do not. The fallback LOD scoring works well for demonstration and small datasets.
  4. The model will want to interpret introgression as harmful. Do not. Many introgressed segments are adaptive (e.g., immune genes, altitude adaptation). Present findings neutrally.
  5. The model will want to use text .geno parsing for binary packed files. Do not. Check for the 'GENO' magic header and switch to binary unpacking (2-bit per genotype).

Safety

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.

Agent Boundary

The agent dispatches queries and explains results. The skill executes the computational pipeline. The agent should not attempt to reimplement IBDmix LOD scoring outside this module.

Chaining Partners

  • vcf-annotator: annotate introgressed variants with ClinVar/gnomAD significance
  • equity-scorer: assess representation of archaic ancestry detection across populations
  • claw-ancestry-pca: combine with PCA to contextualise introgression within population structure

Maintenance

  • Review quarterly against new archaic genome releases
  • Update when new IBDmix/Sprime/hmmix versions change output formats
  • Deprecate if a unified tool supersedes all three methods

Citations

  • Chen L, Wolf AB, Fu W, Li L, Akey JM. Identifying and interpreting apparent Neanderthal ancestry in African individuals. Cell. 2020;180(4):677-687. (IBDmix)
  • Browning SR, Browning BL, Zhou Y, et al. Analysis of human sequence data reveals two pulses of archaic Denisovan admixture. Cell. 2018;173(1):53-61. (Sprime)
  • Skov L, Hui R, Shchur V, et al. Detecting archaic introgression using an unadmixed outgroup. PLoS Genet. 2018;14(9):e1007641. (hmmix)

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Testing patterns for PHPUnit and Playwright E2E tests. Use when writing tests, debugging test failures, setting up test coverage, or implementing test patterns for ActivityPub features.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

lilinji/GeneTind-Life-Skills162026년 8월 21일 업데이트

adaptyv

무료

How to use the Adaptyv Bio Foundry API and Python SDK for protein experiment design, submission, and results retrieval. Use this skill whenever the user mentions Adaptyv, Foundry API, protein binding assays, protein screening experiments, BLI/SPR assays, thermostability assays, or wants to submit protein sequences for experimental characterization. Also trigger when code imports `adaptyv`, `adaptyv_sdk`, or `FoundryClient`, or references `foundry-api-public.adaptyvbio.com`.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

lilinji/GeneTind-Life-Skills162026년 8월 21일 업데이트

Add unsigned integer (uint) type support to PyTorch operators by updating AT_DISPATCH macros. Use when adding support for uint16, uint32, uint64 types to operators, kernels, or when user mentions enabling unsigned types, barebones unsigned types, or uint support.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

lilinji/GeneTind-Life-Skills162026년 8월 21일 업데이트

Time-blind friendly planning, executive function support, and daily structure for ADHD brains. Specializes in realistic time estimation, dopamine-aware task design, and building systems that actually work for neurodivergent minds.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

lilinji/GeneTind-Life-Skills162026년 8월 21일 업데이트

aeon

무료

This skill should be used for time series machine learning tasks including classification, regression, clustering, forecasting, anomaly detection, segmentation, and similarity search. Use when working with temporal data, sequential patterns, or time-indexed observations requiring specialized algorithms beyond standard ML approaches. Particularly suited for univariate and multivariate time series analysis with scikit-learn compatible APIs.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

lilinji/GeneTind-Life-Skills162026년 8월 21일 업데이트

Unified analysis pipeline for affinity-based proteomics platforms — Olink (PEA, NPX) and SomaLogic SomaScan (SOMAmer, RFU). Platform-aware QC, normalisation, differential abundance, volcano plots, heatmaps, and PCA.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

lilinji/GeneTind-Life-Skills162026년 8월 21일 업데이트

lilinji의 스킬 모두 보기

이 스킬의 문제 신고