Question: output a consensus sequence from mafft alignment
0
gravatar for roblogan6
2.8 years ago by
roblogan630
roblogan630 wrote:

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

ADD COMMENTlink modified 2.8 years ago • written 2.8 years ago by roblogan630
1
gravatar for roblogan6
2.8 years ago by
roblogan630
roblogan630 wrote:

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 COMMENTlink written 2.8 years ago by roblogan630

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 REPLYlink modified 2.8 years ago • written 2.8 years ago by piet1.6k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1037 users visited in the last hour