jts / nanopolish

Signal-level algorithms for MinION data
MIT License
550 stars 160 forks source link

Nanopolish Call-methylation error #1133

Closed bebert30 closed 2 months ago

bebert30 commented 3 months ago

Hello, thank you for creating this useful tool. I am trying to call methylation on aligned .bam files using these options:

nanopolish call-methylation -t 40 -r ../FASTQs/refs/mm10.fa -b wt/wt_aligned.sorted.bam -q cpg -o wt_meth.methylation.tsv.

I am encountering an error that requires a --genome in this command. When I include the -g indexed reference file, I get another error that says the reference needs to be indexed with nanopolish index. However, I can't get nanopolish index to work on a non Fast5 file (the refs are in FASTA format).

Any advice would be greatly helpful! Many thanks!

jts commented 3 months ago

The reference genome needs to be indexed by samtools. You can run samtools faidx <genome.fa> to generate it.