# How to reduce the number of sequences in a Multiple Sequence Alignment?

I have a Multiple Sequence Alignment, where there are around 5000 sequences. There also exists many sequences where, there are so much of non-sequenced regions (for instance, AU----CGGGCA--NNNNNNNNNN).

So, by trial and error, I found a threshold value of 25%, so I removed the sequences which contained more than 25% of non-sequenced region (N's here), retaining around 400 sequences in the alignment, by writing a simple R script.

But, I would like to know, if there is any other standard method to do this, because I do not think, removing sequences based on finding a threshold for the percentage of non-sequenced regions, by trial and error is more efficient.If there is, can you please tell me, how to do?

• To remove sequences that contain ambiguous sequence is pretty straightforward. You can do it programmatically instead of doing manually. What do you mean by proper method? Can you please clarify what your objective is? Commented Jul 25, 2019 at 8:43
• Sure, I removed the sequences with a simple R script. I do not think, removing sequences based on finding a threshold for the percentage of non-sequenced regions, by trial and error is more efficient. I was wondering if there is any standard way to do it.
– User
Commented Jul 25, 2019 at 8:49
• That totally depends on your judgment. There can be sequence blocks that do not contain ambiguous bases. You can take them if you think the entire sequence is not necessary. This could be done only for local alignments. For doing global alignments, you should take a call on whether or not the number of ambiguous bases is too much. It would also matter if the ambiguous bases are present together or spread out. A stretch of Ns would be worse than the Ns being spread out. You can try MSA with and without these sequences and see if there is any significant change in the consensus. Commented Jul 25, 2019 at 8:58
• Deciding the threshold depends on your prior knowledge about the sequence region. The software is unaware of the biology. For e.g. the N could be in non-conserved regions: it would not probably affect the MSA. If they are in the conserved regions, they could distort the analysis. Anyway, can you please edit your question to clarify the exact objective (as you mentioned in comments)? Comments are not searchable and can go unnoticed. Moreover, the post should be self-sufficient. Commented Jul 25, 2019 at 9:02
• I edited my question.
– User
Commented Jul 25, 2019 at 9:19