ben-laufer / DMRichR

A R package and executable for the preprocessing, statistical analysis, and downstream testing and visualization of differentially methylated regions (DMRs) from CpG count matrices (Bismark cytosine reports)
https://www.benlaufer.com/DMRichR/
MIT License
39 stars 22 forks source link

An error showed "'error in evaluating the argument 'x' in selecting a method for function 'as.data.frame': 'mc.cores' > 1 is not supported on Windows" #82

Open thsign7788 opened 9 months ago

thsign7788 commented 9 months ago

I am using a Windows system but I get the message "mc.cores is not supported on Windows" Can I bypass this issue? thank you for the help

DMRichR::DM.R (genome = "hg38",

  • maxPerms = 7,
  • maxBlockPerms = 7,
  • sexCheck = TRUE,
  • adjustCovariate = "Age",
  • testCovariate = "Diagnosis") genome = hg38 coverage = 1 perGroup = 0.75 minCpGs = 5 maxPerms = 7 maxBlockPerms = 7 cutoff = 0.05 testCovariate = Diagnosis adjustCovariate = Age cores = 20 sexCheck = TRUE EnsDb = FALSE GOfuncR = TRUE

[DMRichR] Selecting annotation databases 10-12-2023 上午 08:50:23 Loading BSgenome.Hsapiens.UCSC.hg38.masked Loading TxDb.Hsapiens.UCSC.hg38.knownGene Loading org.Hs.eg.db Saving Rdata...

[DMRichR] Processing Bismark cytosine reports 10-12-2023 上午 08:50:23 Selecting files... Reading cytosine reports... [read.bismark] Parsing files and constructing valid loci ... Done in 1422.8 secs [read.bismark] Parsing files and constructing 'M' and 'Cov' matrices ... Done in 1843 secs [read.bismark] Constructing BSseq object ... Assigning sample metadata with Diagnosis as factor of interest... DataFrame with 7 rows and 3 columns Diagnosis Age Sex

sample1MQA1.CpG Disease 21 F sample2MQA3.CpG Disease 22 F sample3MQA5.CpG Disease 20 F sample4MQA7.CpG Disease 22 F sample5MQA4.CpG Control 22 F sample6MQA6.CpG Control 20 F sample7MQA8.CpG Control 22 F Checking sex of samples... Sex of samples match correctly as all male or all female. Filtering CpGs for Diagnosis... Assuming adjustment covariate Age is continuous and excluding it from filtering... Error in h(simpleError(msg, call)) : error in evaluating the argument 'x' in selecting a method for function 'as.data.frame': 'mc.cores' > 1 is not supported on Windows
ben-laufer commented 9 months ago

Hi @thsign7788,

Can you try changing the cores argument to 1?

In general, I'd recommend using a unix-based system in order take advantage of the speed increase from parallel processing.

thsign7788 commented 8 months ago

sorry for the delayed response.

I changed to cores argument to 1 but resulted in the crash of the Windows 11 system my computer was new with 64GB of memory, but every time I run the code, it crashed and showed the message of memory failure

Then I install the Ubuntu 22.04 and run the same code. in the Ubuntu system, it will come up the error as follows

"[DMRichR] Processing Bismark cytosine reports
Selecting files... Reading cytosine reports... [read.bismark] Parsing files and constructing valid loci ... Error in reducer$value.cache[[as.character(idx)]] <- values : wrong args for environment subassignment"