Skip to content

Commit

Permalink
feat(app): format (unique) HLA-A like (non-unique) HLA-B
Browse files Browse the repository at this point in the history
  • Loading branch information
tamslo committed Sep 6, 2024
1 parent 87a510d commit bba68f0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/lib/common/models/userdata/genotype_key.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ class GenotypeKey implements Genotype {
@override
String variant;

bool get isGeneUnique => UserData.instance.labData!.where(
// Not nice but format HLA-A (which is currently unique) as HLA-B; also,
// shorter check
bool get isGeneUnique => !gene.startsWith('HLA') &&
UserData.instance.labData!.where(
(labData) => labData.gene == gene
).length <= 1;

Expand Down

0 comments on commit bba68f0

Please sign in to comment.