Details
Description
Some alignments can cause the remove gapped columns operation to fail with an unexpected exception, which Jalview does not report to the user.
To reproduce:
Import the following as a new alignment
>a
acd-d------
>b
acd-d--c
>c
acd---------
Apply the 'Remove Gapped Columns' option in the edit menu. An exception from SequenceI.deleteChars(i,j) will be thrown like:
Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException: 116
at jalview.datamodel.Sequence.deleteChars(Sequence.java:720)
at jalview.commands.EditCommand.deleteGap(EditCommand.java:270)
at jalview.commands.EditCommand.performEdit(EditCommand.java:188)
at jalview.commands.RemoveGapColCommand.<init>(RemoveGapColCommand.java:106)
at jalview.gui.AlignFrame.removeGappedColumnMenuItem_actionPerformed(AlignFrame.java:2339)
To reproduce:
Import the following as a new alignment
>a
acd-d------
>b
acd-d--c
>c
acd---------
Apply the 'Remove Gapped Columns' option in the edit menu. An exception from SequenceI.deleteChars(i,j) will be thrown like:
Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException: 116
at jalview.datamodel.Sequence.deleteChars(Sequence.java:720)
at jalview.commands.EditCommand.deleteGap(EditCommand.java:270)
at jalview.commands.EditCommand.performEdit(EditCommand.java:188)
at jalview.commands.RemoveGapColCommand.<init>(RemoveGapColCommand.java:106)
at jalview.gui.AlignFrame.removeGappedColumnMenuItem_actionPerformed(AlignFrame.java:2339)