Learn R Programming

GoogleGenomics (version 1.4.2)

getReadsPage: Get one page of reads from Google Genomics.

Description

In general, use the getReads method instead. It calls this method, returning reads from all of the pages that comprise the requested genomic range.

Usage

getReadsPage(readGroupSetId = "CMvnhpKTFhDnk4_9zcKO3_YB", chromosome = "22", start = 16051400, end = 16051500, fields = NULL, pageToken = NULL)

Arguments

readGroupSetId
The read group set 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.
pageToken
The page token. This can be NULL (default) for the first page.

Value

A two-element list is returned by the function.reads: A list of R objects corresponding to the JSON objects returned by the Google Genomics Reads API.nextPageToken: The token to be used to retrieve the next page of results, if applicable.

Details

By default, this function gets reads for a small genomic region for one sample in 1,000 Genomes.

Note that the Global Alliance for Genomics and Health API uses a 0-based coordinate system. For more detail, please see GA4GH discussions such as the following:

See Also

Other page fetch functions: getSearchPage; getVariantsPage

Examples

Run this code
# Authenticated on package load from the env variable GOOGLE_API_KEY.
readsPage <- getReadsPage()
summary(readsPage)
summary(readsPage$reads[[1]])

Run the code above in your browser using DataLab