xiaowangCN / GeneDMRs

GeneDMRs is an R package to detect the differentially methylated regions based on genes, gene body, CpG islands and gene body interacted with CpG island features.
GNU Lesser General Public License v3.0
9 stars 3 forks source link

Feature request: Custom file names #2

Closed jdm204 closed 3 years ago

jdm204 commented 3 years ago

Hi, thanks for your work on this package!

Would it be possible to have a function to read in methylation files with custom names? For example a vector of case paths and a vector of control paths to avoid having to rename samples to the "1_1, 1_2..." scheme.

xiaowangCN commented 3 years ago

Hey, sorry for the late reply, as just back from the vacation. Yes, I think it could realize your ask after modification, so there are two folder paths, i.e., one is for the case group and another one is for the control groups, then for the replicates within each folder, it would read your files by recognizing the file names, like "case_apple, case_banana...". Is that what you like?

jdm204 commented 3 years ago

No worries, hope you had a nice vacation!

That would be an improvement, though what I meant was the ability to specify arbitrary file names, something like:

cases <- c("/path/to/case1.gz", "/other/path/case2.gz")
controls <- c("../control1.gz", "/other/path/control2.gz")
Quick_GeneDMRs(case_paths = cases, control_paths = controls)

I think this would help to integrate this package into processing pipelines built in Snakemake, Nextflow etc.

xiaowangCN commented 3 years ago

Sounds nice. It looks promisingly useful. I have tried to work it out and then it is working. Thanks a lot for the advices.