inst/doc/AnnotationHub.R

## ----style, echo = FALSE, results = 'asis'--------------------------------------------------------
BiocStyle::markdown()

## ----library, message=FALSE-----------------------------------------------------------------------
library(AnnotationHub)

## ----AnnotationHub--------------------------------------------------------------------------------
ah = AnnotationHub()

## ----show-----------------------------------------------------------------------------------------
ah

## ----dataprovider---------------------------------------------------------------------------------
unique(ah$dataprovider)

## ----species--------------------------------------------------------------------------------------
head(unique(ah$species))

## ----rdataclass-----------------------------------------------------------------------------------
head(unique(ah$rdataclass))

## ----dm1------------------------------------------------------------------------------------------
dm <- query(ah, c("ChainFile", "UCSC", "Drosophila melanogaster"))
dm

## ----show2----------------------------------------------------------------------------------------
df <- mcols(dm)

## ----length---------------------------------------------------------------------------------------
length(ah)

## ----subset---------------------------------------------------------------------------------------
ahs <- query(ah, c('inparanoid8', 'ailuropoda'))
ahs

## ----display, eval=FALSE--------------------------------------------------------------------------
#  d <- display(ah)

## ----dm2------------------------------------------------------------------------------------------
dm
dm["AH15146"]

## ----dm3------------------------------------------------------------------------------------------
dm[["AH15146"]]

## ----show-2---------------------------------------------------------------------------------------
ah

## ----snapshot-------------------------------------------------------------------------------------
snapshotDate(ah)

## ----possibleDates--------------------------------------------------------------------------------
pd <- possibleDates(ah)
pd

## ----setdate, eval=FALSE--------------------------------------------------------------------------
#  snapshotDate(ah) <- pd[1]

## ----clusterOptions1, eval=FALSE------------------------------------------------------------------
#  library(AnnotationHub)
#  hub <- AnnotationHub()
#  gr <- hub[["AH50773"]]  ## downloaded once
#  txdb <- makeTxDbFromGRanges(gr)  ## build on the fly

## ----clusterOptions2, eval=FALSE------------------------------------------------------------------
#  library(AnnotationDbi)  ## if not already loaded
#  txdb <- loadDb("/locationToFile/mytxdb.sqlite")

## ----sessionInfo----------------------------------------------------------------------------------
sessionInfo()

Try the AnnotationHub package in your browser

Any scripts or data that you put into this service are public.

AnnotationHub documentation built on April 17, 2021, 6:01 p.m.