Browse code

fixed downsampling error

Divyagash authored on 15/07/2018 18:49:26
Showing 8 changed files

... ...
@@ -28,13 +28,10 @@ importFrom(annotatr,build_annotations)
28 28
 importFrom(annotatr,builtin_genomes)
29 29
 importFrom(annotatr,summarize_annotations)
30 30
 importFrom(bsseq,getCoverage)
31
-importFrom(ggthemes,theme_tufte)
32 31
 importFrom(scales,comma)
33 32
 importFrom(stats,aggregate)
34 33
 importFrom(stats,dbinom)
35
-importFrom(stats,relevel)
36 34
 importFrom(stats,sd)
37 35
 importFrom(utils,read.csv)
38
-importFrom(utils,read.delim)
39 36
 importFrom(utils,read.table)
40 37
 importFrom(viridis,scale_fill_viridis)
... ...
@@ -17,13 +17,5 @@ bsConversionPlot <- function(bs){
17 17
                                     (phenoData$CHH_meth+phenoData$CHH_unmeth+
18 18
                                     phenoData$CHG_meth+phenoData$CHG_unmeth)
19 19
     bscDf <- data.frame(sample=rownames(phenoData),bsc=phenoData$bsconversion)
20
-
21
-    #g <- ggplot2::ggplot(bscDf, ggplot2::aes_string(x="''", y='bsc'))
22
-    #g <- g+ggplot2::geom_boxplot()
23
-    #g <- g+ggplot2::ylim(max(min(bscDf$bsc)-0.02,0),min(max(bscDf$bsc)+0.02,1))
24
-    #g <- g+ggplot2::theme_bw()
25
-    #g <- g+ggplot2::geom_jitter()
26
-    #g <- g+ggplot2::xlab('')+ggplot2::ylab('bisulfite conversion rate')
27
-    #g <- g+ggplot2::ggtitle('Bisulfite conversion rate across samples')
28 20
     return(bscDf)
29 21
 }
... ...
@@ -18,7 +18,7 @@
18 18
 #'@examples
19 19
 #'directory <- system.file("extdata/bismark_data",package='scmeth')
20 20
 #'bs <- HDF5Array::loadHDF5SummarizedExperiment(directory)
21
-#'downsample(bs)
21
+#'scmeth::downsample(bs)
22 22
 #'@importFrom stats dbinom
23 23
 #'@importFrom bsseq getCoverage
24 24
 #'
... ...
@@ -15,7 +15,6 @@
15 15
 #'bs <- HDF5Array::loadHDF5SummarizedExperiment(directory)
16 16
 #'methylationDist(bs)
17 17
 #'@importFrom bsseq getCoverage
18
-#'@importFrom ggthemes theme_tufte
19 18
 #'@export
20 19
 
21 20
 
... ...
@@ -8,8 +8,6 @@
8 8
 #'bs <- HDF5Array::loadHDF5SummarizedExperiment(directory)
9 9
 #'readmetrics(bs)
10 10
 #'@export
11
-#'@importFrom utils read.delim
12
-#'@importFrom stats relevel
13 11
 
14 12
 readmetrics <- function(bs){
15 13
 
... ...
@@ -26,7 +26,6 @@
26 26
 #'outDir <- system.file(package='scmeth')
27 27
 #'report(bs,outDir,Hsapiens,'hg38',mbiasDir=mbiasDirectory,small=TRUE)
28 28
 #'@importFrom scales comma
29
-#'@importFrom scales comma
30 29
 #'@importFrom viridis scale_fill_viridis
31 30
 #'@importFrom HDF5Array loadHDF5SummarizedExperiment
32 31
 #'@import knitr
... ...
@@ -34,5 +34,5 @@ Downsample the CpG coverage matrix for saturation analysis
34 34
 \examples{
35 35
 directory <- system.file("extdata/bismark_data",package='scmeth')
36 36
 bs <- HDF5Array::loadHDF5SummarizedExperiment(directory)
37
-downsample(bs)
37
+scmeth::downsample(bs)
38 38
 }
... ...
@@ -239,7 +239,7 @@ report renders this information into a plot. Downsampling rate ranges from
239 239
 </p>
240 240
 
241 241
 ```{r,warning=FALSE}
242
-#DT::datatable(downsample(bsObject))
242
+DT::datatable(scmeth::downsample(bsObject))
243 243
 ```
244 244
 
245 245