From 23db8ee09742b52d39db80926bb4011b789a68cb Mon Sep 17 00:00:00 2001 From: Zhongji SHEN Date: Sun, 12 Jun 2016 19:07:07 +0800 Subject: [PATCH 1/5] Update DESCRIPTION --- DESCRIPTION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index d98f204..f88ba28 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -15,7 +15,7 @@ Authors@R: c(person(given="Sheng", family="Li", role=c("aut","cre", "cph"), emai person(family="Melnick", given="Ari", role="ctb"), person(family="Mason", given="Chris", role=c("ctb","ths"))) Maintainer: Sheng Li -Depends: R (>= 3.4.0) +Depends: R (>= 3.3.0) Imports: GenomicRanges, IRanges, data.table, mixtools, S4Vectors License: Artistic-2.0 URL: https://github.com/ShengLi/edmr From 3fb1a39aec8dc8da2796a3ebb964da5a79bf40de Mon Sep 17 00:00:00 2001 From: Zhongji SHEN Date: Mon, 13 Jun 2016 16:29:26 +0800 Subject: [PATCH 2/5] Update getDMR.R Fix bug: varname error due to GenomicRanges update --- R/getDMR.R | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/R/getDMR.R b/R/getDMR.R index 8597ee8..b73fd6c 100644 --- a/R/getDMR.R +++ b/R/getDMR.R @@ -42,7 +42,8 @@ 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@to,], myDiff[overlap.idx@from,])) + #dt.pk.myD=data.table(cbind(peaks[overlap.idx@to,], myDiff[overlap.idx@from,])) + dt.pk.myD=data.table(cbind(peaks[overlap.idx@subjectHits,], myDiff[overlap.idx@queryHits,])) #print(head(dt.pk.myD)) refine.pk.myD=dt.pk.myD[, list(medianmethdiff=median(pmethdiff), meanmethdiff=mean(pmethdiff), From fbc48f9b4567001f6b28fb9e6767645e1a019781 Mon Sep 17 00:00:00 2001 From: Zhongji SHEN Date: Mon, 13 Jun 2016 16:30:15 +0800 Subject: [PATCH 3/5] Update DESCRIPTION try older R version dependence --- DESCRIPTION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index f88ba28..5e1be5b 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -15,7 +15,7 @@ Authors@R: c(person(given="Sheng", family="Li", role=c("aut","cre", "cph"), emai person(family="Melnick", given="Ari", role="ctb"), person(family="Mason", given="Chris", role=c("ctb","ths"))) Maintainer: Sheng Li -Depends: R (>= 3.3.0) +Depends: R (>= 3.2.0) Imports: GenomicRanges, IRanges, data.table, mixtools, S4Vectors License: Artistic-2.0 URL: https://github.com/ShengLi/edmr From 428256e623d89f70463ed304a1036771dfda1ab6 Mon Sep 17 00:00:00 2001 From: Zhongji SHEN Date: Mon, 13 Jun 2016 16:33:22 +0800 Subject: [PATCH 4/5] Update README.md Fix `install_github` syntax for updated version --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9f3db87..c7bcd06 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ source("http://bioconductor.org/biocLite.R") biocLite(c("GenomicRanges","IRanges")) # install from github library(devtools) -install_github("edmr", username = "ShengLi",build_vignettes=FALSE) +install_github("ShengLi/edmr", build_vignettes=FALSE) ``` Usage From 6594abb59dd5c95efc854e8e5a1a871f02127697 Mon Sep 17 00:00:00 2001 From: Zhongji SHEN Date: Tue, 14 Jun 2016 11:48:55 +0800 Subject: [PATCH 5/5] Update annotation.R Fix bug: varname error due to GenomicRanges update --- R/annotation.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/R/annotation.R b/R/annotation.R index 5b67ac0..4d66b42 100644 --- a/R/annotation.R +++ b/R/annotation.R @@ -58,7 +58,7 @@ plotdmrdistr=function(myDMR, subject){ # countOverlapDMRs countOverlapDMRs=function(dmr,anno){ x=findOverlaps(dmr,anno) - unique(x@from) + unique(x@queryHits) } col.list=c("#E41A1C","#377EB8","#984EA3","#4DAF4A","#FF7F00","#FFFF33", "#A65628", "#8DD3C7" ) #int=lapply(subject, function(x)intersect(myDMR,x))G @@ -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@to), id.type]) + unique(values(subject)[unique(ind@subjectHits), id.type]) } #' get hyper-methylated DMRs