Skip to content

Commit

Permalink
updated for R-devel version for GenomicsRanges findOverlaps function
Browse files Browse the repository at this point in the history
  • Loading branch information
ShengLi committed May 1, 2016
1 parent 6c69b60 commit 5f74417
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ Description: Optimized DMR analysis based on bimodal normal distribution
distribution of CpGs into account for the enrichment DNA methylation sequencing
data so as to optimize the definition of the empirical regions. Combined with
the dependent adjustment for regional p-value combination and DMR annotation.
Version: 0.6.3.1
Version: 0.6.4.1
Authors@R: c(person(given="Sheng", family="Li", role=c("aut","cre", "cph"), email = "[email protected]"),
person(given="Francine", family="Garrett-Bakelman", role="ctb"),
person(family="Akalin", given="Altuna", role="ctb"),
person(family="Zumbo", given="Paul", role="ctb"),
person(family="Melnick", given="Ari", role="ctb"),
person(family="Mason", given="Chris", role=c("ctb","ths")))
Maintainer: Sheng Li <[email protected]>
Depends: R (>= 3.2.1)
Depends: R (>= 3.4.0)
Imports: GenomicRanges, IRanges, data.table, mixtools, S4Vectors
License: Artistic-2.0
URL: https://github.com/ShengLi/edmr
Expand All @@ -24,7 +24,7 @@ Collate: 'ACF.R' 'edmr.R' 'eDMR.sub.R' 'get.dist.cutoff.R' 'getDMR.R'
'getPeaks.R' 'helpers.R' 'myDiff.to.mixmdl.R' 'myDiffToDMR.R'
'plotCost.R' 'plotMdl1.R' 'filter.dmr.R' 'annotation.R'
'document_data.R'
Packaged: 2014-04-07 15:24:10 UTC; shl2018
Packaged: 2016-05-01 00:38:10 EST; shl2018
Author: Sheng Li [aut, cre, cph],
Francine Garrett-Bakelman [ctb],
Altuna Akalin [ctb],
Expand All @@ -33,4 +33,4 @@ Author: Sheng Li [aut, cre, cph],
Chris Mason [ctb, ths]
NeedsCompilation: no
Repository: CRAN
Date/Publication: 2014-04-10 09:18:01
Date/Publication: 2016-05-01
4 changes: 2 additions & 2 deletions R/annotation.R
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ plotdmrdistr=function(myDMR, subject){
# countOverlapDMRs
countOverlapDMRs=function(dmr,anno){
x=findOverlaps(dmr,anno)
unique(x@queryHits)
unique(x@from)
}
col.list=c("#E41A1C","#377EB8","#984EA3","#4DAF4A","#FF7F00","#FFFF33", "#A65628", "#8DD3C7" )
#int=lapply(subject, function(x)intersect(myDMR,x))G
Expand All @@ -82,7 +82,7 @@ plotdmrdistr=function(myDMR, subject){
#' @importFrom IRanges values
get.dmr.genes=function(myDMR, subject, id.type="gene.symbol"){
ind=findOverlaps(subject,myDMR)
unique(values(subject)[unique(ind@queryHits), id.type])
unique(values(subject)[unique(ind@to), id.type])
}

#' get hyper-methylated DMRs
Expand Down
2 changes: 1 addition & 1 deletion R/getDMR.R
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ getDMR=function(peaks, allMyDiff, pcutoff=0.1,step=100, DMC.qvalue=0.01, DMC.met
myDiff.gr=GRanges(seqnames=Rle(myDiff$pchr), IRanges(start=as.integer(myDiff$pstart), end=as.integer(myDiff$pend)), strand=myDiff$pstrand, pval=myDiff$ppvalue, padj=myDiff$pqvalue, methDiff=myDiff$pmethdiff)
peaks.gr=GRanges(seqnames=Rle(peaks$rchr), IRanges(start=as.integer(peaks$rstart), end=as.integer(peaks$rend)))
overlap.idx=findOverlaps(myDiff.gr, peaks.gr)
dt.pk.myD=data.table(cbind(peaks[overlap.idx@subjectHits,], myDiff[overlap.idx@queryHits,]))
dt.pk.myD=data.table(cbind(peaks[overlap.idx@to,], myDiff[overlap.idx@from,]))
#print(head(dt.pk.myD))
refine.pk.myD=dt.pk.myD[, list(medianmethdiff=median(pmethdiff),
meanmethdiff=mean(pmethdiff),
Expand Down

0 comments on commit 5f74417

Please sign in to comment.