nloyfer / wgbs_tools

tools for working with Bisulfite Sequencing data while preserving reads intrinsic dependencies
Other
134 stars 37 forks source link

split_by_allele and test_bimodal #20

Closed rnbatra closed 1 year ago

rnbatra commented 1 year ago

Hey. Great package. Not so much of an issue. But rather a question. Could you give an example/ tutorial on how to use the split_by_allele and test_bimodal functions. Thanks a lot!

rnbatra commented 1 year ago

for instance, if i have a methylation BAM and confirmed SNP position, would it be possible to get allele specific methylation (and also split the BAMs)?

yonniejon commented 1 year ago

Hi @rnbatra . Sorry for the delay. The tutorial for split_by_allele and test_bimodal is almost ready.

Regarding your question - yes it is possible. If you have a confirmed heterozygous SNP for some sample (and you know the genotypes of the heterozygous alleles- in this case C/A) then the main flow of usage is something like this:

region=chr11:2019196-2019796
snp=chr11:2019496
wgbstools bam2pat bams/my_sample.bam -r $region
wgbstools vis -r $region my_sample.pat.gz
wgbstools vis -r $region my_sample.pat.gz --uxm 0.65
wgbstools test_bimodal -r $region my_sample.pat.gz
wgbstools split_by_allele bams/my_sample.bam $snp C/A --no_beta
rnbatra commented 1 year ago

thanks for the quick reply. i also look forward to the tutorial. best!

yonniejon commented 1 year ago

The tutorial has been added! https://github.com/nloyfer/wgbs_tools/blob/master/tutorial/README.md#bimodal-and-asm-analysis