fetching sequence failed, FASTA read interval was out of bounds
I also met this problem, when I ran this comman,
modkit pileup --ref /mnt/raid/syl/5mc/05_20250122/5_remora/4_remora_inference/4mer.fasta --cpg --ignore h --combine-strands 4mer.infer.sort.bam 4mer.infer.bed
> fetching sequence failed, FASTA read interval was out of bounds
> fetching sequence failed, FASTA read interval was out of bounds
> fetching sequence failed, FASTA read interval was out of bounds
> fetching sequence failed, FASTA read interval was out of bounds
...
But the reference is the one that was used for bonito basecaller
here is my bam,
fd69d0df-b9e0-4d5c-9e38-43f6f727f245 0 4-Mer 22 60 2S4M1D3M2D34M4I97M3D5M1D51M1D59M2I15M3D14M1D16M7S * 0 0 TTCTGAACCTTTTTTTTGACGAAAACGTTTTGTTGAACTTCACCGATGGTTAA>
fd6f8789-7bcd-4c66-ae93-328fe707dfb0 16 4-Mer 7 60 23M1D30M1D20M1I19M4D22M1I7M1I12M1I1M1I78M1I27M2D6M1D16M2D10M1I3M1I7M2I35M265S * 0 0 GAAAGCTGCGTAATCCTGAGACCTTTTTT>
fdd5590f-b5f7-4241-8789-7a1df3b7b176 0 4-Mer 33 60 24M1I9M1I17M2D14M2D37M2I14M2I52M1I30M1I30M3I32M3I2M3D20M * 0 0 TTTTTTTGACGAAAACGTTTTGTTCGAACTTTACAGGCTAACAAC>
fdf13d4b-fbe1-4780-81c7-3623eb486f57 16 4-Mer 6 60 10M1I10M3D37M1D6M3I6M2D68M1D52M1D2M1I32M2D9M1I4M1I37M
my reference is the 4mer.fasta, and its .fai is also here. So how can I do to solve this problem?
Hello @TKsh6,
Sorry about the error. Could you send me a small modBAM that reproduces the problem? It would also help if you could run the command with --log-filepath and send me the debug log. I'm not familiar with 4mer.fasta could you tell me where I can get that as well? You can either attach the files to this thread or email them to me at art.rand[at]nanoporetech.com.