Question: Error with dmrfinder bsseq after combining Bsseq obj
gravatar for br
10 months ago by
br0 wrote:

Dear all,

I have a problem occurring using the command dmrfinder
> dmrs0 <- dmrFinder(bsseqbismark_smooth_chrI_location3_5_tstat, cutoff = c(-4.6, 4.6))
Error in dmrFinder(bsseqbismark_smooth_chrI_location3_5_tstat, cutoff = c(-4.6, : 'stat' needs to be a column of 'bstat@stats'
I checked the
> colnames(bsseqbismark_smooth_chrI_location3_5_tstat@stats)
[1] "rawSds" "" "group2.means" "group1.means" "tstat"

this is the same as in your example cancer data set, except the
> colnames(BS.cancer.ex.tstat@stats)
[1] "rawSds" "" "group2.means" "group1.means" "tstat" [6] "tstat.corrected"

My object is
An object of type 'BSseqTstat' with 50684 methylation loci based on smoothed data: BSmooth (ns = 70, h = 1000, maxGap = 100000000) with parameters BSmooth.tstat (local.correct = FALSE, maxGap = 100000000) 'stats' slot is in-memory

The difference I find to your example data is that I have also:
> class(bsseqbismark_smooth_chrI_location3_5_tstat@stats)
[1] "DelayedMatrix" attr(,"package") [1] "DelayedArray"

and you have

> class(BS.cancer.ex.tstat@stats)
[1] "matrix"
Do you know what is happening? Can I provide you with more information? Should I prevent to get a Delayed Array? Does this come from how I subsetted my data to the type 3 and 5?

bsseqbismark_smooth_chrI_location3_5 <- (bsseqbismark_smooth_chrI[, which(bsseqbismark_smooth_chrI$Type %in% c(3,5))])


Thanks  a lot!! 



R version 3.4.0 (2017-04-21)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 16.04.2 LTS

Matrix products: default
BLAS: /usr/lib/libblas/
LAPACK: /usr/lib/lapack/

 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8    LC_PAPER=en_US.UTF-8       LC_NAME=C                 

attached base packages:
[1] stats4    parallel  stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] bsseqData_0.14.0           bsseq_1.12.1               SummarizedExperiment_1.6.3 DelayedArray_0.2.7        
 [5] matrixStats_0.52.2         Biobase_2.36.2             GenomicRanges_1.28.3       GenomeInfoDb_1.12.2       
 [9] IRanges_2.10.2             S4Vectors_0.14.3           BiocGenerics_0.22.0       

loaded via a namespace (and not attached):
 [1] Rcpp_0.12.11            XVector_0.16.0          zlibbioc_1.22.0         munsell_0.4.3           colorspace_1.3-2       
 [6] lattice_0.20-35         plyr_1.8.4              tools_3.4.0             grid_3.4.0              data.table_1.10.4      
[11] R.oo_1.21.0             gtools_3.5.0            permute_0.9-4           Matrix_1.2-10           GenomeInfoDbData_0.99.0
[16] R.utils_2.5.0           bitops_1.0-6            RCurl_1.95-4.8          limma_3.32.2            compiler_3.4.0         
[21] R.methodsS3_1.7.1       scales_0.4.1            locfit_1.5-9.1    ```


ADD COMMENTlink written 10 months ago by br0

I found the answer myself, I have to change the statistics settings as I set local.correct = FALSE before. I did this choice as I read somewhere this might be better for RRBS data. 

dmrs0 <- dmrFinder(obj.tstat, cutoff = c(-4.6, 4.6),stat = "tstat")

Thanks anyways! :)



ADD REPLYlink written 10 months ago by br0
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.2.0
Traffic: 174 users visited in the last hour