https://github.com/scapella/trimal/blob/b240b070f0c9651761361bb3d55bd0e3c328558a/source/sequencesMatrix.cpp#L92 should be `matrix[i][j] = matrix[j][i];`