My assembly (asm.fa) is fragmented, so I align it against the reference (ref.fa). How can I use the sam output to get a new fasta file for my assembly, where the contigs are put together in scaffolds?
mininmap -ax asm5 ref.fa asm.fa > aln.sam
samtools sort aln.sam > aln.sorted.sam
Thank you and Best Regards,