Skip to content

Commit

Permalink
fix: allow stop codon symbol for AminoAcidMutations
Browse files Browse the repository at this point in the history
  • Loading branch information
JonasKellerer committed Dec 18, 2023
1 parent 4a75342 commit 74cfa74
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ data class AminoAcidMutation(val gene: String, val position: Int, val symbol: St

private val AMINO_ACID_MUTATION_REGEX =
Regex(
"""^((?<gene>[a-zA-Z0-9_-]+):)(?<symbolFrom>[a-zA-Z]?)(?<position>\d+)(?<symbolTo>[a-zA-Z.-])?$""",
"""^((?<gene>[a-zA-Z0-9_-]+):)(?<symbolFrom>[a-zA-Z]?)(?<position>\d+)(?<symbolTo>[a-zA-Z*.-])?$""",
)

@JsonComponent
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@ class AminoAcidMutationTest {
"\"gene:123a\"",
AminoAcidMutation("gene", 123, "A"),
),
Arguments.of(
"\"ORF1b:123*\"",
AminoAcidMutation("ORF1b", 123, "*"),
),
)

@JvmStatic
Expand Down

0 comments on commit 74cfa74

Please sign in to comment.