This is a test version of Biostars. For the public version, visit https://www.biostars.org.
BSmooth.tstat error due to NA

Dear All,

I use bsseq package for WGBS data analysis. After smoothing, I had tried to BSmooth.tstat for computing t-statistics. But BSmooth.tstat gave me following error.

bis.fit.you.tstat <- BSmooth.tstat(data, 
                group1 = c("test", "test", "test") 
                group2 = c("cont", "cont", "cont"), 
                estimate.var = "paired", verbose = T, local.correct = TRUE, mc.cores=1)

    [BSmooth.tstat] preprocessing ... done in 30.6 sec
    [BSmooth.tstat] computing stats within groups ... done in 64.8 sec
    [BSmooth.tstat] computing stats across groups ...  approxfun(xx, yy) : 
      need at least two non-NA values to interpolate

I found that several CpG site methylation has NA. Does anyone know how to remove NA containing row from bisseq object?

Best Regards, Taiki

wgbs bsmooth r bsseq

hello,Taiki I use bsseq package for WGBS data analysis. and i meet the same problem just as you,do you find any solution?would you please give me some advice? i am really need your help. Best wishes xia

1 answer

Hello xia,

My solution may not be good. Since na.omit doesn't work for bsmooth out put file, I converted it to matrix and then use na.omit to remove na containing rows.

best

hello,Taiki,after you give me such advice, i try to converted it to matrix,but i gives me such error message:Error in as.vector(x),There is no way to force this S4 category to become a vector, here is my command:bsseq_data <- as.matrix(bsseq_bsmooth), would you please give me some suggestion? what is your command? best wishes xia

Log in to answer this question.