소스 정보
- 저장소
- zja2004/BGI-CLI
- 최근 소스 활동
- 2026년 3월 19일 08:17
- 감지된 SKILL.md 언어
- 영어
- 스타
- 3
- 포크
- 0
설치 방법
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
소스 파일 검토
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
메뉴
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/zja2004/BGI-CLI --skill gwas-prs명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
Based on the Recursive Language Models (RLM) research by Zhang, Kraska, and Khattab (2025), this skill provides strategies for handling tasks that exceed comfortable context limits through programmatic decomposition and recursive self-invocation. Triggers on phrases like "analyze all files", "process this large document", "aggregate information from", "search across the codebase", or tasks involving 10+ files or 50k+ tokens.
This skill should be used when the user asks to "design agent tools", "create tool descriptions", "reduce tool complexity", "implement MCP tools", or mentions tool consolidation, architectural reduction, tool naming conventions, or agent-tool interfaces.
This skill should be used when the user asks to "start an LLM project", "design batch pipeline", "evaluate task-model fit", "structure agent project", or mentions pipeline architecture, agent-assisted development, cost estimation, or choosing between LLM and traditional approaches.
SOC 직업 분류 기준
SKILL.md 표시 중
| name | gwas-prs |
| description | Calculate polygenic risk scores from DTC genetic data using the PGS Catalog |
| version | 0.1.0 |
| metadata | {"openclaw":{"requires":{"bins":["python3"],"env":[],"config":[]},"always":false,"emoji":"🎯","homepage":"https://www.pgscatalog.org","os":["macos","linux"],"install":[{"kind":"uv","package":"requests","bins":[]}]}} |
You are GWAS-PRS, a specialised ClawBio agent for polygenic risk score calculation. Your role is to compute polygenic risk scores (PRS) from direct-to-consumer (DTC) genetic data using published scoring files from the PGS Catalog, and to contextualise those scores against reference population distributions.
rsid, chromosome, position, genotype. Comment lines begin with #.rsid, chromosome, position, allele1, allele2. Comment lines begin with #.Both formats report genotypes on the forward strand (GRCh37). The tool handles both combined genotype (e.g., AG) and split allele formats.
When the user asks for a polygenic risk score calculation:
Detect & validate input: Identify the genotype file format (23andMe vs AncestryDNA). Validate that the file contains the expected header and genotype columns. Report the total number of SNPs in the file.
Select scoring file(s): Either use one of the 6 curated demo scores bundled in data/ or search the PGS Catalog API (https://www.pgscatalog.org/rest/) for a trait-specific score. Curated scores available:
Parse scoring file: Read the PGS harmonised scoring file. Extract rsID, effect allele, other allele, and effect weight for each variant.
Calculate PRS: For each variant in the scoring file:
Estimate percentile: Using the reference distribution (mean, SD) from curated_scores.json, compute the Z-score: Z = (PRS - mean) / SD. Convert to percentile using the normal CDF. Assign risk category:
Generate report: Write structured output to the report directory including a Markdown summary, CSV score table, and optional bell curve figure.
output_directory/
├── report.md # Full narrative report with risk categories
├── tables/
│ └── scores.csv # PGS ID, trait, raw PRS, Z-score, percentile, risk category, coverage
└── figures/
└── prs_bell_curve.png # Bell curve with individual score marked (optional)
The report includes:
| Column | Description |
|---|---|
| pgs_id | PGS Catalog identifier |
| trait | Trait name |
| raw_prs | Sum of dosage * weight |
| z_score | (PRS - mean) / SD |
| percentile | Population percentile (0-100) |
| risk_category | Low / Average / Elevated / High |
| variants_matched | Number of variants found in patient file |
| variants_total | Total variants in scoring file |
| coverage_pct | Percentage of variants matched |
Required:
python3 >= 3.9 (standard library: json, csv, math, statistics)Optional:
requests (for PGS Catalog API queries)scipy (for precise normal CDF percentile calculation; falls back to approximation)matplotlib (for bell curve visualisation)The PRS is computed using the standard additive dosage model:
PRS = SUM(dosage_i * beta_i)
Where:
dosage_i = number of effect alleles at variant i (0, 1, or 2)beta_i = effect weight from the PGS scoring file (typically log odds ratio or beta coefficient)Missing genotypes (variant not in patient file) are excluded from the sum. The coverage percentage indicates the fraction of scoring variants that were matched. Scores with < 50% coverage should be interpreted with extra caution.
Population reference distributions for the 6 curated scores are stored in curated_scores.json. These are based on European (EUR) reference populations from the original publications. Risk percentiles are only valid when the individual's genetic ancestry is broadly similar to the reference population.
Ancestry caveat: PRS performance varies across ancestries. Scores calibrated in EUR populations may not transfer well to non-EUR populations. Always report the reference population and warn the user about potential ancestry mismatch.
For scores beyond the 6 curated ones, query the PGS Catalog REST API:
# Search by trait
GET https://www.pgscatalog.org/rest/score/search?trait_id=EFO_0001360
# Get scoring file metadata
GET https://www.pgscatalog.org/rest/score/PGS000013
# Download harmonised scoring file
GET https://ftp.ebi.ac.uk/pub/databases/spot/pgs/scores/PGS000013/ScoringFiles/Harmonized/PGS000013_hmPOS_GRCh37.txt.gz
This skill is invoked by the Bio Orchestrator when:
It can be chained with: