Error in RnBeads when customizing promoters
0
1
Entering edit mode
6.9 years ago
sugus ▴ 150

Hi there, I got trouble in customizing promoters in RnBeads.
I use the attached promoters2kb.R to customize a defined promoters with + - 2000kb from TSS, and set it to RnBeads.

library(RnBeads)

genome.assembly <- "hg19"   # targeted genome assembly
promoter.upstream <- 2000L  # number of bases upstream of TSS belonging to the promoter
promoter.downstream <- 1999L # number of bases downstream of TSS belonging to the promoter

genes <- rnb.get.annotation("genes", genome.assembly)
genes <- rnb.annotation2data.frame(genes)
pr.start <- ifelse(genes$Strand == "-", genes$End - promoter.downstream, genes$Start - promoter.upstream)
pr.end <- ifelse(genes$Strand == "-", genes$End + promoter.upstream, genes$Start + promoter.downstream)
tbl <- data.frame(
  "chromosome" = genes$Chromosome,
  "start" = pr.start,
  "end" = pr.end,
  "strand" = genes$Strand)
rownames(tbl) <- genes$ID

rnb.set.annotation("promoters2kb", tbl, assembly = genome.assembly)
rnb.options(region.types = c(rnb.getOption("region.types"), "promoters2kb"))

When I command the following code it seemed perfect to me:

head(rnb.get.annotation("promoters2kb"))
GRangesList object of length 6:
$chr1 
GRanges object with 5363 ranges and 0 metadata columns:
                  seqnames                 ranges strand
                     <Rle>              <IRanges>  <Rle>
  ENSG00000223972     chr1         [ 9869, 13868]      +
  ENSG00000243485     chr1         [27554, 31553]      +
  ENSG00000227232     chr1         [27807, 31806]      -
  ENSG00000237613     chr1         [34082, 38081]      -
  ENSG00000268020     chr1         [50473, 54472]      +
              ...      ...                    ...    ...
  ENSG00000171163     chr1 [249151344, 249155343]      -
  ENSG00000227237     chr1 [249151363, 249155362]      +
  ENSG00000185220     chr1 [249198395, 249202394]      +
  ENSG00000200495     chr1 [249204995, 249208994]      -
  ENSG00000233084     chr1 [249228780, 249232779]      +

...
<5 more elements>
-------
seqinfo: 24 sequences from hg19 genome; no seqlengths

and it also appeared in the rnb.region.types when I command rnb.region.types:

> rnb.region.types()
[1] "tiling"        "genes"         "promoters"     "cpgislands"    "promoters2kb"

However, when I use rnb.options and rnb.run.analysis, I got the following warning and of course there is no results coming out.

2017-12-20 16:29:56     1.8 WARNING                                 The following 1 region types will not be included in the analysis: promoters2kb

Also I cannot use M=meth(rnb.set,"promoters2kb") to get beta value, it will return:

M=meth(rnb.set.load,"promoters_2kb")
Error in get.dataset.matrix(object, type, row.names, object@meth.sites,  : 
  unsupported region type

Thus, no idea about what happened and what to figure it out. Somebody help, many thanks in advance!

RnBeads promoters R • 1.6k views
ADD COMMENT
0
Entering edit mode

Hi sugus,

By any chance, did you find a solution for your problem? I am facing the same issues.

ADD REPLY

Login before adding your answer.

Traffic: 1845 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6