Skip to content

Commit

Permalink
hgvs p. for start lost
Browse files Browse the repository at this point in the history
  • Loading branch information
rajatshuvro committed Oct 23, 2020
1 parent 53fbf89 commit bb055b3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -173,14 +173,14 @@ public void Frameshift_due_to_insertion()
//NP_001263627.1:p.(Met1?)
public void Start_lost_start_equals_end()
{
Assert.Equal("NP_001263627.1:p.0?", HgvspNotation.GetStartLostNotation("NP_001263627.1", 1, 1, "Met"));
Assert.Equal("NP_001263627.1:p.?", HgvspNotation.GetStartLostNotation("NP_001263627.1", 1, 1, "Met"));
}

[Fact]
//NP_001263627.1:p.(Met1?)
public void Start_lost_start_not_equals_end()
{
Assert.Equal("NP_001263627.1:p.0?", HgvspNotation.GetStartLostNotation("NP_001263627.1", 1, 3, "Met"));
Assert.Equal("NP_001263627.1:p.?", HgvspNotation.GetStartLostNotation("NP_001263627.1", 1, 3, "Met"));
}

[Fact]
Expand Down
3 changes: 2 additions & 1 deletion VariantAnnotation/AnnotatedPositions/HgvspNotation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public static string GetDuplicationNotation(string proteinId, int start, int end

public static string GetStartLostNotation(string proteinId, int start, int end, string refAbbreviation)
{
return $"{proteinId}:p.0?";
return $"{proteinId}:p.?";
}

public static string GetSilentNotation(string hgvscNotation, int start, string refAbbreviation, bool isStopRetained)
Expand All @@ -77,6 +77,7 @@ internal static string GetSubstitutionNotation(string proteinId, int start, stri

internal static string GetUnknownNotation(string proteinId, int start, int end, string refAbbreviation, string altAbbreviation)
{

return start == end
? $"{proteinId}:p.({refAbbreviation}{start}{altAbbreviation})"
: $"{proteinId}:p.({refAbbreviation}{start}_{altAbbreviation}{end})";
Expand Down

0 comments on commit bb055b3

Please sign in to comment.