Annotatr Duplicate Entries
0
0
Entering edit mode
hayleyw • 0
@43494c06
Last seen 9 weeks ago
Canada

Hi All,

I have been using the annotatr package to annotate differentially methylated regions (DMRs) and differentially methylation CpGs/positions (DMPs) and create bar charts based on these results. However, it seems to be duplicating some of the entries. I realize some areas may map to multiple locations in the genome, but I would like to eliminate duplicates if possible. For example, I have some DMPs that have multiple "hg19_genes_introns" entries. This is a single position, so I would like it to only have one entry. If the number of duplicates were the same for each position, this wouldn't be as much of an issue, because the proportions would be the same. However, I have some DMPs with a single gene annotation entry and others with several. I have included an example of the DMR and DMP code below.

#####Fixed-Effects Age DMP
##Adding Hypo/Hyper tags to significant CpGs
anno.fixed.Age.sig = subset(anno.fixed.Age, adj.P.Val < 0.05)
anno.fixed.Age.sig= anno.fixed.Age.sig %>%
  mutate(DM_status = case_when(
    logFC > 0 ~ "Hyper",
    logFC < 0 ~ "Hypo"
  ))
#Creating Granges object and Adding CpG and Genomic Annotations
anno.fixed.Age.sig_Grange <- makeGRangesFromDataFrame(anno.fixed.Age.sig, keep.extra.columns = T)
dmp_anno_Age_fixed = annotate_regions(
  regions = anno.fixed.Age.sig_Grange,
  annotations = annotations,
  ignore.strand = TRUE,
  quiet = FALSE)
print(dmp_anno_Age_fixed)

#Fixed-Effect Age DMR
##Adding Hypo/Hyper tags to DMRs
DMR.results.fixed.Age= DMR.results.fixed.Age %>%
  mutate(DM_status = case_when(
    meandiff > 0 ~ "Hyper",
    meandiff < 0 ~ "Hypo"
  ))
  #Creating Granges object and Adding CpG and Genomic Annotations
DMR.results.fixed.Age_Grange <- makeGRangesFromDataFrame(DMR.results.fixed.Age, keep.extra.columns = T)
dmr_annotated_Age_fixed = annotate_regions(
  regions = DMR.results.fixed.Age_Grange,
  annotations = annotations,
  ignore.strand = TRUE,
  quiet = FALSE)# include your problematic code here with any corresponding output

Thank you!

annotatr AnnotationHub • 411 views
ADD COMMENT

Login before adding your answer.

Traffic: 737 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