searchVariantsByGRanges: searchVariantsByGranges function

Description Usage Arguments Details Value References See Also Examples

View source: R/searchVariantsByGRanges.R

Description

Search for variants by genomic ranges (lines of VCF files)

Usage

1
2
searchVariantsByGRanges(host, variantSetId, granges, callSetIds = character(),
  nrows = Inf, responseSize = NA_integer_, asVCF = FALSE)

Arguments

host

URL of GA4GH API data server.

variantSetId

The variant set to search.

granges

A GRanges object containing one or more genomic ranges.

callSetIds

Only return variant calls which belong to callsets with these IDs. If unspecified, return all variants and no variant call objects.

nrows

Number of rows of the data frame returned by this function. If not defined, the function will return all entries. If the number of available entries is less than the value of this this parameter, the function will silently return only the available entries.

responseSize

Specifies the number of entries to be returned by the server until reach the number of rows defined in nrows parameter or until get all available entries. If not defined, the server will return the allowed maximum reponse size. Increasing this the value of this parameter will reduce the number of requests and reducing the time required. The will not respect this parameter if the value if larger than its maximum response size.

asVCF

If TRUE the function will return a list of VCF object with headers (default), otherwise it will return a list of DataFrame objects.

Details

This function maps to the body of POST host/variants/search.

Value

List of VCF objects (when asVCF = TRUE) or a list of DataFrame objects (otherwise). Each row in GRanges object will be a element of the list.

References

Official documentation.

See Also

DataFrame, searchVariants getVariant, VCF

Examples

1
2
3
4
5
6
7
8
9
library(GenomicRanges)
host <- "http://1kgenomes.ga4gh.org/"
## Not run: 
datasetId <- searchDatasets(host, nrows = 1)$id
variantSetId <- searchVariantSets(host, datasetId, nrows = 1)$id[1]
granges <- GRanges(seqnames = "1", IRanges(start = 15000, end = 16000))
searchVariantsByGRanges(host, variantSetId, granges)

## End(Not run)

labbcb/GA4GHclient documentation built on May 20, 2019, 7:32 p.m.