nanoporetech / modkit

A bioinformatics tool for working with modified bases
https://nanoporetech.com/
Other
151 stars 8 forks source link

fetching sequence failed error message when running pileup #308

Open niradsp opened 3 days ago

niradsp commented 3 days ago

Here is my procedure. First I ran dorado basecaller, where I required all modifications to be called: dorado basecaller -v sup,inosine_m6A,pseU,m5C --min-qscore 9 --emit-moves -b 64 --mm2-opts {params} --estimate-poly-a --reference {input.reference} -x cuda:all {input.input_files} > {output.output}

Next, I used samtools to sort this file: samtools sort -o {output} -@50 {input} Followed by indexing: samtools index {input}

Next I run pileup by setting the motif parameter as DRACH 2.

modkit pileup --ref {input.genome } --log-filepath test.log --motif DRACH 2 {input.bam} test.bed

Note that the reference used in the basecaller and in the pileup is the same one. I am however getting an error message:

fetching sequence failed, Unknown sequence name: chr1. fetching sequence failed, Unknown sequence name: chr1. fetching sequence failed, Unknown sequence name: chr1. fetching sequence failed, Unknown sequence name: chr1.

And on and on.
If I run the program without using --motif and --ref, it will run.

Thanks, Nirad

ArtRand commented 2 days ago

Hello @niradsp,

These steps look fine. This problem can occur when the reference that you aligned to and the one you're using for pileup don't match. Are you sure that {input.reference} is the same FASTA as {input.genome} and that {input.genome} has an appropriate FASTA index?