Code Monkey home page Code Monkey logo

dmrcaller's People

Contributors

dtenenba avatar hpages avatar link-ny avatar nrzabet avatar sonali-bioc avatar vobencha avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

dmrcaller's Issues

All scheduled cores encountered errors

Hi,

I'm doing whole genome DMR analysis with two replicates and two conditions. Given that I'd like to run the analysis for all contexts and repeat everything with a similar detaset, I created an Rscript to run on our server and exploit parallelization. My script looks as follows (I omitted command line arguments and library loading):

# Read all the files
methylationDataP <- readBismarkPool(c(file_1, file_2))
methylationDataK <- readBismarkPool(c(file_3, file_4))
methylationDataList <- GRangesList("P" = methylationDataP, "K" = methylationDataK)
# Condition vector
condition <- c("a", "b")
# Merge datasets as required by DMR caller
methylationData_tot <- joinReplicates(methylationDataList[["P"]], methylationDataList[["K"]])
#CG DMRs
DMRsReplicatesBinsCG <- computeDMRsReplicates(methylationData = methylationData_tot,
condition = condition,
regions = NULL,
context = "CG",
method = "neighbourhood",
binSize = 100,
test = "betareg",
pseudocountM = 1,
pseudocountN = 2,
pValueThreshold = 0.01,
minCytosinesCount = 4,
minProportionDifference = 0.4,
minGap = 0,
minSize = 50,
minReadsPerCytosine = 4,
cores = 8)

The output I get is the following:

