... | ... |
@@ -1,7 +1,7 @@ |
1 | 1 |
Package: scmeth |
2 | 2 |
Type: Package |
3 | 3 |
Title: Functions to conduct quality control analysis in methylation data |
4 |
-Version: 0.99.22 |
|
4 |
+Version: 0.99.23 |
|
5 | 5 |
Author: Divy Kangeyan <[email protected]> |
6 | 6 |
Maintainer: Divy Kangeyan <[email protected]> |
7 | 7 |
Depends: R (>= 3.5.0) |
... | ... |
@@ -10,6 +10,7 @@ |
10 | 10 |
#'library(BSgenome.Hsapiens.NCBI.GRCh38) |
11 | 11 |
#'directory <- system.file("extdata/bismark_data",package='scmeth') |
12 | 12 |
#'bs <- HDF5Array::loadHDF5SummarizedExperiment(directory) |
13 |
+#'memory.limit(size=300) |
|
13 | 14 |
#'cpgDensity(bs,Hsapiens,1000) |
14 | 15 |
#'@import BSgenome |
15 | 16 |
#'@importFrom bsseq getCoverage |
... | ... |
@@ -23,10 +24,10 @@ cpgDensity <- function(bs,organism,windowLength=1000){ |
23 | 24 |
cov <- bsseq::getCoverage(bs) |
24 | 25 |
gr <- GenomicRanges::granges(bs) |
25 | 26 |
cpg <- Biostrings::DNAString("CG") |
26 |
- cpg_gr <- Biostrings::vmatchPattern(cpg, Hsapiens) |
|
27 |
+ cpg_gr <- Biostrings::vmatchPattern(cpg, organism) |
|
27 | 28 |
cpg_gr <- GenomeInfoDb::keepStandardChromosomes(cpg_gr, pruning.mode= "coarse") |
28 | 29 |
|
29 |
- r_cpg_gr <- GenomicRanges::resize(cpg_gr,width=1000,fix='center') |
|
30 |
+ r_cpg_gr <- GenomicRanges::resize(cpg_gr,width=(windowLength/2),fix='center') |
|
30 | 31 |
cpgd <- GenomicRanges::countOverlaps(gr,r_cpg_gr) |
31 | 32 |
|
32 | 33 |
#cpgd <- Repitools::cpgDensityCalc(gr, organism, window = windowLength) |