Learn R Programming

GoogleGenomics (version 1.4.2)

getReads: Get reads from Google Genomics.

Description

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

Usage

getReads(readGroupSetId = "CMvnhpKTFhDnk4_9zcKO3_YB", chromosome = "22", start = 16051400, end = 16051500, fields = NULL, converter = c)

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.
converter
A function that takes a list of read R objects and returns them converted to the desired type.

Value

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

Details

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

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.

See Also

getVariants

Examples

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

Run the code above in your browser using DataLab