Trim alignment of irrelevant or positions/columns that might add noise (step 3)#

In this step we want to remove position that might be irrelevant or add noise.

Trimming

We can automatically do that with trimAl as follows:

trimal -in $ALIGNED -out $FILE -gt X

Being X the coverage threshold at a given position. I normally use 30% for a quick analysis and 5% for a more resolutive analysis. Again, depending on your scope you will have to play with different options. Other useful options are “-st” (removing positions above certain dissimilarity threshold), “-nogaps” (removing all positions with gaps) and “-noallgaps” (removing only positions composed only by gaps).

Other softwares highly used are Gblocks, ClipKIT (which also estimates and keeps parsimonious sites), Noisy (able to predict and remove homoplastic sites) or BMGE (removing sites that are highly variable/entropic).