Querying Variant DB - GenomicsDB/GenomicsSampleAPIs GitHub Wiki

#Querying VariantDB

The current version of VariantDB has support for searchVariants from the GA4GH API.

The main way to retrieve variants from the Variant Store is through the searchVariants function at the /variants/search endpoint.

GASearchVariantsRequest

The server accepts a POST to /variants/search containing a JSON with the relevant parameters, for example:

{
  "variantSetIds": ["this_variant"],
  "referenceName": "chr1",
  "start": 16943809,
  "end": 16945000,
  "pageSize": 100,
  "callSetIds": null,
  "pageToken": null
}

In general:

Type Field Default Description
string variantSetIds [] Required. A list of variant sets to search over. Can be empty, an actual variant set id, or an arbitrary string.
array, null callSetIds null Only return variant calls which belong to call sets with these Ids. null value returns all calls, [] returns only variants with no call information.
string referenceName NA Required. Only return variants on this reference (equivalent to a contig).
long start NA Required. The beginning of the window (0-based, inclusive) for which overlapping variants should be returned. Genomic positions are non-negative integers less than reference length.
long end NA Required. Required. The end of the window (0-based, exclusive) for which overlapping variants should be returned.
int, null pageSize null Specifies the maximum number of results to return in a single page. If unspecified, a system default will be used.
string, null pageToken null The continuation token, which is used to page through large result sets. To get the next page of results, set this parameter to the value of nextPageToken from the previous response.

The Variant Store currently assumes that all Variants in a given TileDB array belong to the same variant set in order to not disrupt this definition. By that logic, all the variants in TileDB are based on the same Reference assembly.

⚠️ **GitHub.com Fallback** ⚠️