Getting started

The AnnotationHub package provides a client interface to resources stored at the AnnotationHub web service.

library(AnnotationHub)

Start by creating an AnnotationHub object

ah = AnnotationHub()

Exercises

  • Query the ah object to find a TxDb object for hg38. How many such records are there?
library(AnnotationHub)
ah = AnnotationHub()
query(ah, c('hg38','TxDb'))
  • Access the record in the first exercise and assign it to the txdb variable.
txdb = ah[["AH52260"]]
  • Use the transcripts method to get a set of GRanges associated with transcripts.
tx = transcripts(txdb)
tx
  • Perform a query on ah to find the narrow peak RoadMapEpigenome objects. How many records are available?
ah_roadmap = query(ah, c("RoadMap", "narrowpeak"))
length(ah_roadmap)
  • Further filter to keep only DNAse data. How many records are available?
dnase = query(ah_roadmap, 'dnase')
dnase
  • Load the last DNAse record into a variable. What does the track store in it? What is the class of the record?
dnase_track = dnase[['AH45295']]
dnase_track
class(dnase_track)