This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Getting assembly from sam/bam file

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,

Priyanka

assembly alignment

1 answer

I think it's probably best if you use RaGOO for that - https://github.com/malonge/RaGOO

It runs minimap2 using your contigs and a reference assembly and then orders the contigs based on the alignment. You may have to rerun your alignments, I don't know whether you can give it the sam file directly.

Log in to answer this question.