Skip to content

Commit

Permalink
fixes #519; don't use IDT text as key for modifications if two types …
Browse files Browse the repository at this point in the history
…of modifications have the same IDT text
  • Loading branch information
dave-doty committed Nov 20, 2020
1 parent c1180d1 commit 59a2638
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/src/state/modification.dart
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ abstract class Modification5Prime
implements Built<Modification5Prime, Modification5PrimeBuilder>, Modification {
factory Modification5Prime(
{String display_text, String id, String idt_text, BuiltMap<String, Object> unused_fields}) {
String id_to_assign = id ?? idt_text;
String id_to_assign = id ?? ("5'-" + idt_text);
var unused_fields_to_assign = unused_fields ?? BuiltMap<String, Object>();
return Modification5Prime.from((b) => b
..display_text = display_text
Expand Down Expand Up @@ -122,7 +122,7 @@ abstract class Modification3Prime
implements Built<Modification3Prime, Modification3PrimeBuilder>, Modification {
factory Modification3Prime(
{String display_text, String id, String idt_text, BuiltMap<String, Object> unused_fields}) {
String id_to_assign = id ?? idt_text;
String id_to_assign = id ?? ("3'-" + idt_text);
var unused_fields_to_assign = unused_fields ?? BuiltMap<String, Object>();
return Modification3Prime.from((b) => b
..display_text = display_text
Expand Down Expand Up @@ -183,7 +183,7 @@ abstract class ModificationInternal
String idt_text,
BuiltSet<String> allowed_bases,
BuiltMap<String, Object> unused_fields}) {
String id_to_assign = id ?? idt_text;
String id_to_assign = id ?? ("internal-" + idt_text);
var unused_fields_to_assign = unused_fields ?? BuiltMap<String, Object>();
var allowed_bases_to_assign = allowed_bases ?? BuiltSet<String>(['A', 'C', 'G', 'T']);
return ModificationInternal.from((b) => b
Expand Down

0 comments on commit 59a2638

Please sign in to comment.