... | ... |
@@ -106,6 +106,58 @@ get_exons_mm10 <- function() { |
106 | 106 |
) |
107 | 107 |
} |
108 | 108 |
|
109 |
+#' @rdname get_exons |
|
110 |
+#' |
|
111 |
+#' @examples |
|
112 |
+#' grcm39_exons <- get_exons_grcm39() |
|
113 |
+#' |
|
114 |
+#' @export |
|
115 |
+get_exons_grcm39 <- function() { |
|
116 |
+ package_check( |
|
117 |
+ c("TxDb.Mmusculus.UCSC.mm39.refGene", "org.Mm.eg.db"), |
|
118 |
+ c("3.10.0", "3.15.0") |
|
119 |
+ ) |
|
120 |
+ |
|
121 |
+ txdb <- TxDb.Mmusculus.UCSC.mm39.refGene::TxDb.Mmusculus.UCSC.mm39.refGene |
|
122 |
+ |
|
123 |
+ genes <- AnnotationDbi::keys(txdb, "GENEID") |
|
124 |
+ exon_data <- suppressMessages(AnnotationDbi::select( |
|
125 |
+ txdb, |
|
126 |
+ keys = genes, |
|
127 |
+ keytype = "GENEID", |
|
128 |
+ columns = c( |
|
129 |
+ "GENEID", |
|
130 |
+ "TXID", |
|
131 |
+ "EXONCHROM", |
|
132 |
+ "EXONSTRAND", |
|
133 |
+ "EXONSTART", |
|
134 |
+ "EXONEND" |
|
135 |
+ ) |
|
136 |
+ )) |
|
137 |
+ |
|
138 |
+ symbols_data <- suppressMessages(AnnotationDbi::select( |
|
139 |
+ org.Mm.eg.db::org.Mm.eg.db, |
|
140 |
+ keys = genes, |
|
141 |
+ keytype = "ENTREZID", |
|
142 |
+ columns = c( |
|
143 |
+ "SYMBOL" |
|
144 |
+ ) |
|
145 |
+ )) %>% |
|
146 |
+ dplyr::rename(GENEID = "ENTREZID") |
|
147 |
+ |
|
148 |
+ dplyr::left_join(exon_data, symbols_data, by = "GENEID", multiple = "all") %>% |
|
149 |
+ tibble::as_tibble() %>% |
|
150 |
+ dplyr::rename( |
|
151 |
+ gene_id = "GENEID", |
|
152 |
+ chr = "EXONCHROM", |
|
153 |
+ strand = "EXONSTRAND", |
|
154 |
+ start = "EXONSTART", |
|
155 |
+ end = "EXONEND", |
|
156 |
+ transcript_id = "TXID", |
|
157 |
+ symbol = "SYMBOL" |
|
158 |
+ ) |
|
159 |
+} |
|
160 |
+ |
|
109 | 161 |
#' Get example exon annotations for mus musculus (mm10) |
110 | 162 |
#' |
111 | 163 |
#' This is a small subset of the exons returned by |
... | ... |
@@ -3,12 +3,15 @@ |
3 | 3 |
\name{get_exons} |
4 | 4 |
\alias{get_exons} |
5 | 5 |
\alias{get_exons_mm10} |
6 |
+\alias{get_exons_grcm39} |
|
6 | 7 |
\alias{get_exons_hg19} |
7 | 8 |
\alias{get_exons_hg38} |
8 | 9 |
\title{Get exon annotations} |
9 | 10 |
\usage{ |
10 | 11 |
get_exons_mm10() |
11 | 12 |
|
13 |
+get_exons_grcm39() |
|
14 |
+ |
|
12 | 15 |
get_exons_hg19() |
13 | 16 |
|
14 | 17 |
get_exons_hg38() |
... | ... |
@@ -24,6 +27,8 @@ objects. |
24 | 27 |
\examples{ |
25 | 28 |
mm10_exons <- get_exons_mm10() |
26 | 29 |
|
30 |
+grcm39_exons <- get_exons_grcm39() |
|
31 |
+ |
|
27 | 32 |
hg19_exons <- get_exons_hg19() |
28 | 33 |
|
29 | 34 |
hg38_exons <- get_exons_hg38() |