Submit | Open tickets | Closed tickets

[ Ticket #1223 ] SequenceCanvas: Change cases loses annotation
Date:
06/04/20 15:25
Submitted by:
B_Fristensky
Assigned to:
B_Fristensky
Category:
bioLegato
Priority:
5
Ticket group:
Bug
Resolution:
Resolved
Summary:
SequenceCanvas: Change cases loses annotation
Original submission:
Edit --> Change case - If you change case, you lose all annotation. After changing case, if you try to use File --> View file, a pseudo-GenBank file is shown that is missing almost all annotation. This seems to be a problem with BioLegato, since there is no "Change case" .blmenu file.
Please log in to add comments and receive followups via email.
Followups
Comment Date By
Added boolean delAnnotation to Dataset.java. Methods which call datamodel.Insert dataset.delete also had to be modified to add the additional parameter. The errors listing which files needed change are found in fixanno.compile.log. delAnnotation was called as 'false' for calls to Insert. Calls to Delete were done using delAnnotation = true.

Fixed in BioLegato 1.1.3
08/21/25 15:20 B_Fristensky
From Graham Alvare

I took a look at the code and think I've tracked down the bug to lines 1214 and 1215 in src/Canvases/Sequence/src/org/biolegat
o/sequence/canvas/SequenceTextArea.java:

datamodel.delete(minsx, y, length, false);
datamodel.insert(minsx, y, data, 0, length, false);
and the variable 'original' in src/Canvases/Sequence/src/org/biolegato/sequence/Seq.java, which after taking a look at the fil
e formats can safely say only seems to be implemented and used for GenBank files at the moment.

What happens is whenever the methods datamodel.insert or datamodel.delete are called, the variable 'original', containing the
annotation data, is deleted because the method assumes it is no longer valid whenever there is a change. While this implement
ation of change case has the advantage of being simple, it has the disadvantage of deleting the annotation data when all that
is done is a change of case.

A simple fix would be to add a variable to dataset.insert and dataset.delete methods to tell it to skip deleting the annotatio
n data on lines 165 and 244 of src/Canvases/Sequence/src/org/biolegato/sequence/data/Dataset.java.

I've attached modified versions of the files, which I haven't yet had a chance to test, but should hopefully fix the problem.
08/09/24 16:40 B_Fristensky
No results for "Dependent on ticket"
No results for "Dependent on Task"
No other tickets are dependent on this ticket
Ticket change history
Field Old value Date By
status_id Open 08/21/25 15:20 B_Fristensky
resolution_id Not Resolved 08/21/25 15:20 B_Fristensky
close_date 12/31/69 19:00 08/21/25 15:20 B_Fristensky
status_id Pending 06/04/20 15:25 B_Fristensky
assigned_to unset 06/04/20 15:25 B_Fristensky
bug_group_id bioLegato 06/04/20 15:25 B_Fristensky
resolution_id Unset 06/04/20 15:25 B_Fristensky

© 1998-2025 Scilico, LLC. All rights reserved.