# Index the draft genome bwa index draft.fa # Align the basecalled reads to the draft sequence bwa mem -x ont2d -t 8 draft.fa reads.fa | samtools sort -o reads.sorted.bam -T reads.tmp - samtools index reads.sorted.bam
python nanopolish_makerange.py draft.fa | parallel --results nanopolish.results -P 8 \
nanopolish variants --consensus -o polished.{1}.vcf -w {1} -r reads.fa -b reads.sorted.bam -g draft.fa -t 4 --min-candidate-frequency 0.1
nanopolish vcf2fasta -g draft.fa polished.*.vcf > polished_genome.fa