2
$\begingroup$

I just ran an assembly on yeast genomes using Flye and I want to polish those assemblies with Pilon but it requires a sorted BAM file.

How do I make a BAM file of the resulting assembled.fasta?

$\endgroup$
1
  • 1
    $\begingroup$ What reads do you have? Only long read or short read or whatever? You need to align the starting reads to your assembly and then supply that bam, as implied by the user172818 answer. $\endgroup$ Sep 19, 2022 at 22:54

1 Answer 1

2
$\begingroup$

Run a short-read mapper. For example:

bwa index assembled.fasta
bwa mem -pt16 assembled.fasta read1.fq.gz read2.fq.gz \
  | samtools sort -m4G -@4 -o align.bam -
$\endgroup$
1
  • $\begingroup$ This is good if the user has Illumina, that isn't clear (though it is implied by using pilon). $\endgroup$ Sep 19, 2022 at 22:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.