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

How do I point to files? #71

Closed f6v closed 12 months ago

f6v commented 12 months ago

Hi!

Thanks for the package! I can't figure out how to point to the files though. I've ran nf-core/methylseq pipeline and that outputs coverage2cytosine Bismark results like these:

Screenshot 2023-09-19 at 21 27 35

Here's how sample_info.xlsx looks like:

image

I change the working directory of the R session to folder with these files and run: DM.R(genome = "mm10", testCovariate = "Age", cores = 8) However, there's an error:

[DMRichR] Processing Bismark cytosine reports            19-09-2023 09:23:47 PM
Selecting files... 
Reading cytosine reports...    
Error in bsseq::read.bismark(files = files, rmZeroCov = FALSE, strandCollapse = TRUE,  : 
These files cannot be found: 
NA

What am I missing?

f6v commented 12 months ago

I guess the issue is that running https://github.com/ben-laufer/DMRichR/blob/0b6176a1be386b839f0f6def51fa7226310d2ad6/R/processBismark.R#L44C40-L44C40 returns NA for Treg9 sample. Any idea how to fix that?

f6v commented 12 months ago

Ok so I debugged it for a while, and I guess the issue is that the tool makes an assumption that file name has an underscore before the sample name. I made it work by changing the file names and sample names in the excel sheet.