File: AnnotationHub.R

package info (click to toggle)
r-bioc-annotationhub 3.14.0%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 592 kB
  • sloc: makefile: 2
file content (74 lines) | stat: -rw-r--r-- 3,024 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
## ----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

## ----BiocHubsShiny, eval=FALSE--------------------------------------------------------------------
#  BiocHubsShiny::BiocHubsShiny()

## ----echo=FALSE,fig.cap="BiocHubsShiny query with terms dataprovider = 'inparanoid' and species = 'ailuropoda'"----
knitr::include_graphics("ailMel1_BiocHubsShiny.png")

## ----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()