Onekgpd
K-DenseCommunityCreated by DnaerysDistributed by K-Dense
- Skill
- Tool integration
- Science and research
- MIT
- Low risk
- Has scripts
AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
OneKGPd provides a specialized interface for querying the 1000 Genomes Project dataset, which includes 3,202 whole-genome-sequenced individuals on the GRCh38 assembly. The skill allows researchers to perform targeted queries for variants and individuals based on genomic regions, zygosity, and various annotation filters including allele frequencies, AlphaMissense scores, and clinical significance. It also includes offline tools for exploring sample metadata, population statistics, and kinship relationships within the cohort.
What it does
- Selects variants within specific genomic regions across the cohort or for selected individuals.
- Identifies individuals carrying variants that match specific criteria.
- Calculates kinship coefficients and determines relatedness between two individuals.
- Filters results by allele frequency, AlphaMissense scores, and VEP annotations.
- Provides offline access to sample metadata, population breakdowns, and pedigree information.
- Supports counting operations to estimate result set sizes before performing detailed selections.
When to use it
- When you need to identify which 1000 Genomes participants carry specific genetic variants.
- When analyzing variant distribution or allele frequencies within the 1000 Genomes cohort.
- When performing kinship analysis between two specific individuals in the dataset.
- When you need to filter variants by clinical significance or predicted impact in a specific region.
- When exploring population-level statistics or metadata for the 3,202-sample cohort.
Advantages
- Enables granular, individual-level queries rather than just aggregate population data.
- Integrates multiple annotation sources like gnomAD v4.1 and AlphaMissense directly into queries.
- Includes built-in counting commands to help manage large result sets and prevent memory issues.
- Provides offline metadata tools for rapid exploration of population and pedigree data.
- Standardized interface for consistent querying of the 1000 Genomes Project dataset.
Usage examples
- “How many individuals carry likely pathogenic missense variants in the BRCA1 gene region?”
- The agent uses the count-samples command with the specified GRCh38 coordinates and filters to return the number of individuals matching the criteria.
- “List the individuals who are homozygous reference at position chr17:43044295.”
- The agent executes the select-samples-hom-ref command to retrieve a list of sample IDs that are homozygous reference at the specified position.
- “What is the kinship relationship between individuals HG00096 and NA21130?”
- The agent runs the kinship command to return the degree of relatedness and the KING kinship coefficient for the two specified individuals.
- “Find all YRI population samples in the 1000 Genomes dataset.”
- The agent uses the select-samples-by-population command to retrieve the list of sample IDs belonging to the YRI population.
Install
Download the skill as a ZIP:
https://autogineer.com/agent-skills/k-dense-ai/onekgpd/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip onekgpd.zip -d .agents/skills
Documentation by Dnaerys
OneKGPd: Individual-Level Queries over the 1000 Genomes Project
Scope
This skill queries the 1000 Genomes Project dataset — the extended high-coverage cohort
of 3,202 whole-genome-sequenced individuals, on the GRCh38 assembly. All results
are drawn from this cohort, and sample names returned by the skill (for example
HG00096 or NA21130) identify its participants.
Queries resolve against the cohort's per-individual genotype data. This supports two complementary classes of question: selecting variants carried within a region (across the whole cohort or within a specified set of individuals), and selecting the individuals who carry variants matching given criteria. Variant selection can be filtered by allele frequency, predicted consequence, clinical significance, AlphaMissense classification, and the other annotation axes listed below. Relatedness between two named individuals is also available.
The genotype state in which a variant is carried — heterozygous or homozygous — is a criterion that queries may specify; results are returned as variants or as sample names, not as raw genotypes.
The public service is TLS gRPC at db.dnaerys.org:443, accessed with
dnaerys 0.2.1 (Python 3.11+); it is not a REST base URL. The maintained
service snapshot advertises VEP 115 / GENCODE 49, ClinVar 202502, and gnomAD
4.1. These are the service's annotation releases, not the latest release of
each upstream resource. Record them when interpreting results.
When to Use
Use this skill when you need to:
Find variants carried in a region or set of regions matching some criteria across the whole cohort (
select-variants).Find variants carried in a region or set of regions matching some criteria in specific set of individuals (
select-variants-in-samples).Find which 1000 Genomes individuals carry variants matching some criteria in a region or set of regions (
select-samples).Count how many individuals carry specific variants (
count-samples).Restrict any variant query to heterozygous-only or homozygous-only carriage, or query both together (default).
Identify which individuals are homozygous reference at a single position (
select-samples-hom-ref).Determine the relatedness between two named 1000 Genomes individuals — both the degree (twin / 1st / 2nd / 3rd / unrelated) and the KING kinship coefficient (
kinship).Get dataset totals — sample count, sex split, variant count, assembly (
dataset-info).Variant selection can be specified by KGP allele frequency, gnomAD 4.1 exome and gnomAD 4.1 genome allele frequency, AlphaMissense Score and AlphaMissense Class, ClinVar significance (202502), and VEP annotations (impact, biotype, feature type, variant class, consequences).
Do NOT use this skill for:
Resolving a gene symbol, rsID, or transcript to coordinates, or fetching reference sequence. Resolve coordinates first (see Coordinate Provenance below), then query this skill with the resolved GRCh38 region.
Any cohort other than the 1000 Genomes Project — this skill serves only that dataset.
Prerequisites
uv: This skill's script is run withuv run, which reads the script's inline dependency metadata and provisions an ephemeral environment. Ensureuvis installed and on PATH (https://docs.astral.sh/uv/).Data use terms: The 1000 Genomes Project data is open; users should be aware of the 1000 Genomes Project / IGSR data-use terms (https://www.internationalgenome.org/data).
Access constraints: There is no API key, no
.envfile, and no rate-limit token to configure.Timeouts: network commands use
--timeout 30seconds per RPC by default. A positive finite override is allowed. Pagination makes several RPCs and retryable failures retry the whole fetch up to three times, so this is not a deadline for the whole command.
Core Rules
Use the Wrappers: ALWAYS execute the provided helper scripts rather than constructing your own client calls or network requests. Use
scripts/onekgpd_api.pyfor variant/sample/kinship queries (it handles the connection, streaming, pagination, and JSON serialization), andscripts/onekgpd_meta.pyfor sample/population metadata (offline, see Sample & population metadata).Coordinates MUST be resolved against an authoritative source first — see Coordinate Provenance. This is mandatory, not advisory.
Count before you select: every variant and sample selection has a paired counting command. Call the count command FIRST to size the result set, then select only if the count is manageable.
Zygosity defaults to both: selection and counting commands include both heterozygous and homozygous carriage by default. Narrow with
--het-onlyor--hom-onlywhen the question is specifically about one state. (You do not need to pass anything to get both.)Output: scripts write full JSON to a file (
--output, default under/tmp/) and print a concise summary to stdout. Do not read large JSON files into context — usejqor a small disposableuv run pythonsnippet to extract fields.--page-sizeretrieves every page but accumulates all variants in RAM; it is not a bounded-memory export. Size the query first.Check completeness:
result_incomplete=truemeans results cannot support a definitive zero/absence claim. Re-run after service recovery. For capped variant selections,truncated=truemeans the limit was reached and more records may exist, even if the cluster result itself was complete.
Coordinate Provenance (MANDATORY FIRST STEP)
Before any region-based query, resolve the gene or feature to GRCh38
coordinates against an authoritative source (for example Ensembl or NCBI), and query
with those resolved coordinates. Inputs are 1-based, inclusive: a BED interval
[start0, end0) becomes start=start0+1, end=end0. Record the source accession,
annotation release, and retrieval date; gene boundaries can differ by annotation
release even on the same assembly. The assembly must be explicit, and a gene-range
must be resolved to precise positions before use. This is structural, not
advisory: there is no source-side guardrail that would catch a misplaced region,
so an unverified coordinate produces results for an unintended location with no
error.
# Resolve gene symbol -> GRCh38 region with an authoritative source FIRST,
# then pass the verified coordinates to the OneKGPd query below.[!CAUTION] The dataset is GRCh38. A GRCh37 coordinate, or any region that does not correctly correspond to the intended feature on GRCh38, will return results for an unintended location without raising an error. Verify the assembly and the resolved coordinates before querying.
Command Selection Guide
Match the question to the command. Counting commands are cheap and should precede their selection counterpart.
Which individuals carry matching variants in a region →
count-samplesthenselect-samplesWhich variants are carried in a region, cohort-wide →
count-variantsthenselect-variantsWhich variants are carried in a region, within a named set of individuals →
count-variants-in-samplesthenselect-variants-in-samplesWho is homozygous-reference at a single position →
count-samples-hom-refthenselect-samples-hom-refRelatedness (degree + coefficient) between two named individuals →
kinshipDataset totals (sample count, sex split, variant total, assembly) →
dataset-info
Cohort interpretation
The 3,202-sample cohort includes relatives: the additional 698 high-coverage
samples extend the original 2,504-sample panel. Carrier counts therefore are
not counts of independent observations, and cohort AF is not a population
prevalence estimate. For association or frequency comparisons, document the
selected populations and relatedness policy; use the bundled pedigree metadata
and kinship when choosing or auditing the analysis set. See the
IGSR cohort announcement.
Annotation filters (shared across variant and sample selection/counting)
All variant- and sample-selection commands (count-variants,
select-variants, their -in-samples forms, count-samples, select-samples)
accept the same annotation filters. Different filter fields are combined with
AND; multiple values within one field are combined with OR. Enum values
are case-insensitive (e.g. missense_variant or MISSENSE_VARIANT).
These are selection criteria applied on the server. The fields returned on a selected variant are listed under Variant-returning commands; a criterion used for filtering is not necessarily echoed back on the returned variant.
--af-lt/--af-gt: 1000 Genomes dataset allele frequency bounds--gnomad-exomes-af-lt/--gnomad-exomes-af-gt: gnomAD v4.1 exome AF bounds--gnomad-genomes-af-lt/--gnomad-genomes-af-gt: gnomAD v4.1 genome AF bounds--clin-significance: ClinVar significance terms, CSV (e.g.PATHOGENIC,LIKELY_PATHOGENIC)--consequence: Sequence Ontology consequence terms, CSV (e.g.MISSENSE_VARIANT,STOP_GAINED)--impact: VEP impact, CSV (HIGH,MODERATE,LOW,MODIFIER)--variant-type,--feature-type,--bio-type: SO variant class / VEP feature / VEP biotype, CSV--alpha-missense-class:AM_LIKELY_BENIGN,AM_LIKELY_PATHOGENIC,AM_AMBIGUOUS(CSV)--alpha-missense-score-lt/--alpha-missense-score-gt: AlphaMissense score bounds--biallelic-only/--multiallelic-only--exclude-males/--exclude-females--min-len-bp/--max-len-bp: alternate-allele length bounds (bp)
[!NOTE]
--alpha-missense-classand--alpha-missense-score-*are mutually exclusive (the engine ignores the class when a score bound is set).--biallelic-onlyand--multiallelic-onlyare mutually exclusive.--exclude-malesand--exclude-femalesare mutually exclusive. Setting a*-gtbound greater than or equal to its matching*-ltbound defines an empty range and will return nothing.
[!NOTE]
gnomad_exomes_af,gnomad_genomes_af, andam_scoreuse0.0for not annotated in this service snapshot. This does not establish absence from the current gnomAD release, biological rarity, or a benign prediction. The dataset's ownaffield is a different statistic, not this sentinel.
[!CAUTION] A zero numeric filter is unset on the server, so
--gnomad-exomes-af-gt 0does not exclude missing annotations. The wrapper rejects zero, nonfinite, out-of-range, and float32-underflowing bounds. Choose an explicit positive threshold (for example--gnomad-exomes-af-gt 0.000001means AF > 1e-6, not merely annotation presence). For exact> 0, retrieve a complete variant set and post-filter the returned AF locally. A< Xfilter alone includes unannotated zero values. Apply the same missing-score caution to AlphaMissense.
Categorical annotations are retained across transcripts. Combining consequence
and impact filters does not establish that they describe the same transcript.
amino_acids may contain multiple HGVSp entries; the generic gRPC service places
canonical annotations first, whereas the separate MCP layer trims its output.
Preserve transcript identifiers, and do not treat a model's likely-pathogenic
class as a clinical diagnosis or a participant phenotype.
Quick Start
# Step 1. NCBI Gene 672, GRCh38.p14 / NC_000017.11, RS_2025_08:
# BRCA1 spans chr17:43044295-43170327 (1-based inclusive).
# Source: https://www.ncbi.nlm.nih.gov/gene/672 ; re-resolve for your analysis.
# Step 2. Size the result set: how many individuals carry predicted likely-pathogenic
# missense variants in this region?
uv run scripts/onekgpd_api.py count-samples \
--chrom chr17 --start 43044295 --end 43170327 \
--consequence MISSENSE_VARIANT \
--alpha-missense-class AM_LIKELY_PATHOGENIC \
--output /tmp/count.json
# Step 3. If the count is manageable, list those individuals.
uv run scripts/onekgpd_api.py select-samples \
--chrom chr17 --start 43044295 --end 43170327 \
--consequence MISSENSE_VARIANT \
--alpha-missense-class AM_LIKELY_PATHOGENIC \
--output /tmp/samples.json
# Step 4. Count then select variants for actual returned sample IDs.
# HG03169,NA20506 below are illustrative IDs; substitute the Step 3 results.
uv run scripts/onekgpd_api.py count-variants-in-samples \
--chrom chr17 --start 43044295 --end 43170327 \
--samples HG03169,NA20506 \
--consequence MISSENSE_VARIANT --alpha-missense-class AM_LIKELY_PATHOGENIC \
--output /tmp/variant_count.json
uv run scripts/onekgpd_api.py select-variants-in-samples \
--chrom chr17 --start 43044295 --end 43170327 \
--samples HG03169,NA20506 \
--consequence MISSENSE_VARIANT --alpha-missense-class AM_LIKELY_PATHOGENIC \
--output /tmp/variants.jsonCommands
Each command writes full JSON to a file (--output PATH, default a temp file)
and prints a concise stdout summary. All region/sample commands share: the
region input (--chrom/--start/--end with optional --ref/--alt, or one
or more repeated --region CHR:START-END), the zygosity flags
(--het-only/--hom-only, default both), and the annotation filters above.
The full per-flag tables live in
references/onekgpd_commands.md.
Variant-returning commands
select-* return matching variants; count-* return an integer count.
count-variants— count variants in a region, cohort-wide.select-variants— select variants in a region, cohort-wide. Use--limit N(hard cap, default 200) or--page-size N(retrieve the full set in pages); the two are mutually exclusive. The summary flagstruncatedwhen the cap is reached.count-variants-in-samples— ascount-variants, restricted to--samples NAME1,NAME2,...(required).select-variants-in-samples— asselect-variants, restricted to--samples NAME1,NAME2,...(required).
Each returned variant carries these 22 keys: chr, start, end, ref,
alt, af, ac, an, hom_samples, het_samples, mis_samples,
hom_samples_fx, het_samples_fx, mis_samples_fx, hom_samples_mxy,
het_samples_mxy, mis_samples_mxy, gnomad_exomes_af, gnomad_genomes_af,
am_score, amino_acids, biallelic.
ClinVar significance and VEP consequence are filter criteria only and are not
returned. Full schema:
references/onekgpd_commands.md.
Sample-returning commands
count-samples— count individuals carrying a matching variant in a region.select-samples— list the names of individuals carrying a matching variant. Supports--skip Nand--limit N. Returns names only; to see which variants qualified an individual, feed the names intoselect-variants-in-samples.
Homozygous-reference commands
Single position via --chrom + --position (not a region).
count-samples-hom-ref— count individuals with a 0/0 call at the position. The count uses a sentinel:-1= no variant exists at that position at all;0= a variant exists but no individual is homozygous reference;>0= the number of homozygous-reference individuals. These interpretations requireresult_incomplete=false; otherwisevariant_presentisnull. No variant record is not evidence that all 3,202 individuals have callable 0/0 genotypes.select-samples-hom-ref— list the individuals with a 0/0 call at the position.
Relatedness command
kinship --sample1 NAME --sample2 NAME— relatedness between two named individuals: the degree (TWINS_MONOZYGOTIC/FIRST_DEGREE/SECOND_DEGREE/THIRD_DEGREE/UNRELATED) and the KING kinship coefficient (phi_bwf).
Dataset metadata command
dataset-info— dataset totals:samples_total(3,202), female/male split,variants_total,assembly(GRCh38), and the cohort breakdown. No region required; doubles as a connectivity check.
Sample & population metadata (offline)
Population, sex, pedigree, and superpopulation questions are answered by a second
script, scripts/onekgpd_meta.py, from a data file bundled in the skill — no
network, no credentials, no coordinates. The sample IDs are the same names the
variant commands use, so the two layers compose (e.g. pick a cohort by population,
then query its variants). Run uv run scripts/onekgpd_meta.py <command>.
The cohort has 5 superpopulations (AFR, AMR, EAS, EUR, SAS) and 26
populations. Population/superpopulation values match case-insensitively by
short code or full name; sample IDs are case-sensitive.
sample-metadata --samples NA19240,HG00096— family, gender, parents, children, population, superpopulation, and phase3 status for the given samples.list-populations— all 26 populations with superpopulation and sample count (use to discover valid values).list-superpopulations— the 5 superpopulations with sample count and constituent populations.population-stats --populations YRI [--populations CHS …]— per-population sex split, phase3 count, and trio membership. Repeat--populationsfor multiple values (full names contain commas, so they are not comma-separated).superpopulation-summary --superpopulations EAS [--superpopulations EUR …]— per-superpopulation totals with a per-population breakdown.select-samples-by-population --population YRIand/or--superpopulation AFR, with optional--skip/--limit(default 0 / 50, max 3202) — the sample IDs in a population and/or superpopulation; both given intersects. Feed the names intoselect-variants-in-samplesto see their variants.
See references/onekgpd_commands.md for full argument tables and JSON output schemas.
Typical Workflows
Which individuals, then which variants they carry
The following is an illustrative template; replace all angle-bracket placeholders.
# Step 1: resolve gene -> verified GRCh38 region (authoritative source).
# Step 2: count individuals carrying a qualifying variant in the region.
uv run scripts/onekgpd_api.py count-samples \
--chrom <chr> --start <start> --end <end> \
--consequence MISSENSE_VARIANT --alpha-missense-class AM_LIKELY_PATHOGENIC \
--output /tmp/n.json
# Step 3: list those individuals.
uv run scripts/onekgpd_api.py select-samples \
--chrom <chr> --start <start> --end <end> \
--consequence MISSENSE_VARIANT --alpha-missense-class AM_LIKELY_PATHOGENIC \
--output /tmp/who.json
# Step 4: count variants for those individuals before selecting.
uv run scripts/onekgpd_api.py count-variants-in-samples \
--chrom <chr> --start <start> --end <end> \
--samples <name1,name2,...> \
--consequence MISSENSE_VARIANT --alpha-missense-class AM_LIKELY_PATHOGENIC \
--output /tmp/variant_count.json
uv run scripts/onekgpd_api.py select-variants-in-samples \
--chrom <chr> --start <start> --end <end> \
--samples <name1,name2,...> \
--consequence MISSENSE_VARIANT --alpha-missense-class AM_LIKELY_PATHOGENIC \
--output /tmp/variants.jsonHomozygous-reference carriers at a position of interest
Illustrative template; replace the placeholders with verified coordinates.
# After identifying a position of interest (verified coordinate):
uv run scripts/onekgpd_api.py count-samples-hom-ref \
--chrom <chr> --position <pos> --output /tmp/homref_n.json
uv run scripts/onekgpd_api.py select-samples-hom-ref \
--chrom <chr> --position <pos> --output /tmp/homref.jsonCommon Mistakes
Mistake: Querying with an unverified coordinate. Fix: Always resolve gene/feature → GRCh38 against an authoritative source first. A misplaced region returns results for an unintended location without error.
Mistake: Calling a selection command before its counting command. Fix: Count first; selection result sets can be large.
Mistake: Assuming a GRCh37 coordinate will work. Fix: The dataset is GRCh38 only.
References
references/onekgpd_commands.md — full per-command argument tables and the returned-variant output schema.
references/annotation_vocabularies.md — the controlled-vocabulary terms accepted by the CSV filter flags (consequence, impact, biotype, feature type, ClinVar significance, AlphaMissense class, variant class).
Current API contract and live-check scope: the command reference.
1000 Genomes Project / IGSR: https://www.internationalgenome.org/
1000 Genomes Project dataset online: https://dnaerys.org/online/
Files
- ATTRIBUTION.mdAdded by AutoGineer902 B
- LICENSELicence file added by AutoGineer1.0 KiB
- SKILL.md22.0 KiB
- assets/kgpe.json1012.9 KiB
- references/annotation_vocabularies.md4.7 KiB
- references/onekgpd_commands.md17.7 KiB
- scripts/onekgpd_api.pyScript31.8 KiB
- scripts/onekgpd_meta.pyScript18.9 KiB
references/onekgpd_commands.md
OneKGPd command reference
Full argument tables for every onekgpd_api.py subcommand and the schema of a
returned variant. Run with uv run scripts/onekgpd_api.py <command> [flags].
Coordinates are GRCh38, 1-based inclusive. Resolve a gene/feature to
coordinates against an authoritative source before querying. Every command
writes full JSON to a file (--output PATH, default a temp file) and prints a
short summary to stdout.
Shared flags
Connection / output (all commands)
| flag | type | required | default | description |
|---|---|---|---|---|
--timeout | float | no | 30 | Positive finite seconds per RPC. Whole-fetch retries and pagination can exceed this overall. |
--output | path | no | temp file | Write full JSON here; otherwise a onekgpd_<cmd>_*.json temp file is created and its path printed. |
There is no endpoint, credential, or assembly override: the skill targets the public 1000 Genomes instance on GRCh38 only.
Region input (count/select variants and samples)
Provide either a single region or one-or-more --region, not both.
| flag | type | required | default | description |
|---|---|---|---|---|
--chrom | str | single-region mode | – | Chromosome: chr17, 17, X, MT (case-insensitive). |
--start | int | with --chrom | – | 1-based inclusive start. |
--end | int | with --chrom | – | 1-based inclusive end (≥ start). |
--ref | str | no | – | Narrow to one reference allele (single-region only). |
--alt | str | no | – | Narrow to one alternate allele (single-region only). |
--region | CHR:START-END | multi-region mode | – | A region; repeat the flag for multiple regions. |
--min-len-bp | int | no | – | Minimum alternate-allele length (bp). |
--max-len-bp | int | no | – | Maximum alternate-allele length (bp). |
Zygosity (count/select variants and samples)
| flag | type | required | default | description |
|---|---|---|---|---|
--het-only | switch | no | both | Include HETEROZYGOUS variants ONLY (0/1 genotypes). |
--hom-only | switch | no | both | Include HOMOZYGOUS variants ONLY (1/1 genotypes). |
With no zygosity flag, both HETEROZYGOUS (0/1) and HOMOZYGOUS (1/1) carriage are
queried — use the default when you need homozygous OR heterozygous variants, or
when uncertain. --het-only and --hom-only are mutually exclusive.
Annotation filters (count/select variants and samples)
See annotation_vocabularies.md for the valid CSV terms. Different filter fields
combine with AND; multiple CSV values within one field combine with OR.
| flag | type | maps to |
|---|---|---|
--af-lt / --af-gt | float | 1000 Genomes dataset AF bounds |
--gnomad-exomes-af-lt / --gnomad-exomes-af-gt | float | gnomAD v4.1 exomes AF bounds |
--gnomad-genomes-af-lt / --gnomad-genomes-af-gt | float | gnomAD v4.1 genomes AF bounds |
--clin-significance | CSV | ClinVar significance terms |
--consequence | CSV | SO consequence terms |
--impact | CSV | VEP impact (HIGH,MODERATE,LOW,MODIFIER) |
--variant-type | CSV | SO variant class terms |
--feature-type | CSV | VEP feature types |
--bio-type | CSV | VEP biotypes |
--alpha-missense-class | CSV | AM_LIKELY_BENIGN,AM_LIKELY_PATHOGENIC,AM_AMBIGUOUS |
--alpha-missense-score-lt / --alpha-missense-score-gt | float | AlphaMissense score bounds |
--biallelic-only / --multiallelic-only | switch | site multiplicity (mutually exclusive) |
--exclude-males / --exclude-females | switch | sex exclusion (mutually exclusive) |
Mutual exclusions enforced: --biallelic-only/--multiallelic-only,
--exclude-males/--exclude-females, and --alpha-missense-class vs the
AlphaMissense score bounds. Every numeric AF/AlphaMissense bound must be finite,
in (0, 1], and remain nonzero when encoded as float32. Zero means unset in
the protobuf API; the wrapper rejects it rather than silently dropping the
filter. Setting a positive *-gt ≥ its matching *-lt defines an empty range.
The gnomAD < X bounds include unannotated variants, represented by AF = 0.
Choose a scientifically meaningful positive lower bound to exclude those zeros;
this also excludes annotated values at or below that bound. For exact annotation
presence, retrieve complete variants and post-filter the relevant AF > 0 locally.
Do not substitute an arbitrary epsilon without documenting its effect.
Commands
dataset-info
No flags beyond --output / --timeout. Returns dataset totals (sample count, sex split,
variant total, assembly) and the cohort breakdown. Doubles as a connectivity
check.
JSON: {command, samples_total, females_total, males_total, variants_total, assembly, cohorts:[{cohort_name, samples_count, female_count, male_count, synthetic}]}.
count-variants
Region + zygosity + annotation flags. Counts variants in the region(s),
cohort-wide. JSON: {command, count, request, result_incomplete}.
select-variants
SELECT variants which exist in ANY genomic region provided.
Region + zygosity + annotation flags, plus pagination:
| flag | type | required | default | description |
|---|---|---|---|---|
--limit | int | no | 200 | Hard cap on returned variants (mutually exclusive with --page-size). |
--page-size | int | no | – | Retrieve ALL matching variants in pages of this size (full walk). |
JSON: {command, count_returned, truncated, request, result_incomplete, variants:[…]}. truncated is true when the count hit --limit (more may
exist; raise --limit or use --page-size). Empty variants array if no
matches. Paging accumulates the complete result in memory. Check
result_incomplete separately from truncated; a count taken before selection
is not a transactional snapshot.
count-variants-in-samples
As count-variants, plus --samples CSV (required) — counts variants carried
by the named individuals. Blank/empty CSV is rejected before connecting, because
the SDK otherwise routes an empty sample list to the cohort-wide endpoint.
select-variants-in-samples
As select-variants, plus --samples CSV (required) — selects variants carried
by the named individuals.
count-samples
Region + zygosity + annotation flags. Counts how many individuals carry a
matching variant. JSON: {command, count, request, result_incomplete}.
select-samples
Region + zygosity + annotation flags, plus pagination:
| flag | type | required | default | description |
|---|---|---|---|---|
--skip | int | no | – | Skip the first N individuals. |
--limit | int | no | – | Return at most N individuals. |
Returns the names of individuals carrying a matching variant. To see which
variants qualified them, feed the names into select-variants-in-samples. JSON:
{command, count, samples:[…], request, result_incomplete}. Empty samples array
if no matches.
count-samples-hom-ref
| flag | type | required | description |
|---|---|---|---|
--chrom | str | yes | Chromosome. |
--position | int | yes | 1-based position. |
Counts individuals with a homozygous-reference (0/0) call at the position. JSON:
{command, count, variant_present, request, result_incomplete}. For a complete
response the count uses a sentinel:
-1→ no variant exists at the position at all (variant_present=false).0→ a variant exists, but no individual is homozygous reference.>0→ number of homozygous-reference individuals.
If result_incomplete=true, variant_present=null and the count is not
definitive. No variant record does not imply all samples are callable reference.
select-samples-hom-ref
Same --chrom/--position as above. Lists the individuals with a homozygous-
reference call at the position. JSON:
{command, count, samples:[…], request, result_incomplete}.
kinship
| flag | type | required | description |
|---|---|---|---|
--sample1 | str | yes | First sample name. |
--sample2 | str | yes | Second sample name. |
Returns the relatedness degree and the KING kinship coefficient between the two
named individuals. JSON: {command, sample1, sample2, degree, phi_bwf, result_incomplete}. degree ∈ {TWINS_MONOZYGOTIC, FIRST_DEGREE, SECOND_DEGREE, THIRD_DEGREE, UNRELATED}; phi_bwf is the KING between-family
robust coefficient (≈ 0.5 monozygotic, 0.25 first-degree, 0.125 second-degree,
0.0625 third-degree).
Returned-variant output schema
select-variants and select-variants-in-samples return a variants array;
each element has these keys (filter-only criteria such as ClinVar significance
and VEP consequence are not echoed back on a returned variant):
| key | type | meaning |
|---|---|---|
chr | str | Chromosome, e.g. chr17. |
start | int | 1-based inclusive start. |
end | int | 1-based inclusive end. |
ref | str | Reference allele. |
alt | str | Alternate allele. |
af | float | Whole-dataset allele frequency, not recalculated for --samples. |
ac | float | Dataset allele count (0.5 for male non-PAR het calls on X and Y chromosomes). |
an | int | Dataset allele number. |
hom_samples | int | Number of all samples with a homozygous genotype. |
het_samples | int | Number of all samples with a heterozygous genotype. |
mis_samples | int | Number of all samples with a missing (no-call) genotype. |
hom_samples_fx | int | Number of female samples with a homozygous genotype, X chromosome only (0 outside X). |
het_samples_fx | int | Number of female samples with a heterozygous genotype, X chromosome only (0 outside X). |
mis_samples_fx | int | Number of female samples with a missing (no-call) genotype, X chromosome only (0 outside X). |
hom_samples_mxy | int | Number of male samples with a homozygous genotype, X & Y chromosomes only (0 outside X and Y). |
het_samples_mxy | int | Number of male samples with a heterozygous genotype, X & Y chromosomes only (0 outside X and Y). |
mis_samples_mxy | int | Number of male samples with a missing (no-call) genotype, X & Y chromosomes only (0 outside X and Y). |
gnomad_exomes_af | float | gnomAD v4.1 exomes AF. 0.0 = not annotated in this service snapshot. |
gnomad_genomes_af | float | gnomAD v4.1 genomes AF. 0.0 = not annotated in this service snapshot. |
am_score | float | AlphaMissense score. 0.0 = not annotated. |
amino_acids | str | HGVSp annotation string; may contain multiple transcript entries, canonical first. |
biallelic | bool | Whether the site was biallelic in the input VCFs. |
Sample & population metadata commands (offline)
A second script, scripts/onekgpd_meta.py, answers population/pedigree questions
from a data file bundled in the skill (assets/kgpe.json) — no network, no
credentials, no dependencies. Run with
uv run scripts/onekgpd_meta.py <command> [flags]. The sample identifier is the
same name used by the variant/kinship commands (e.g. NA19240), so the two
layers compose (e.g. select-samples-by-population → select-variants-in-samples).
The 1000 Genomes cohort has 5 superpopulations (AFR Africa, AMR America,
EAS East Asia, EUR Europe, SAS South Asia) and 26 populations. Use
list-populations / list-superpopulations to discover valid codes and full
names. Population/superpopulation values are matched case-insensitively
against either the short code or the full name; sample IDs are case-sensitive.
All six commands write JSON to --output (or a temp file) and print a summary.
sample-metadata
| flag | type | required | description |
|---|---|---|---|
--samples | CSV | yes | Comma-separated sample IDs (case-sensitive), e.g. NA19240,HG00096. |
JSON: {command, samples:[{...}]} ordered by sample_id. Each sample object:
| key | type | meaning |
|---|---|---|
sample_id | str | Sample identifier (externalIDs). |
family_id | str|null | Family/pedigree ID; null if absent. |
gender | str | male / female. |
paternal_id | str|null | Father's sample_id; null if not in the dataset. |
maternal_id | str|null | Mother's sample_id; null if not in the dataset. |
relationship | str|null | mother / father / child / null. |
children | list[str] | Sorted children whose both parents are recorded; [] if none. |
population_code | str | e.g. YRI. |
population | str | e.g. Yoruba in Ibadan, Nigeria. |
superpopulation_code | str | e.g. AFR. |
superpopulation | str | e.g. Africa. |
phase3 | str | "TRUE" / "FALSE" (phase-3 inclusion flag). |
list-populations
No flags. JSON: {command, populations:[{population_code, population, superpopulation_code, superpopulation, sample_count}]}, ordered by
(superpopulation, population). 26 entries.
list-superpopulations
No flags. JSON: {command, superpopulations:[{superpopulation_code, superpopulation, sample_count, populations:[codes]}]}, ordered by
superpopulation. 5 entries.
population-stats
| flag | type | required | description |
|---|---|---|---|
--populations | repeatable | yes | One population code or full name per flag; repeat for multiple. Repeated (not CSV) because full names contain commas. Case-insensitive. |
JSON: {command, populations:[{population_code, population, superpopulation_code, superpopulation, sample_count, male_count, female_count, phase3_count, trio_count}]}, ordered by population. trio_count = samples that are offspring
with both parents in the dataset (not the relationship label).
superpopulation-summary
| flag | type | required | description |
|---|---|---|---|
--superpopulations | repeatable | yes | One superpopulation code or full name per flag; repeat for multiple. Case-insensitive. |
JSON: {command, superpopulations:[{superpopulation_code, superpopulation, sample_count, male_count, female_count, phase3_count, trio_count, populations:[ <population-stats object>]}]}. The per-superpopulation counts are sums over the
nested per-population breakdown.
select-samples-by-population
| flag | type | required | default | description |
|---|---|---|---|---|
--population | str | one of the two | – | Population code or full name (case-insensitive). |
--superpopulation | str | one of the two | – | Superpopulation code or full name (case-insensitive). |
--skip | int | no | 0 | Number of results to skip (≥ 0). |
--limit | int | no | 50 | Max results to return (1–3202). |
At least one of --population / --superpopulation is required; when both are
given the results are intersected (AND). JSON: {command, count, samples:[ids], request:{population, superpopulation, skip, limit}}, sample IDs ordered
ascending then paginated by skip/limit.
Verified API contract
Reviewed 2026-09-30 against released dnaerys 0.2.1, protobuf R1.20.0,
and public TLS gRPC db.dnaerys.org:443. The service prefix is
org.dnaerys.cluster.grpc.DnaerysService/; do not append REST routes to the host.
All routes below were exercised with small read-only queries. Health and dataset
metadata also succeeded: 3,202 samples, GRCh38, 138,044,723 variants, eight rings,
and a 5,000-variant cap per ring. These are observed snapshot totals, not constants
that clients may assume forever.
| Wrapper operation / input | gRPC method suffix |
|---|---|
dataset-info | DatasetInfo |
count-variants, single / multiple regions | CountVariantsInRegion / CountVariantsInMultiRegions |
count-variants-in-samples, single / multiple | CountVariantsInRegionInSamples / CountVariantsInMultiRegionsInSamples |
select-variants, single / multiple | SelectVariantsInRegion / SelectVariantsInMultiRegions |
select-variants-in-samples, single / multiple | SelectVariantsInRegionInSamples / SelectVariantsInMultiRegionsInSamples |
count-samples, single / multiple | CountSamplesInRegion / CountSamplesInMultiRegions |
select-samples, single / multiple | SelectSamplesInRegion / SelectSamplesInMultiRegions |
count-samples-hom-ref / select-samples-hom-ref | CountSamplesHomReference / SelectSamplesHomReference |
kinship | KinshipDuo |
The SDK reuses variant routes for pagination and discovers the per-ring cap via
DatasetInfo; do not reproduce per-ring offsets as global pagination. Small
paginated results reconciled with the count. Large multi-ring exports and outage
recovery were not stress-tested; incompleteness/retry behavior is covered by mocks.
The protobuf and live service take precedence over prose when they disagree:
gnomad_exomes_af_gt=0 returned 15 variants including two zero annotations in
a small test region; a positive bound of 1e-12 returned 13 with none missing.
The latter is a positive threshold, not a universal definition of presence.
Sources:
Timeout/TLS options, pagination, and missing-annotation convention.
Hosted cohort and annotation versions, annotation composition, and offline metadata source. The bundled 3,202 records matched this source on review; they are not live metadata.
BRCA1 coordinate source: Gene 672, GRCh38.p14, NC_000017.11:43044295-43170327, annotation RS_2025_08.
Requirements and compatibility
Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta
“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.
Needs: Declares allowed tools, Needs an API key, Needs Python
The author says: Requires Python >=3.11. Variant and sample queries require outbound network access to the public 1000 Genomes query endpoint over TLS; the sample/population metadata commands run fully offline over a data file bundled in the skill. No credentials, API keys, or environment variables are used.
Security
What our scanner noticed· Low risk
- Scripts that your agent may run
This skill includes scripts that your agent may run. Read them before you use it.
A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.
Attribution and licence
- Created by
- Dnaerys
- Publisher
- K-Dense (Community)
- Distributed by
- K-Dense
- Source
- K-Dense-AI/scientific-agent-skills · skills/onekgpd · commit a25cf9e
- Licence
- MIT License (redistribution allowed)
- LICENSE (added by AutoGineer from LICENSE.md)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
AutoGineer is not affiliated with or endorsed by Dnaerys or K-Dense.
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download onekgpd.zip