Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Confused about DMR annotation #80

Closed
f6v opened this issue Oct 12, 2023 · 1 comment
Closed

Confused about DMR annotation #80

f6v opened this issue Oct 12, 2023 · 1 comment

Comments

@f6v
Copy link

f6v commented Oct 12, 2023

Hi,

One of the DMRs we got is located at chr17:8243028-8243946. In the excel file, it has Open.Sea as "yes", annotation is equal to "Promoter" and distanceToTSS is "0". But the DMRs plot looks like:
image

It seems like this DMR is within the intron and far from TSS if we look at genome browser, this region seems to be outside of promoter:
image

Am I reading this wrong? How can distanceToTSS be 0 here? If it was 0, shouldn't the first plot contain the first exon?

@f6v f6v changed the title Confused about plots Confused about DMR annotation Oct 12, 2023
@ben-laufer
Copy link
Owner

Hi @f6v,

The following can reproduce your example:

library(DMRichR)

DMRichR::annotationDatabases("mm10")

sigRegions <- data.frame(seqnames = "chr17",
           start = 8243028,
           end = 8243946) %>% 
  plyranges::as_granges()

sigRegions %>% 
  DMRichR::annotateRegions(TxDb = TxDb,
                           annoDb = annoDb)

DMRichR::annotateRegions() is calling to ChIPseeker::annotatePeak(). You can learn more about the annotation by running the following (after the first block of code):

 sigRegions %>% 
    ChIPseeker::annotatePeak(TxDb = TxDb,
                             annoDb = annoDb,
                             overlap = "all",
                             verbose = FALSE) %>%
    dplyr::as_tibble()

This shows that the transcript mapping is based on ENSMUST00000166348.9 , which it says starts at 8243811, so your DMR does overlap with its definition of the promoter. See here for more information.

For the DMR plot, the function calls dmrseq::getAnnot(), which uses annotatr::build_annotations().

annoTrack <- dmrseq::getAnnot(genome)

annoTrack$Exons %>% 
  plyranges::filter(tx_id == "ENSMUST00000166348.9")

This shows that the coding sequence is from: 8255965-8256108. Since the plot only shows the CDS, and not promoters, your result seems correct. You can learn about the annotations here.

If you'd like for the plot to look different, you can customize the tracks at the bottom of DMRichR::plotDMRs2(), which is based on dmrseq::plotDMRs(), through the annoTrack argument.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants