Browse code

removed DelayedArray Colsums temporarily since it requires R 3.4.0. First check whether the package compiles with travis and then add the DelayedArray back.

Divyagash authored on 20/07/2017 04:19:51
Showing 5 changed files

... ...
@@ -15,7 +15,6 @@ Imports:
15 15
   stats,
16 16
   utils,
17 17
   BSgenome,
18
-  DelayedArray
19 18
 Suggests:
20 19
   rmarkdown,
21 20
   BSgenome.Mmusculus.UCSC.mm10,
... ...
@@ -7,10 +7,10 @@
7 7
 #'load(system.file("extdata",'bsObject.rda',package='scmeth'))
8 8
 #'coverage(bs)
9 9
 #'@export
10
-#'@importFrom DelayedArray colSums
10
+
11 11
 
12 12
 coverage <- function(bs) {
13 13
     covMatrix<-bsseq::getCoverage(bs)
14
-    covVec<- DelayedArray::colSums(covMatrix>0,na.rm=TRUE)
14
+    covVec<- colSums(covMatrix>0,na.rm=TRUE)
15 15
     return(covVec)
16 16
 }
... ...
@@ -10,7 +10,7 @@
10 10
 #'cpgDensity(bs,Mmusculus,1000)
11 11
 #'@import BSgenome
12 12
 #'@export
13
-#'@importFrom DelayedArray colSums
13
+
14 14
 
15 15
 
16 16
 cpgDensity<-function(bs,organism,windowLength=1000){
... ...
@@ -22,7 +22,7 @@ cpgDensity<-function(bs,organism,windowLength=1000){
22 22
     }else{
23 23
         cpgdBin<-cut(cpgd,c(seq(0,20),max(cpgd)))
24 24
     }
25
-    cpgdCov <- by(cov>0, cpgdBin, DelayedArray::colSums)
25
+    cpgdCov <- by(cov>0, cpgdBin, colSums)
26 26
     cpgdCov <- do.call("rbind", cpgdCov)
27 27
     return(cpgdCov)
28 28
 }
... ...
@@ -16,7 +16,7 @@
16 16
 #'load(system.file("extdata",'bsObject.rda',package='scmeth'))
17 17
 #'cpgDiscretization(bs)
18 18
 #'@export
19
-#'@importFrom DelayedArray colSums
19
+
20 20
 
21 21
 cpgDiscretization<-function(bs){
22 22
     covMatrix<-as.matrix(bsseq::getCoverage(bs))
... ...
@@ -25,7 +25,7 @@ cpgDiscretization<-function(bs){
25 25
     tempMethylationMatrix<-methMatrix
26 26
     methMatrix[methMatrix<=0.2]<-0
27 27
     methMatrix[methMatrix>=0.8]<-1
28
-    removedCpGs<-DelayedArray::colSums(methMatrix>0.2 & methMatrix<0.8, na.rm=TRUE)
28
+    removedCpGs<-colSums(methMatrix>0.2 & methMatrix<0.8, na.rm=TRUE)
29 29
     removedCpGFrac<-(removedCpGs/(scmeth::coverage(bs)))*100
30 30
     returnList<-list('meth' = methMatrix, 'discard' = removedCpGs,
31 31
                    'discard-perc' = removedCpGFrac)
... ...
@@ -11,7 +11,7 @@
11 11
 #'load(system.file("extdata",'bsObject.rda',package='scmeth'))
12 12
 #'repMask(bs,Mmusculus,'mm10')
13 13
 #'@export
14
-#'@importFrom DelayedArray colSums
14
+
15 15
 
16 16
 repMask<-function(bs,organism,genome){
17 17
     hub <- AnnotationHub::AnnotationHub()
... ...
@@ -19,6 +19,6 @@ repMask<-function(bs,organism,genome){
19 19
                        c("rmsk", GenomeInfoDb::organism(organism), genome)))]]
20 20
     rep <- GenomicRanges::countOverlaps(bs, repeatGr)>0
21 21
     cov<-bsseq::getCoverage(bs)
22
-    covDf <- data.frame(coveredCpgs=DelayedArray::colSums(cov[!rep,]>=1))
22
+    covDf <- data.frame(coveredCpgs=colSums(cov[!rep,]>=1))
23 23
     return(covDf)
24 24
 }