inab / trimal

A tool for automated alignment trimming in large-scale phylogenetic analyses. Development version: 2.0
https://trimal.readthedocs.io/
GNU General Public License v3.0
175 stars 41 forks source link

Specifying an alternative similarity matrix #77

Closed JonathonMifsud closed 1 year ago

JonathonMifsud commented 1 year ago

Hi,

I would like to specify different BLOSUM matrices but am running into the following error:

At its most basic I have constructed an alignment using BLOSUM45 and wish to trim it using this matrix: trimal -matrix /project/jcomvirome/matrix/BLOSUM45 -in test_alignment.fasta ERROR: The Similarity Matrix can only be used with methods that use this matrix.

I had a quick look at the source code and found the following:

if((matrix != NULL) && (!appearErrors)) { if((!strict) && (!strictplus) && (!automated1) && (simThreshold == -1.0) && (!scc) && (!sct)) { cerr << endl << "ERROR: The Similarity Matrix can only be used with methods that use this matrix." << endl << endl; appearErrors = true; }

Is my understanding correct that strict, strictplus or automated1 have to be used to be able to specify an alternative matrices?

Thanks for your time!

nicodr97 commented 1 year ago

Hi @JonathonMifsud ,

Exactly, you have to use a trimming method (strict, strictplus, automated1, simThreshold) or some statistical calculation (scc, sst (there is a typo in the code of version 1.4)) which uses the similarity matrix.

Thank you!

JonathonMifsud commented 1 year ago

Thanks for the fast response!