nloyfer / wgbs_tools

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

bam2pat support for nanopore data #48

Open Rodcarlessi opened 10 months ago

Rodcarlessi commented 10 months ago

Hi guys,

Amazing tools!

Are there any plans to include functionality in bam2pat to handle nanopre modbams with MM and ML tags? If not, what could be a good way to convert bams with MM and ML tags into a bam that could be used as input for wgbstools?

Many thanks, Rodrigo

nloyfer commented 10 months ago

Hi, I implemented a beta version of bam2pat that supports ONT bam files (MM, ML). I will upload it soon

Rodcarlessi commented 10 months ago

Great, thank you Netanel, this will be very useful

ekushele commented 10 months ago

@nloyfer Any progress with this?

assafgrw commented 9 months ago

Hi I am also wondering if anyone was successfully able to generate pat files and build an atlas with BAM files generated with ONT data (ML and MN tags)

vinodsinghjnu commented 9 months ago

It seems bam2pat for nanopore data has some problem in recognising "eXtended CIGAR", or CIGARX string.

8,229,233,213,224,53,229,57,235,252,255,255,115,249,247,185,231,247,57,139,181,235,251,74,126,165,34,254,255,170,186,193,255,255,254,241,235,237,255,255,254,238,225,14,254,238,253,255,66,254,254,247  RG:Z:c969ee83   mc:f:99.5874    mg:f:99.6108    NM:i:72     
[ patter ] [ patter ] Unknown CIGAR character: =                                                                                                                                                      
[ patter ] [ chr9 ] Exception while processing line 798. Line content:                                                                                                                                                                                              
m64101_220704_113609/114427486/ccs      0       chr9    239949  60      8034=1I565=4D2297=      *       0       10900   ATTTCCAGTTATTCACATTAGAAACAGTACACCACTGAATAAATTTATGCATTCATCTTTGCTTACCTCTTTAATGATTCTTCACGATAAATGCTAGAAATAGAACCACAGACTTAAAGGTCTCCATTGATATGTGTGGC
nloyfer commented 6 months ago

wgbstools bam2pat now supports ONT bam files. I tested it on bam files from multiple sources, but I am positive I missed some cases. Please let me know in an issue if you encounter problems

assafgrw commented 4 months ago

Hi Netanel, Only today I had time to try bam2pat with ONT data. I was running the bam2pat commnad with the -np flag and I am afraid that there are still issues. I was testing the output with the vis command and it seems that all sites are recognized as 100% methylated. I verified that on several sited that were fully or partially unmethylated (according to modkit output and to IGV view modification option) am I missing something?

Your help is very much appreciated.

ekushele commented 4 months ago

@assafgrw Update your wgbs_tools with git pull and python setup.py for re-compiling This solved the problem for me

AzlanNI commented 2 months ago

Hello everyone! I am currently using wgbstools bam2pat on my ONT Data. And i just looked into the pat file and the entire count column is 4 ? Does anyone else encounter observations like this ? Its just makes me suspicious that for every read i have exactly 4 reads with the same Methylation pattern. Thanks in advance! Kind regards, Azlan