Hey colleagues,
Is there any convenient method (one step process) to extract average methylation level for a specific genomic region from BAM files of BS-seq or RRBS dataset.
Sure, if the method can extract the information from MethylFreq or some other intermediate files, it would be ok. You know I hope the code or the pipeline should have high speed.
BTW: alignment by Bismark 0.14.0
Thanks
Hi Dr Ryan, A little confused on
It seems the most popular way is only account for one of the reads? Do you think PileOMeth is also doing like this way or not?
PileOMeth will only count one of them (if it counts one at all). If mates map and agree on a basecall, then the basecall with the higher phred score is used and the phred score increased slightly (possibly then putting it over the
-p
threshold). If the reads disagree then the base with the highest phred score is again used but the score is first decreased depending on the phred score in the other read. If you want the full details you can have a look at the function that does this (it's a modified form of what samtools mpileup does): https://github.com/dpryan79/PileOMeth/blob/master/pileup.c#L94Hi Ryan,
I am thinking actually I can combine these two script with bash pipe if you can output the extract result to STDOUT. Do you think so? Now the current PileOMeth will output the extract result to file (Default) rather than the STDOUT. I think It would be perfect if we output the result to Screen/STDOUT defaultly.
I've not defaulted to writing to stdout because there can be multiple files. One can always use named pipes for things like this.
Okay. Deal. Perl, PileOMeth, Bash Again. Bad script, anyway, get the result, Share with all guys.
Hi Dr. Ryan,
I have a number of regions of interest, and have finished the first step using the -l option. Would you give an example code of bedtools or bedops on the output of PileOMeth? I'm very new to this, so I apologize if this is a really naive question! Thank you!