MATLAB Answers

seqpdist Kimura "method not available for amino acids" even though working with nucleotides

6 views (last 30 days)
Laura
Laura on 9 Jan 2020
Commented: Laura on 10 Jan 2020
Hi, I am trying to use the seqpdist function in matlab (Matlab R2019a, academic license) to compute the pairwise distance between two sequences, with the Kimura method, however, I get the following error even though I am working with nucleotides, not amino acids:
Error using seqpdist (line 335)
Distance method not available for amino acids.
below a 2-line MWE:
ex = {'aagt', 'aatg'}
seqpdist(ex, 'Method', 'Kimura')
Error using seqpdist (line 335)
Distance method not available for amino acids.
I also tried with
ex = {'ACGT', 'AATG'}
ex = ['ACGT', 'AATG']
And got the same error. Can someone explain?
Thanks in Advance!

  3 Comments

Geoff Hayes
Geoff Hayes on 9 Jan 2020
Laura - from the seqpdist documentation, thed default type for the sequence is Amino Acids. Try changing the AlphabetValue property to nucleotides:
seqpdist(ex, 'Method', 'Kimura', 'AlphabetValue', 'NT')
Laura
Laura on 9 Jan 2020
Thank you for your answer, (by the way, it should be "Alphabet" as opposed to "AlphabetValue" :)
I now get the following error:
Error using seqpdist (line 343)
The distance method selected cannot score gaps.
Thanks for your help!
Geoff Hayes
Geoff Hayes on 9 Jan 2020
Yeah, I don't have this toolbox so was the documentation as a guide as to what parameters can be passed in. For your other error, score is the default algorithm (?) for ...how to treat sites with gaps. Alternative aglorithms are pairwise-del and complete-del can be used as
seqpdist(ex, 'Method', 'Kimura', 'Alphabet', 'NT', 'Indels', 'pairwise-del')
Though I don't know which (if any) is appropriate for Kimura.

Sign in to comment.

Accepted Answer

Arthur Goldsipe
Arthur Goldsipe on 10 Jan 2020
As Geoff points out in the comments, the problem is that several of the default option values don't work for the Kimura distance method. By default, seqpdist assumes that you're using amino acids and that indels are scored. I confirmed that the following works for your example:
ex = {'aagt', 'aatg'};
seqpdist(ex, 'Method', 'Kimura', 'Alphabet', 'nt', 'Indels', 'complete-del')

More Answers (0)

Sign in to answer this question.