markrobinsonuzh / DAMEfinder

Finds DAMEs - Differential Allelicly MEthylated regions
MIT License
10 stars 3 forks source link

Could I use DAMEfinder to identify the possible ICR from a single WGBS dataset? #40

Closed yuzhang0327 closed 3 years ago

yuzhang0327 commented 3 years ago

Dear,

Thanks for your great work. I am wondering could I use DAMEfinder to identify the possible ICR from a single WGBS dataset? If so, how can we achieve this?

Best, Yu

sorjuela commented 3 years ago

Hi Yu,

Do you want to identify a specific ICR? or all possible ICRS in the genome? And with single dataset you mean a single file? In any case, you can follow the package's vignette up to "5.2.2 Calculate ASM Score", then you can select the CpG tuples with the highest ASM scores. These should correspond to CpGs with high allele-specificity.

You can then group CpG tuples with high ASM using regionFinder() from the bumphunter package. These regions could be candidate ICRs. The steps would look something like this:

cluster <- bumphunter::clusterMaker(
        chr = as.character(seqnames(se)), 
        pos = strat(se))

icr <- bumphunter::regionFinder(x = assay(se, "asm")[,1], 
            chr = as.character(seqnames(se)), 
            pos = start(se), 
        cluster = cluster, 
            cutoff = 1) #or you can choose a different cutoff

I hope that works for you. Best, Stephany

yuzhang0327 commented 3 years ago

Hi Stephany,

Great thanks for your so quick and helpful response. I will try it later and get it back to you as soon as possible.

Best, Yu

yuzhang0327 commented 3 years ago

Hi Stephany,

According to the instructions on your website, I have now successfully run the command ASM_mat <- calc_asm(tuple_list). However, I have two questions about it. First of all, I am not sure how to export the score from ASM_mat? And I am sorry that I am not so familiar with R, would you mind tell me what the 'se' in the command? How could I get the se from the ASM_mat? cluster <- bumphunter::clusterMaker( chr = as.character(seqnames(se)), pos = strat(se))

Best, Yu

sorjuela commented 3 years ago

Hi Yu, sorry for the late response. se would be the SummarizedExperiment object, in your case ASM_mat. You get the score with assay(se, "asm").

Best, Stephany

yuzhang0327 commented 3 years ago

Hi Stephany,

Thanks very much! I will have a try.

Best, Yu

sorjuela commented 3 years ago

Please open a new issue if you still need help ;)