I have an error to do this:
After Flye assembly I obtain the file assembly_DG_1.fasta
The I used:
bwa index assembly_DG_1.fasta
bwa mem -pt16 assembly_DG_1.fasta DG_1_R1_001_val_1.fq.gz DG_1_R2_001_val_2.fq.gz | samtools sort -m4G -@4 -o align.bam -
Afterwards I used pilon:
pilon --genome flye_corrected_DG_1/assembly_DG_1.fasta --bam align.bam
ERROR: align.bam must be indexed BAM
Using:
and then
Solved the problem.