Skip to content

Commit

Permalink
addding hgvsg. support for reference variants (#573)
Browse files Browse the repository at this point in the history
  • Loading branch information
rajatshuvro authored and GitHub Enterprise committed Nov 20, 2020
1 parent e132bcd commit 2bb5928
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Nirvana/Properties/launchSettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@
},
"RR_rnaEdit": {
"commandName": "Project",
"commandLineArgs": " --cache /Users/rroy1/development/Cache/27/GRCh38/Both --ref /Users/rroy1/development/References/7/Homo_sapiens.GRCh38.Nirvana.dat --in Dragen_v3.2-Dragen-Pedigree-RnaEdits-hg38-RefSeq-VEP91.vcf.gz --out rnaEdit",
"commandLineArgs": " --cache /Users/rroy1/development/Cache/27/GRCh38/Both --ref /Users/rroy1/development/References/7/Homo_sapiens.GRCh38.Nirvana.dat --in inputs/rnaEdit.vcf --out outputs/rnaEdit",
"workingDirectory": "/Users/rroy1/development/TestDatasets"
},
"RR_chrM": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ public sealed class HgvsgNotationTests

[Theory]
[InlineData(5, 5, "G", "T", VariantType.SNV, "NC_012920.1:g.5G>T")]
[InlineData(5, 5, "G", "G", VariantType.SNV, "NC_012920.1:g.5=")]
[InlineData(5, 7, "GTG", "", VariantType.deletion, "NC_012920.1:g.5_7delGTG")]
[InlineData(10, 12, "GAC", "", VariantType.deletion, "NC_012920.1:g.12_14delCGA")]
[InlineData(16, 15, "", "GATA", VariantType.insertion, "NC_012920.1:g.15_16insGATA")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public static GenomicChange GetGenomicChange(IInterval interval, bool onReverseS
int altLength = variant.AltAllele.Length;

// sanity check: make sure that the alleles are different
if (variant.RefAllele == variant.AltAllele) return GenomicChange.Unknown;
if (variant.RefAllele == variant.AltAllele) return GenomicChange.Reference;

// deletion
if (altLength == 0) return GenomicChange.Deletion;
Expand Down Expand Up @@ -118,6 +118,7 @@ public enum GenomicChange
DelIns,
Insertion,
Inversion,
Substitution
Substitution,
Reference
}
}
4 changes: 3 additions & 1 deletion VariantAnnotation/AnnotatedPositions/HgvsUtilities.cs
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,9 @@ public static string FormatDnaNotation(string start, string end, string referenc
case GenomicChange.Insertion:
sb.Append(coordinates + "ins" + alternateBases);
break;

case GenomicChange.Reference:
sb.Append(coordinates + "=");
break;
default:
throw new InvalidOperationException("Unhandled genomic change found: " + type);
}
Expand Down

0 comments on commit 2bb5928

Please sign in to comment.