Permalink
Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
47 lines (29 sloc) 2.35 KB

Browse Reads with Bioconductor

The properly rendered version of this document can be found at Read The Docs.

If you are reading this on github, you should instead click here.

`Bioconductor`_ provides a convenient way to browse regions of the genome. browse-reads

require(ggbio)
require(GoogleGenomics)

GoogleGenomics::authenticate("/PATH/TO/YOUR/client_secrets.json")

galignments <- getReads(readGroupSetId="CMvnhpKTFhDnk4_9zcKO3_YB", chromosome="17",
                        start=41218200, end=41218500, converter=readsToGAlignments)
strand_plot <- autoplot(galignments, aes(color=strand, fill=strand))
coverage_plot <- ggplot(as(galignments, "GRanges")) + stat_coverage(color="gray40",
                                                    fill="skyblue")
tracks(strand_plot, coverage_plot, xlab="chr17")

A more extensive example of read browsing with `Bioconductor`_ is documented towards the end of codelab Data Analysis using Google Genomics.

To make use of this upon your own data:

  1. First, load your data into `Google Genomics`_. See :doc:`/use_cases/load_data/index` for more detail as to how to do this.
  2. If you do not have them already, install the necessary `Bioconductor`_ packages. See `Using Bioconductor`_ for more detail as to how to do this. Alternatively, you can :doc:`/use_cases/run_familiar_tools/bioconductor`.
  3. Update the parameters to the getReads call the example above to match that of your data and desired genomic region to view.