Reading file: /path/to/file1.txt
Read 60158068 records
Finished reading file: /path/to/file1.txt
Reading file: /path/to/file2.txt
Read 60158068 records
Finished reading file: /path/to/file2.txt
joining two datasets ...
the sum was performed ...
Reading file: /path/to/file3.txt
Read 115171330 records
Finished reading file: /path/to/file3.txt
Reading file: /path/to/file4.txt
Read 115171330 records
Finished reading file: /path/to/file4.txt
joining two datasets ...
the sum was performed ...
Validating objects
Finding overlaps
Joining objects
Warning message:
In joinReplicates(methylationDataList[["P"]], methylationDataList[["K"]]) :
The number of elements in each dataset is different,
non replicated data will be dropped
Parameters checking ...
Extract methylation in the corresponding context
Compute the DMRs using 8 cores
Computing DMRs
Computing DMRs
Computing DMRs
Computing DMRs
Computing DMRs
Computing DMRs
Computing DMRs
Computing DMRs
Error in (function (...) : all elements in '...' must be GRanges objects
Calls: computeDMRsReplicates ... as -> asMethod -> do.call -> do.call -> <Anonymous>
In addition: Warning message:
In parallel::mclapply(1:length(regionsList), .computeDMPsReplicatesNeighbourhoodLoop, :
all scheduled cores encountered errors in user code
Execution halted

Any idea of what could be the reason of this error? The input files I'm using are Bismark CX files and the files from one condition are covering only half of the genome, so the dropped non-replicated data is expected. If you need more information about my system, let me know.

Best,
Stefan

DMRcaller: R crashing

Hello,
I am using DMRcaller for genome wide DNA methylation. However, it always crashes while using the "computeDMRs" function. Kindly help.

`> methylationDataWT <- readBismark("M82_0h_CHH_cyto.CX_report.txt")
Reading file: M82_0h_CHH_cyto.CX_report.txt
Read 268714657 records
Finished reading file: M82_0h_CHH_cyto.CX_report.txt

DMRsBinsCHH <- computeDMRs(methylationDataList[["M82"]],
methylationDataList[["clf"]],
regions = NULL,
context = "CHH",
method = "bins",
binSize = 500,
test = "score",
pValueThreshold = 0.05,
minCytosinesCount = 4,minProportionDifference = 0.4,minGap = 200,minSize = 50,minReadsPerCytosine = 4,cores=8)
Parameters checking ...
Error in .stopIfNotAll(c(!is.null(methylationData), is(methylationData, :
object 'methylationDataList' not found
methylationDataMut <- readBismark("clf_0h_CHH_cyto.CX_report.txt")
Reading file: clf_0h_CHH_cyto.CX_report.txt
Read 268714657 records
Finished reading file: clf_0h_CHH_cyto.CX_report.txt
methylationDataList <- GRangesList("M82" = methylationDataWT,"clf" = methylationDataMut)
DMRsBinsCHH <- computeDMRs(methylationDataList[["M82"]],
methylationDataList[["clf"]],
regions = NULL,
context = "CHH",
method = "bins",
binSize = 500,
test = "score",
pValueThreshold = 0.05,
minCytosinesCount = 4,minProportionDifference = 0.4,minGap = 200,minSize = 50,minReadsPerCytosine = 4,cores=8)
Parameters checking ...
[2]+ Killed R
Killed`

Error analysing multiple samples

Hello,

How can I use this package when I have more than 1 sample per condition? When I read with readBismark my samples, the GRanges object is created correctly but when I tried to compute DMRs I get the following error:

Parameters checking ...
Error in compared[keep] <- current[keep] :
  NAs are not allowed in subscripted assignments
More: Warning message:
In Ops.factor(x, y) : ‘-’ not meaningful for factors

I've tried the code I pasted down below. How could I solve it?

Thank you! :)

#Group A
A_1 <- readBismark("A_file.txt")
A_2 <- readBismark("A_file2.txt")
#Group B
B_1 <- readBismark("B_file.txt")
B_2 <- readBismark("B_file2.txt")

methylationDataList <- GRangesList("control" = c(A_1,A_2), "case" = c(B_1,B_2)

#set genomic coordinates where to compute DMRs
regions<-GRanges(seqnames = Rle("chr19"), ranges = IRanges(220000,240000))
# compute the DMRs in CG context with noise_filter method
DMRsNoiseFilterCG <- computeDMRs(methylationDataList[["control"]],
                     methylationDataList[["diabetes"]], regions = regions,
                     context = "CG", method = "noise_filter",
                     windowSize = 100, kernelFunction = "triangular",
                     test = "score", pValueThreshold = 0.01,
                     minCytosinesCount = 4, minProportionDifference = 0.4,
                     minGap = 200, minSize = 50, minReadsPerCytosine = 4,
                     cores = 8)

Error running computeDMRsReplicates

Hi I'm trying to run DMRcaller with replicates:

DMRsReplicatesBinsCG <- computeDMRsReplicates(methylationData = methylationDataList, condition = condition, regions = NULL, context = "CG", method = "bins", binSize = 100, test = "betareg", pseudocountM = 1, pseudocountN = 2, pValueThreshold = 0.01, minCytosinesCount = 4, minProportionDifference = 0.1, minGap = 0, minSize = 50, minReadsPerCytosine = 4, cores = 8)

It seems to run okay to begin with but then exists with the error below, and I was wondering if anyone had encountered it before.

Parameters checking ...
Extract methylation in the corresponding context
Compute the DMRs using 8 cores
Computing DMRs at 1:10004..26307582
Computing DMRs at 1:26307583..52605161
Computing DMRs at 1:52605162..78902740
Computing DMRs at 1:78902741..105200319
Computing DMRs at 1:105200320..131497898
Count inside each bin...
Computing DMRs at 1:131497899..157795477
Count inside each bin...
Count inside each bin...
Computing DMRs at 1:157795478..184093056
Count inside each bin...
Computing DMRs at 1:184093057..210390635
Count inside each bin...
Count inside each bin...
Count inside each bin...
Count inside each bin...
Filter the bins...
Identifying DMRs...
Filter the bins...
Filter the bins...
Identifying DMRs...
Identifying DMRs...
Filter the bins...
Identifying DMRs...
Filter the bins...
Identifying DMRs...
Filter the bins...
Filter the bins...
Identifying DMRs...
Identifying DMRs...
Filter the bins...
Identifying DMRs...
Merge adjacent DMRs
Merge DMRs iteratively
Filter DMRs
Warning messages:
1: In betareg.fit(X, Y, Z, weights, offset, link, link.phi, type, control) :
optimization failed to converge
2: In betareg.fit(X, Y, Z, weights, offset, link, link.phi, type, control) :
optimization failed to converge
Recompute regions...
Computing low resolution profiles...
Calculating methylation profile for 1:10004..210390635 using a window of 10000 bp
Error in S4Vectors:::normalize_names_replacement_value(value, x) :
attempt to set too many names (6) on PartitioningByEnd object of length
1
Calls: plotMethylationProfileFromData ... names<- -> names<- -> names<- -> names<- ->
Execution halted

sessionInfo()
R version 3.5.2 (2018-12-20)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 18.04.2 LTS

Matrix products: default
BLAS: /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.7.1
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.7.1

locale:
[1] LC_CTYPE=en_GB.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_GB.UTF-8 LC_COLLATE=en_GB.UTF-8
[5] LC_MONETARY=en_GB.UTF-8 LC_MESSAGES=en_GB.UTF-8
[7] LC_PAPER=en_GB.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_GB.UTF-8 LC_IDENTIFICATION=C

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

other attached packages:
[1] DMRcaller_1.14.2 GenomicRanges_1.34.0 GenomeInfoDb_1.18.2
[4] IRanges_2.16.0 S4Vectors_0.20.1 BiocGenerics_0.28.0

loaded via a namespace (and not attached):
[1] Rcpp_1.0.1 lattice_0.20-38 RcppRoll_0.3.0
[4] zoo_1.8-5 lmtest_0.9-36 bitops_1.0-6
[7] grid_3.5.2 zlibbioc_1.28.0 XVector_0.22.0
[10] flexmix_2.3-15 betareg_3.1-1 sandwich_2.5-0
[13] Formula_1.2-3 RCurl_1.95-4.12 compiler_3.5.2
[16] nnet_7.3-12 modeltools_0.2-22 GenomeInfoDbData_1.2.0

Error in computeDMR function in HPC

I am running DMRcaller in R/4.1.0 on a cluster. I am using -CX reports from bismark as inputs. Each file is around ~10gb. First, I am using readBismarkPool function to pool data for different replicates. Then I am using computeDMR function with default settings for the neighborhood method,but I am getting an error after Merge DMRs iteratively:

Error in FUN(X[[i]], ...) : no method or default for coercing “NULL” to “GRanges” Calls: computeDMRs ... .computeDMRsNeighbourhood -> .smartMergeDMRs -> unlist -> GRangesList

Please let me know how can I resolve it. Thanks in advance

con= readBismarkPool(c("COS1.txt","COS3.txt","COS4.txt","COS5.txt","COS7.txt"))
Reading file: COS1.txt
Read 287459178 records
Finished reading file: COS1.txt
Reading file: COS3.txt
Read 287459178 records
Finished reading file: COS3.txt
Reading file: COS4.txt
Read 287459178 records
Finished reading file: COS4.txt
Reading file: COS5.txt
Read 287459178 records
Finished reading file: COS5.txt
Reading file: COS7.txt
Read 287459178 records
Finished reading file: COS7.txt
joining two datasets ...
the sum was performed ...
joining two datasets ...
the sum was performed ...
joining two datasets ...
the sum was performed ...
joining two datasets ...
the sum was performed ...
tri=readBismarkPool(c("TRIS1.txt","TRIS2.txt","TRIS4.txt","TRIS6.txt"))
Reading file: TRIS1.txt
Read 287459178 records
Finished reading file: TRIS1.txt
Reading file: TRIS2.txt
Read 287459178 records
Finished reading file: TRIS2.txt
Reading file: TRIS4.txt
Read 287459178 records
Finished reading file: TRIS4.txt
Reading file: TRIS6.txt
Read 287459178 records
Finished reading file: TRIS6.txt
joining two datasets ...
the sum was performed ...
joining two datasets ...
the sum was performed ...
joining two datasets ...
the sum was performed ...
dmrCG <- computeDMRs(con,tri,method = "neighbourhood",cores = 60) Parameters checking ... Extract methylation in the corresponding context Computing DMRs Merge DMRs iteratively Error in FUN(X[[i]], ...) : no method or default for coercing “NULL” to “GRanges” Calls: computeDMRs ... .computeDMRsNeighbourhood -> .smartMergeDMRs -> unlist -> GRangesList In addition: Warning message: In parallel::mclapply(1:length(DMRsList), function(i) { : scheduled cores 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 50, 58, 59, 60 did not deliver results, all values of the jobs will be affected Execution halted

iteratively error

Yes, thanks. It worked like a charm. Here my code for other interested people:

# ind is the number of replicates -1
    methylationDataRep<-joinReplicates(methylationData[[1]], methylationData[[2]]) 
  for (h in 2:ind) { 
    methylationDataRep<-joinReplicates(methylationDataRep, methylationData[[h+1]])
  }

Originally posted by @fbalao in #4 (comment)

It's error

DataRep<-joinReplicates(methylationDataList[[1]], methylationDataList[[2]])
for (h in 2:3) {DataRep<-joinReplicates(DataRep, methylationDataList[[h+1]])}
Validating objects
Finding overlaps
Joining objects
Error in DataFrame(..., check.names = FALSE) :
different row counts implied by arguments
In addition: Warning message:
In joinReplicates(DataRep, methylationDataList[[h + 1]]) :
The number of elements in each dataset is different,
non replicated data will be dropped

Can not compute DMR using computeDMRs function

Hello, I am trying to compute DMR using the neighborhood method, but I am not able to do it.

Below is the R code:

chr_local <- GRanges(seqnames = Rle("Chr3"), ranges = IRanges(5E5,6E5))
DMRsNeighbourhoodCG <- computeDMRs(methylationDataList[["Control"]],
methylationDataList[["Treated"]],
regions = chr_local,
context = "CG",
method = "neighbourhood",
test = "score",
pValueThreshold = 0.01,
minCytosinesCount = 4,
minProportionDifference = 0.4,
minGap = 200,
minSize = 1,minReadsPerCytosine = 4,
cores = 1)

Output:
Parameters checking ...
Extract methylation in the corresponding context
Computing DMRs

DMRsNeighbourhoodCG
GRanges object with 0 ranges and 0 metadata columns:
seqnames ranges strand


seqinfo: no sequences

I do not know what does it mean, all the input files are the CX_report.txt from bismark.

Can anyone tell, me what's wrong with my code

Thanks in advance

Error in FUN(X[[i]], ...) : no method or default for coercing “try-error” to “GRanges”

So far I have computed DMRs in the context "CG", but when I change the context to "CHG" there is an error. Please help me.

This works fine:

DMRs_bins_replicates_Scaffold_1531_CpG <- computeDMRsReplicates(metAllData, condition = condition, regions = Scaffold_1531,
context = "CG", method = "bins", binSize = 100, test = "betareg",
pseudocountM = 1, pseudocountN = 2, pValueThreshold = 0.05,
minCytosinesCount = 4, minProportionDifference = 0.15, minGap = 200, minSize = 50,
minReadsPerCytosine = 4, cores = 50)

but this (change from "CG" to "CHG"):

DMRs_bins_replicates_Scaffold_1531_CHG <- computeDMRsReplicates(metAllData, condition = condition, regions = Scaffold_1531,
context = "CHG", method = "bins", binSize = 100, test = "betareg",
pseudocountM = 1, pseudocountN = 2, pValueThreshold = 0.05,
minCytosinesCount = 4, minProportionDifference = 0.15, minGap = 200, minSize = 50,
minReadsPerCytosine = 4, cores = 50)

returns this:

Parameters checking ...
Extract methylation in the corresponding context
Compute the DMRs using 50 cores
Computing DMRs at Scaffold_1531:1..9529912
Count inside each bin...
Computing DMRs at Scaffold_1531:9529913..19059825
Count inside each bin...
Computing DMRs at Scaffold_1531:19059826..28589738
Count inside each bin...
Computing DMRs at Scaffold_1531:28589739..38119651
Count inside each bin...
Computing DMRs at Scaffold_1531:38119652..47649564
Count inside each bin...
Computing DMRs at Scaffold_1531:47649565..57179477
Count inside each bin...
Filter the bins...
Computing DMRs at Scaffold_1531:57179478..66709390
Count inside each bin...
Computing DMRs at Scaffold_1531:66709391..76239303
Filter the bins...
Filter the bins...
Count inside each bin...
Computing DMRs at Scaffold_1531:76239304..85769215
Count inside each bin...
Computing DMRs at Scaffold_1531:85769216..95299128
Filter the bins...
Filter the bins...
Count inside each bin...
Computing DMRs at Scaffold_1531:95299129..104829041
Filter the bins...
Count inside each bin...
Computing DMRs at Scaffold_1531:104829042..114358954
Filter the bins...
Count inside each bin...
Computing DMRs at Scaffold_1531:114358955..123888867
Filter the bins...
Count inside each bin...
Computing DMRs at Scaffold_1531:123888868..133418780
Count inside each bin...
Filter the bins...
Computing DMRs at Scaffold_1531:133418781..142948693
Count inside each bin...
Computing DMRs at Scaffold_1531:142948694..152478606
Filter the bins...
Count inside each bin...
Filter the bins...
Computing DMRs at Scaffold_1531:152478607..162008518
Filter the bins...
Count inside each bin...
Computing DMRs at Scaffold_1531:162008519..171538431
Filter the bins...
Identifying DMRs...
Count inside each bin...
Computing DMRs at Scaffold_1531:171538432..181068344
Filter the bins...
Count inside each bin...
Computing DMRs at Scaffold_1531:181068345..190598257
Filter the bins...
Count inside each bin...
Computing DMRs at Scaffold_1531:190598258..200128170
Count inside each bin...
Filter the bins...
Computing DMRs at Scaffold_1531:200128171..209658083
Count inside each bin...
Filter the bins...
Computing DMRs at Scaffold_1531:209658084..219187996
Filter the bins...
Count inside each bin...
Computing DMRs at Scaffold_1531:219187997..228717909
Count inside each bin...
Filter the bins...
Computing DMRs at Scaffold_1531:228717910..238247822
Filter the bins...
Count inside each bin...
Computing DMRs at Scaffold_1531:238247823..247777734
Count inside each bin...
Filter the bins...
Computing DMRs at Scaffold_1531:247777735..257307647
Filter the bins...
Count inside each bin...
Computing DMRs at Scaffold_1531:257307648..266837560
Count inside each bin...
Filter the bins...
Computing DMRs at Scaffold_1531:266837561..276367473
Filter the bins...
Count inside each bin...
Computing DMRs at Scaffold_1531:276367474..285897386
Count inside each bin...
Filter the bins...
Computing DMRs at Scaffold_1531:285897387..295427299
Count inside each bin...
Filter the bins...
Computing DMRs at Scaffold_1531:295427300..304957212
Filter the bins...
Count inside each bin...
Computing DMRs at Scaffold_1531:304957213..314487125
Count inside each bin...
Filter the bins...
Computing DMRs at Scaffold_1531:314487126..324017037
Filter the bins...
Count inside each bin...
Computing DMRs at Scaffold_1531:324017038..333546950
Filter the bins...
Count inside each bin...
Computing DMRs at Scaffold_1531:333546951..343076863
Filter the bins...
Count inside each bin...
Computing DMRs at Scaffold_1531:343076864..352606776
Filter the bins...
Count inside each bin...
Computing DMRs at Scaffold_1531:352606777..362136689
Filter the bins...
Count inside each bin...
Computing DMRs at Scaffold_1531:362136690..371666602
Filter the bins...
Count inside each bin...
Computing DMRs at Scaffold_1531:371666603..381196515
Filter the bins...
Count inside each bin...
Computing DMRs at Scaffold_1531:381196516..390726428
Filter the bins...
Count inside each bin...
Computing DMRs at Scaffold_1531:390726429..400256340
Count inside each bin...
Filter the bins...
Computing DMRs at Scaffold_1531:400256341..409786253
Filter the bins...
Count inside each bin...
Computing DMRs at Scaffold_1531:409786254..419316166
Filter the bins...
Count inside each bin...
Computing DMRs at Scaffold_1531:419316167..428846079
Filter the bins...
Count inside each bin...
Computing DMRs at Scaffold_1531:428846080..438375992
Filter the bins...
Count inside each bin...
Computing DMRs at Scaffold_1531:438375993..447905905
Filter the bins...
Count inside each bin...
Computing DMRs at Scaffold_1531:447905906..457435818
Count inside each bin...
Filter the bins...
Computing DMRs at Scaffold_1531:457435819..466965731
Filter the bins...
Count inside each bin...
Computing DMRs at Scaffold_1531:466965732..476495644
Filter the bins...
Count inside each bin...
Filter the bins...
Filter the bins...
Filter the bins...
Filter the bins...
Filter the bins...
Error in FUN(X[[i]], ...) :
no method or default for coercing “try-error” to “GRanges”
Calls: computeDMRsReplicates ... .computeDMRsReplicatesBins -> unlist -> GRangesList
In addition: Warning message:
In parallel::mclapply(1:length(regionsList), .computeDMRsReplicatesBinsLoop, :
scheduled core 13 encountered error in user code, all values of the job will be affected
Execution halted

computeDMRsReplicates in a 2x2 ANOVA fashion

Dear Radu,
I'm interested in running computeDMRsReplicates with a 2x2 ANOVA design. I checked the code and you used betareg function which seems quite flexible. I can try to do it. Could you help me?
Fran

Error for genome wide CHH DMRs

Hi,

I'm running a genome wide DMR analysis for CHH with computeDMRsReplicates as follows :

DMRsReplicatesBinsCHH <- computeDMRsReplicates(methylationData = methylationDataList,
                                            condition = condition,
                                            regions = NULL,
                                            context = "CHH",
                                            method = "bins",
                                            binSize = 100,
                                            test = "betareg",
                                            pseudocountM = 1,
                                            pseudocountN = 2,
                                            pValueThreshold = 0.05,
                                            minCytosinesCount = 1,
                                            minProportionDifference = 0.1,
                                            minGap = 200,
                                            minSize = 50,
                                            minReadsPerCytosine = 3,
                                            cores = 8)

This is the output I get at first:

Reading file: /path/to/file1.txt
Finished reading file: /path/to/file1.txt
Reading file: /path/to/file2.txt
Finished reading file: /path/to/file2.txt
Reading file: /path/to/file3.txt
Finished reading file: /path/to/file3.txt
Reading file: /path/to/file4.txt
Finished reading file: /path/to/file4.txt
Validating objects 
Finding overlaps 
Joining objects 
Validating objects 
Finding overlaps 
Joining objects 
Validating objects 
Finding overlaps 
Joining objects 
Parameters checking ...
Extract methylation in the corresponding context 
Compute the DMRs using  8 cores
Computing DMRs at  scaffold_2240:3..6771232 
Computing DMRs at  scaffold_2449:37890..101038 
Computing DMRs at  scaffold_2658:11660..15546 
Computing DMRs at  scaffold_2868:928..7400 
Computing DMRs at  scaffold_3077:2146..4290 
Count inside each bin...
Computing DMRs at  scaffold_3286:2207..2520 
Computing DMRs at  scaffold_3496:451..1793 
Count inside each bin...
Filter the bins...
Identifying DMRs...
Computing DMRs at  scaffold_3705:844..1349 
Count inside each bin...
Filter the bins...
Identifying DMRs...
Count inside each bin...
Filter the bins...
Identifying DMRs...
Count inside each bin...
Count inside each bin...
Filter the bins...
Filter the bins...
Identifying DMRs...
Computing DMRs at  scaffold_3287:7..2523 

So it looks like it's running fine but then I get an error. Withtraceback():

Computing DMRs at  scaffold_3496:4..450 
Count inside each bin...
Filter the bins...
11: (function () 
    traceback(2))()
10: stop("all elements in '...' must be GRanges objects")
9: (function (...) 
   {
       listData <- list(...)
       if (length(listData) == 1L && !is(listData[[1L]], "GRanges")) 
           return(as(listData[[1L]], "CompressedGRangesList", strict = FALSE))
       if (length(listData) == 0L) {
           unlistData <- GRanges()
       }
       else {
           if (!all(sapply(listData, is, "GRanges"))) 
               stop("all elements in '...' must be GRanges objects")
           unlistData <- suppressWarnings(do.call("c", unname(listData)))
       }
       relist(unlistData, listData)
   })("Error in FUN(X[[i]], ...) : object 'DMRs' not found\n", "Error in FUN(X[[i]], ...) : object 'DMRs' not found\n", 
       "Error in FUN(X[[i]], ...) : object 'DMRs' not found\n", 
       "Error in FUN(X[[i]], ...) : object 'DMRs' not found\n", 
       "Error in FUN(X[[i]], ...) : object 'DMRs' not found\n", 
       new("GRanges", seqnames = new("Rle", values = integer(0), 
           lengths = integer(0), elementMetadata = NULL, metadata = list()), 
           ranges = new("IRanges", start = integer(0), width = integer(0), 
               NAMES = NULL, elementType = "ANY", elementMetadata = NULL, 
               metadata = list()), strand = new("Rle", values = integer(0), 
               lengths = integer(0), elementMetadata = NULL, metadata = list()), 
           seqinfo = new("Seqinfo", seqnames = c("scaffold_2240", 
           "scaffold_2241", "scaffold_2242", "scaffold_2243", "scaffold_2244", 
           this list goes on for a while), seqlengths = c(NA_integer_, 
           NA_integer_, NA_integer_, NA_integer_, NA_integer_, NA_integer_, 
           this list goes on for a while), 
               is_circular = c(NA, NA, NA, NA, NA, NA, NA, NA, NA, 
               this list goes on for a while), genome = c(NA_character_, NA_character_, 
               NA_character_, NA_character_, NA_character_, NA_character_, 
               this list goes on for a while)), elementMetadata = new("DataFrame", 
               rownames = NULL, nrows = 0L, listData = list(sumReadsM1 = numeric(0), 
                   sumReadsN1 = numeric(0), proportion1 = numeric(0), 
                   sumReadsM2 = numeric(0), sumReadsN2 = numeric(0), 
                   proportion2 = numeric(0), cytosinesCount = numeric(0), 
                   proportionsR1 = numeric(0), proportionsR2 = numeric(0), 
                   proportionsR3 = numeric(0), proportionsR4 = numeric(0)), 
               elementType = "ANY", elementMetadata = NULL, metadata = list()), 
           elementType = "ANY", metadata = list()), new("GRanges", 
           seqnames = new("Rle", values = integer(0), lengths = integer(0), 
               elementMetadata = NULL, metadata = list()), ranges = new("IRanges", 
               start = integer(0), width = integer(0), NAMES = NULL, 
               elementType = "ANY", elementMetadata = NULL, metadata = list()), 
           strand = new("Rle", values = integer(0), lengths = integer(0), 
               elementMetadata = NULL, metadata = list()), seqinfo = new("Seqinfo", 
               seqnames = c("scaffold_2240", "scaffold_2241", "scaffold_2242", 
               "scaffold_2243", "scaffold_2244", "scaffold_2245", 
               this list goes on for a while), seqlengths = c(NA_integer_, NA_integer_, 
               NA_integer_, NA_integer_, NA_integer_, NA_integer_, 
               this list goes on for a while), is_circular = c(NA, NA, NA, NA, NA, 
               this list goes on for a while), genome = c(NA_character_, 
               NA_character_, NA_character_, NA_character_, NA_character_, 
               this list goes on for a while)), elementMetadata = new("DataFrame", 
               rownames = NULL, nrows = 0L, listData = list(sumReadsM1 = numeric(0), 
                   sumReadsN1 = numeric(0), proportion1 = numeric(0), 
                   sumReadsM2 = numeric(0), sumReadsN2 = numeric(0), 
                   proportion2 = numeric(0), cytosinesCount = numeric(0), 
                   proportionsR1 = numeric(0), proportionsR2 = numeric(0), 
                   proportionsR3 = numeric(0), proportionsR4 = numeric(0)), 
               elementType = "ANY", elementMetadata = NULL, metadata = list()), 
           elementType = "ANY", metadata = list()), new("GRanges", 
           seqnames = new("Rle", values = integer(0), lengths = integer(0), 
               elementMetadata = NULL, metadata = list()), ranges = new("IRanges", 
               start = integer(0), width = integer(0), NAMES = NULL, 
               elementType = "ANY", elementMetadata = NULL, metadata = list()), 
           strand = new("Rle", values = integer(0), lengths = integer(0), 
               elementMetadata = NULL, metadata = list()), seqinfo = new("Seqinfo", 
               seqnames = c("scaffold_2240", "scaffold_2241", "scaffold_2242", 
               "scaffold_2243", "scaffold_2244", "scaffold_2245", 
               this list goes on for a while), seqlengths = c(NA_integer_, NA_integer_, 
               NA_integer_, NA_integer_, NA_integer_, NA_integer_, 
               this list goes on for a while), is_circular = c(NA, NA, NA, NA, NA, 
               this list goes on for a while), genome = c(NA_character_, 
               NA_character_, NA_character_, NA_character_, NA_character_, 
               this list goes on for a while)), elementMetadata = new("DataFrame", 
               rownames = NULL, nrows = 0L, listData = list(sumReadsM1 = numeric(0), 
                   sumReadsN1 = numeric(0), proportion1 = numeric(0), 
                   sumReadsM2 = numeric(0), sumReadsN2 = numeric(0), 
                   proportion2 = numeric(0), cytosinesCount = numeric(0), 
                   proportionsR1 = numeric(0), proportionsR2 = numeric(0), 
                   proportionsR3 = numeric(0), proportionsR4 = numeric(0)), 
               elementType = "ANY", elementMetadata = NULL, metadata = list()), 
           elementType = "ANY", metadata = list()))
8: do.call(GRangesList, from)
7: do.call(GRangesList, from)
6: asMethod(object, strict = FALSE)
5: as(listData[[1L]], "CompressedGRangesList", strict = FALSE)
4: GRangesList(computedDMRs)
3: unlist(GRangesList(computedDMRs))
2: .computeDMRsReplicatesBins(methylationData = methylationData, 
       condition = condition, regions = regions, context = context, 
       binSize = binSize, pseudocountM = pseudocountM, pseudocountN = pseudocountN, 
       pValueThreshold = pValueThreshold, minCytosinesCount = minCytosinesCount, 
       minProportionDifference = minProportionDifference, minGap = minGap, 
       minSize = minSize, minReadsPerCytosine = minReadsPerCytosine, 
       cores = cores)
1: computeDMRsReplicates(methylationData = methylationDataList, 
       condition = condition, regions = NULL, context = "CHH", method = "bins", 
       binSize = 100, test = "betareg", pseudocountM = 1, pseudocountN = 2, 
       pValueThreshold = 0.05, minCytosinesCount = 1, minProportionDifference = 0.1, 
       minGap = 200, minSize = 50, minReadsPerCytosine = 3, cores = 8)
8: (function () 
   traceback(2))()
7: as.data.frame(DMRsReplicatesBinsCHH)
6: is.data.frame(x)
5: write.table(as.data.frame(DMRsReplicatesBinsCHH), file = "filename.csv", 
       col.names = NA, sep = ",", dec = ".", qmethod = "double")
4: eval(expr, p)
3: eval(expr, p)
2: eval.parent(Call)
1: write.csv(as.data.frame(DMRsReplicatesBinsCHH), file = "filename.csv")

I see a lot of zeros and NA in the error message so could it be that I don't have any DMRs?

Thank you (again) for the help!

Stefan

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.