readsToGAlignments {GoogleGenomics}R Documentation

Convert reads to GAlignments.

Description

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:

Usage

readsToGAlignments(reads, oneBasedCoord = TRUE, slStyle = "UCSC")

Arguments

reads

A list of R objects corresponding to the JSON objects returned by the Google Genomics Reads API.

oneBasedCoord

Convert genomic positions to 1-based coordinates.

slStyle

The style for seqnames (chrN or N or...). Default is UCSC.

Value

GAlignments

Examples

# Authenticated on package load from the env variable GOOGLE_API_KEY.
alignments1 <- getReads(converter=readsToGAlignments)
summary(alignments1)
alignments2 <- readsToGAlignments(getReads())
print(identical(alignments1, alignments2))

[Package GoogleGenomics version 2.2.0 Index]