adamewing / methylartist

Tools for plotting methylation data in various ways
MIT License
131 stars 10 forks source link

Issues with Bam files from Dorado with segmeth #55

Open Jared-Tomei opened 1 year ago

Jared-Tomei commented 1 year ago

I merged the bam files from the modified 5mc and 5hmC from Dorado with samtools merge, I index and sorted it with samtools as well. when I try to run methylartist segmeth with this bam file as my -b I get this as an error. Traceback (most recent call last): File "/usr/local/bin/methylartist", line 5522, in main(args) File "/usr/local/bin/methylartist", line 5210, in main args.func(args) File "/usr/local/bin/methylartist", line 2381, in segmeth mod_names = mods_methbam(bam) File "/usr/local/bin/methylartist", line 686, in mods_methbam bam = pysam.AlignmentFile(bam_fn) File "pysam/libcalignmentfile.pyx", line 751, in pysam.libcalignmentfile.AlignmentFile.cinit File "pysam/libcalignmentfile.pyx", line 1000, in pysam.libcalignmentfile.AlignmentFile._open ValueError: file has no sequences defined (mode='r') - is it SAM/BAM format? Consider opening with check_sq=False

Is there something I need to do to the bam files from dorado before merging and indexing them?

adamewing commented 1 year ago

Apologies for the delay. If this is still relevant, can you check that there are reads in the .bam (samtools view)?

In general .bam files from dorado seem to work fine in methylartist without any further processing.

Jared-Tomei commented 1 year ago

I can confirm there is reads in there with samtools view