output a consensus sequence from mafft alignment
1
0
Entering edit mode
5.3 years ago
roblogan6 ▴ 30

Creating alignments for 800+ multifasta files
The above link will send you to a post that is very similar to mine. I have multiple multifasta files that need to be aligned using mafft in succession, just as the before mentioned post. However, I need to output not just the alignment, but the consensus sequences of the alignment. It would be great if the consensus sequence could be printed out only, separate from the actual alignment. Any ideas of how to work that into the code provided in the earlier post? Thanks so much, -Rob

mafft multifasta alignment consensus • 4.3k views
ADD COMMENT
1
Entering edit mode
5.3 years ago
roblogan6 ▴ 30

I was able to figure it out. With mafft installed and configured, use the following commands in the directory where all your files are.

for fasta_file in $(ls *.txt)

do mafft $fasta_file > $fasta_file.out

done

ADD COMMENT
1
Entering edit mode

The above script will not solve your problem. If you want to calculate the consensus of a multi sequence alignment from the command line, you may use "cons" from the Emboss package. 'mafft' is a very versatile multi sequence aligner but not suited to calculate consensus.

see also:

ADD REPLY

Login before adding your answer.

Traffic: 974 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6