WGLab / DeepMod2

DNA 5mC methylation detection from Dorado or Guppy basecalled Oxford Nanopore reads
MIT License
36 stars 2 forks source link

Error with BAM file on Command 3 #13

Open anish-taori opened 1 year ago

anish-taori commented 1 year ago

image I have indexed and aligned my BAM file still it gives the above error. When I let the command run it produced an empty file.

umahsn commented 1 year ago

Hi, it is reasonable to expect a few reads from FAST5 to not be present in BAM if basecalling fails for those reads. However, this should be tiny fraction of reads, and almost all reads should be successfully processed. Are you getting the "read not found" error for all the reads or only a fraction of them, and is there a BAM output produced by DeepMod2? And is the number of reads with this error the same as the number of reads in FAST5 files?

Another possibility could be a mix up in samples provided to DeepMod2. For instance, the BAM file is from a different sample than FAST5 or the read names have been edited in the BAM in some way? You can check it as follows:

Run this command to get read names from the BAM file: samtools view -F 2304 input.bam|cut -f 1| sort > read_names_from_bam

Run this command to get read names from the FAST5 files using sequencing_summary.txt file in the basecalled folder: tail -n +2 sequencing_summary.txt |cut -f 2|sort > read_names_from_basecalls

Then check if the read_names_from_bam are the same as read_names_from_basecalls.