BioJulia / BioAlignments.jl

Sequence alignment tools
MIT License
60 stars 24 forks source link

Obscure error when aligning sequences with gaps #46

Open jakobnissen opened 3 years ago

jakobnissen commented 3 years ago

MWE:

model = AffineGapScoreModel(EDNAFULL, gap_open=-12, gap_extend=-2)
pairalign(LocalAlignment(), dna"A-A", dna"AAA", model)

Errors with: ERROR: LoadError: BoundsError: attempt to access 15×15 Matrix{Int64} at index [0, 1]

It seems clear to me that the problem is that the alignment do not have an entry in the score table for matching to a deletion (a deletion being decoded to 0), and so it goes out of bounds. The solution here should be to throw an error if the sequence contains any gaps