getVariants: Get variants from Google Genomics.

Description Usage Arguments Details Value See Also Examples

Description

This function will return all of the variants that comprise the requested genomic range, iterating over paginated results as necessary.

Usage

1
2
3
getVariants(variantSetId = "10473108253681171589", chromosome = "22",
  start = 16051400, end = 16051500, fields = NULL, converter = c,
  useGRPC = getOption("google_genomics_use_grpc"))

Arguments

variantSetId

The dataset ID.

chromosome

The chromosome.

start

Start position on the chromosome in 0-based coordinates.

end

End position on the chromosome in 0-based coordinates.

fields

A subset of fields to retrieve. The default (NULL) will return all fields.

converter

A function that takes a list of variant R objects and returns them converted to the desired type.

useGRPC

Whether to use GRPC mechanism to query.

Details

By default, this function gets variants from a small section of 1000 Genomes phase 1 variants.

Optionally pass a converter as appropriate for your use case. By passing it to this method, only the converted objects will be accumulated in memory. The converter function should return an empty container of the desired type if called without any arguments.

Value

By default, the return value is a list of R objects corresponding to the JSON objects returned by the Google Genomics Variants API. If a converter is passed, object(s) of the type returned by the converter will be returned by this function.

See Also

getReads for equivalent function for reads, and variantsToVRanges for a converter function.

Examples

1
2
3
4
# Authenticated on package load from the env variable GOOGLE_API_KEY.
variants <- getVariants()
summary(variants)
summary(variants[[1]])

Bioconductor/GoogleGenomics documentation built on May 6, 2019, 7:51 a.m.