This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How can I format blastn output?

Hello, I have mainly used multiple sequence alignment, such as muscle which provides an output such as:

>seq1
ACT--GC
>seq2
ACT--GC
>seq3
etc.

I am attempting to do pairwise alignment using blastn, however rather than produce a sequence like the one above, it outputs like this: enter image description here

I want to format this file such that it will appear like msa format, because I want to use a software(MEGA) that only accepts data in that form.

>query
ACT--GC
>subject
ACT--GC

I'm currently trying to use -outfmt for blastn on cmd line, but not sure which sequence of commands will generate the desired outcome. Any help is greatly appreciated. Thanks.

blast pairwise blastn alignment

1 answer

Answers here should help: Converting ANY blast output file to an alignment fasta file.

Blast can not produce output in "aligned fasta" format which is what you are looking for.

Thanks so much!

Log in to answer this question.