getVariant: getVariant function

Description Usage Arguments Details Value References See Also Examples

View source: R/getVariant.R

Description

Get a variant by its ID with all call sets for this variant.

Usage

1
getVariant(host, variantId, asVCF = TRUE)

Arguments

host

URL of GA4GH API data server.

variantId

The ID of the Variant to be retrieved.

asVCF

If TRUE the function will return an VCF with header (default), otherwise it will return an DataFrame.

Details

This function requests GET host/variants/variantId.

Value

VCF object (when asVCF = TRUE) or DataFrame object (otherwise).

References

Official documentation.

See Also

DataFrame, searchVariants, searchVariantsByGRanges, VCF, makeVCFFromGA4GHResponse

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
host <- "http://1kgenomes.ga4gh.org/"
## Not run: 
datasetId <- searchDatasets(host, nrows = 1)$id
variantSetId <- searchVariantSets(host, datasetId, nrows = 1)$id
variantId <- searchVariants(host, variantSetId, "1", 15031, 15031)$id
getVariant(host, variantId)

getVariant(host, variantId, asVCF = FALSE)

## End(Not run)

labbcb/GA4GHclient documentation built on Nov. 22, 2017, 2:19 p.m.