pw.apply_pairwise_sq(seqs = ['CAS_GAF', 'CASRGAF'],
metric = pw.metrics.nb_editdistance,
ncpus = 1,
use_numba= True)
~/TCRDIST/pwseqdist/pwseqdist/matrices.py in seqs2mat(seqs, alphabet, max_len)
179 try:
180 mat[si, aai] = alphabet.index(s[aai])
--> 181 except ValueError('Unknown symbols given value for last column/row of matrix'):
182 """Unknown symbols given value for last column/row of matrix"""
183 mat[si, aai] = len(alphabet)
TypeError: catching classes that do not inherit from BaseException is not allowed
compared with standard behavior for recognizing unknown characters by non-Numba metric:
In [44]:
...: import Levenshtein
...: pw.apply_pairwise_sq(seqs = ['CAS_GAF', 'CASRGAF'],
...: ^I^I^I^I^I metric = Levenshtein.distance,
...: ^I^I^I^I^I ncpus = 1,
...: ^I^I^I^I^I use_numba= False)
Out[44]: array([1])
In [45]: import Levenshtein
...: pw.apply_pairwise_sq(seqs = ['CAS8GAF', 'CASRGAF'],
...: ^I^I^I^I^I metric = Levenshtein.distance,
...: ^I^I^I^I^I ncpus = 1,
...: ^I^I^I^I^I use_numba= False)
Out[45]: array([1])