rpkm_chr21: rpkm_chr21

Description Usage Format Source Examples

Description

Subset of expression data from Roadmap Epigenomics data for use in examples

Usage

1

Format

SummarizedExperiment with expression data in rpkm assay

Source

Roadmap Epigenomics Project

Examples

 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
# Access data via:
data(rpkm_chr21)

# Code showing how data was created:
## Not run: 

library(AnnotationHub)
library(dplyr)
library(Homo.sapiens)
library(SummarizedExperiment)

ah <- AnnotationHub()
expr_data <- query(ah , c("EpigenomeRoadMap", "RPKM"))
rpkm_pc <- expr_data[["AH49019"]]

meta_data <- query(ah , c("EpigenomeRoadMap", "metadata"))[["AH41830"]]

entrez_mapping <- AnnotationDbi::select(Homo.sapiens, 
                                        rownames(rpkm_pc), 
                                        c("ENTREZID","SYMBOL"), 
                                        "ENSEMBL")

genes_mapping <- as.data.frame(genes(Homo.sapiens, 
                                     filter = 
                                       list("GENEID" = 
                                                   entrez_mapping$ENTREZID)))
genes_mapping$GENEID = vapply(genes_mapping$GENEID, as.character,"")

chr21 <- inner_join(entrez_mapping, genes_mapping, 
                    by = c("ENTREZID" = "GENEID")) %>% 
  mutate(seqnames = as.character(seqnames)) %>% 
  dplyr::filter(seqnames == "chr21")

chr21_uniq <- dplyr::group_by(chr21, ENSEMBL) %>% filter(row_number()==1) %>% 
  ungroup()


rpkm_chr21 <- SummarizedExperiment(assays = list(rpkm = 
                               as.matrix(rpkm_pc[chr21_uniq$ENSEMBL,2:57])), 
                                   colData = dplyr::filter(meta_data, 
                                                 EID %in% colnames(rpkm_pc)),
                                   rowRanges = as(chr21_uniq,
                                                  "GenomicRanges"))



## End(Not run)

skummerf/GenomicWidgets documentation built on May 31, 2019, 6:16 p.m.