I applied three multiple sequence alignment methods of muscle, mafft and clistal omega on 30 sequences and 400 sequences . In the case of 30 seq, the output of alignment from the 3 methods was in the same length but in the case of larger data with different length of sequences (input data) the output from alignment methods was different length clustal length is different than the two others. My question is how can i assure that the length from MSA should be equal or different?
It is likely the sequence data in this instance, the more sequences the more chance an issue with the alignment where variations in the gap penalty are observed.
MAFFT outperforms Clustal Omega to some extent over significantly larger alignments >50 000 sequences from published benchmark studies (FAMSA paper), but this is not relevant here.
The length of the alignment will depend on the model. For example, high gap costs will typically result in shorter alignments, whereas low gap-costs will do the opposite.
Consider the sequences below:
AAAAA TTTTT GGGGG
with a very large gap cost, these sequences will result in the following MSA
AAAAA ||||| TTTTT ||||| GGGGG
but with lower gap costs, we'd observe
AAAAA---------- -----TTTTT----- ----------GGGGG
Of course, this is an extreme case, but it goes to show that the alignment model will vary how long the resulting alignment is.