query_variants
Query genetic variants in authorized samples.
Use this tool to retrieve genotyped loci and public annotations by gene, HGVS notation, genomic region, GWAS Catalog trait, or BRaVa rare-variant association. Results include per-sample genotype calls (dosage: 0=genotyped without the allele, 1=one copy, 2=two copies), plus public ClinVar annotations, GWAS Catalog trait associations and BRaVa rare-variant associations at each locus when available (hgvs/region queries return all three; clinvar, gwas and brava queries return their own). BRaVa covers rare coding variants (allele frequency <= 0.001) and keeps only results with p <= 0.01, so a locus without BRaVa results has no nominal BRaVa signal; it may still have been studied. A brava query leaves out the variants every sample is called at without the allele (counted in not_carried), and HaploHub reports no variant where no sample has a call. Each BRaVa result names BRaVa as its source with the citation URL: cite it when you report one. This is for educational, research, and wellness information workflows, not clinical determinations.
Alleles: a locus line lists every alternate allele of the genotype record. When an entry has allele, its dosage counts that one allele, and two entries can share a locus with different alleles. Region and gwas entries have no allele, and their dosage counts any alternate allele.
Batch lookups: put up to 20 loci in one call (positions, or a list of hgvs strings) rather than looping one locus per call. Each call is a full upstream query, so the batch is both faster and far cheaper.
Parameters
| Parameter | Description |
|---|---|
query_typestring required | The type of variant query. "clinvar" — search public ClinVar annotations by gene names and ClinVar significance labels. "hgvs" — look up a specific variant by HGVS notation (e.g. "NC_000013.11:g.32356461T>G"). "region" — scan a genomic region by chromosome and position range, or look up a batch of loci via positions. "gwas" — find GWAS Catalog trait/allele associations at the authorized genotyped loci, by gene (gene_symbols), rs id (rs_ids), or trait (trait_id). Use for published trait-association lookup and biomarker context, not diagnosis. "brava" — check the authorized samples at BRaVa rare coding variants (allele frequency <= 0.001, results with p <= 0.01). It takes the One of: |
chromosomestring | null optional | Chromosome accession (e.g. "chr13", "NC_000013.11"). Required when query_type is "region" and positions is not given. |
clinical_significancestring[] | null optional | ClinVar significance-label filter. Defaults to ["Pathogenic", "Likely_pathogenic"]. Other useful values: "Uncertain_significance", "Benign", "Likely_benign", "drug_response". These labels come from public ClinVar records and are used for reference-database search, not determinations about any person or sample. Case-insensitive substring match. |
endinteger | null optional | 1-based end position. Required when query_type is "region" and positions is not given. |
gene_symbolsstring[] | null optional | Gene symbols to query (e.g. ["APOE", "TCF7L2"]). Required when query_type is "clinvar". Use known gene symbols from the user's request or from a prior public reference search; for broad trait questions, identify relevant genes or trait ids with the reference tools first. |
hgvsstring | string[] | null optional | HGVS notation (e.g. "NC_000013.11:g.32356461T>G"), one string or a list of up to 20 to look up in one call. Required when query_type is "hgvs". Supports both c. and g. notation. |
intentstring | null optional | One or two sentences on what the user is trying to learn and why this query serves it, under 400 characters. Describe the goal in general terms (e.g. "Checking known pathogenic variants in hereditary cancer genes the user asked about"). Do not include names, ages, relatives, symptoms, diagnoses, medications, locations, or genotypes. Stored with the query to review whether queries match what users ask for. |
limitinteger optional, default 1000 | Only used when query_type is "brava": how many of the most significant matching BRaVa variants to check (default and max 1000). |
p_value_maxnumber | null optional | Maximum association p-value (e.g. 5e-8 for genome-wide significance). Only used when query_type is "gwas" or "brava". |
positionsstring[] | null optional | Batch of loci for query_type "region", up to 20 per call, each "<chromosome>:<position>" or "<chromosome>:<start>-<end>" (e.g. ["chr4:67031670", "chr5:103743441-103743500"]). Use this instead of one call per SNP: every call is a full upstream query, so 20 loci in one call cost far less than 20 calls. Takes precedence over chromosome/start/end. |
rs_idsstring[] | null optional | SNP rs ids to look up (e.g. ["rs7903146"]). Only used when query_type is "gwas". |
sample_idstring | null optional | Optional: query only this sample instead of all user samples. Use a sample_id from |
startinteger | null optional | 1-based start position. Required when query_type is "region" and positions is not given. |
trait_idstring | null optional | GWAS Catalog / EFO trait id (e.g. an EFO id) to filter associations when query_type is "gwas". When query_type is "brava", a BRaVa trait code from |
Response
| Field | Description |
|---|---|
samplesobject required | Label of each queried sample, keyed as in |
variantsobject[] required | |
variants[].callsobject required | Dosage per sample, keyed like |
variants[].locusstring required | accession:position, followed by :ref>alt when both alleles are known, e.g. "NC_000019.10:44908684:T>C". A record with several alternate alleles lists them all, e.g. "...:T>C,G". |
variants[].allelestring optional | The one alternate allele |
variants[].bravaobject[] optional | Present only when BRaVa has results for an allele at this locus. |
variants[].brava[].allelestring required | The allele BRaVa tested, as ref>alt, e.g. "G>A". When the entry has |
variants[].brava[].betanumber | null required | Effect size. |
variants[].brava[].citationstring | null required | URL of the BRaVa publication to cite. |
variants[].brava[].ninteger | null required | Sample size. |
variants[].brava[].n_casesinteger | null required | Cases. Null for quantitative traits. |
variants[].brava[].pnumber required | Association p-value. |
variants[].brava[].releasestring | null required | The BRaVa release. |
variants[].brava[].senumber | null required | |
variants[].brava[].sourcestring required | Always "BRaVa". |
variants[].brava[].traitobject required | The BRaVa trait an association belongs to. |
variants[].brava[].trait.codestring required | Trait code, e.g. "LDLC". Pass it as a trait filter. |
variants[].brava[].trait.kindstring required | "binary" (case/control) or "quantitative" (a measurement, e.g. LDL cholesterol). |
variants[].brava[].trait.namestring required | |
variants[].clinvarobject[] optional | Present only when ClinVar has records here. |
variants[].clinvar[].conditionsstring | null required | |
variants[].clinvar[].genestring required | |
variants[].clinvar[].reviewstring required | ClinVar review status. |
variants[].clinvar[].significancestring required | ClinVar significance label, e.g. "Pathogenic". |
variants[].errorstring optional | |
variants[].gwasobject[] optional | Present only when the GWAS Catalog has records here. |
variants[].gwas[].genestring required | |
variants[].gwas[].or_betanumber | null required | Odds ratio or beta coefficient. |
variants[].gwas[].pnumber | null required | Association p-value. |
variants[].gwas[].pmidstring | null required | PubMed id of the study. |
variants[].gwas[].rafstring required | Risk allele frequency, as the catalog reports it. |
variants[].gwas[].reported_allelestring required | The strongest reported risk allele, e.g. "rs7903146-T". |
variants[].gwas[].rsstring required | |
variants[].gwas[].studystring | null required | GWAS Catalog study accession. |
variants[].gwas[].traitstring required | |
variants[].querystring optional | hgvs queries only: the HGVS string this entry answers. |
variants[].rsstring optional | |
not_carriedinteger optional | brava queries only: checked BRaVa variants where every sample is called without the allele (dosage 0). They are left out of |
unresolvedobject[] optional | Present only when some items did not resolve. |
unresolved[].querystring required | The item as it was sent. |
unresolved[].errorstring optional | |
unresolved[].resolvedstring optional | What the item resolved to, when it did. |