Skip to content

Commit

Permalink
Fixed a bug that would cause Nirvana to crash if we observed an unkno…
Browse files Browse the repository at this point in the history
…wn chromosome. In this case, when observing a translocation breakend with the alt allele A]hs37d5:12060965]
  • Loading branch information
Michael Stromberg committed Feb 23, 2022
1 parent c7b24bf commit 5a90d5d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion VariantAnnotation/Providers/TranscriptAnnotationProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ private void AddTranscripts(AnnotatedVariant[] annotatedVariants)
foreach (var annotatedVariant in annotatedVariants)
{
var variant = annotatedVariant.Variant;
if (variant.Chromosome.IsEmpty) continue;

GetGeneFusionCandidates(variant.BreakEnds);
GetFlankingTranscripts(variant);
Expand Down Expand Up @@ -120,6 +121,7 @@ private void GetGeneFusionCandidates(IBreakEnd[] breakEnds)

foreach (var breakEnd in breakEnds)
{
if (breakEnd.Piece2.Chromosome.IsEmpty) continue;
GetGeneFusionTranscripts(breakEnd.Piece2.Chromosome.Index, breakEnd.Piece2.Position);
if (_geneFusionTranscripts.Count == 0) continue;

Expand Down Expand Up @@ -173,9 +175,11 @@ private void AddRegulatoryRegions(AnnotatedVariant[] annotatedVariants)
{
foreach (var annotatedVariant in annotatedVariants)
{
var variant = annotatedVariant.Variant;
if (variant.Chromosome.IsEmpty) continue;

// In case of insertions, the base(s) are assumed to be inserted at the end position
// if this is an insertion just before the beginning of the regulatory element, this takes care of it
var variant = annotatedVariant.Variant;
int variantBegin = variant.Type == VariantType.insertion ? variant.End : variant.Start;

if (SkipLargeVariants(variantBegin, variant.End)) continue;
Expand Down

0 comments on commit 5a90d5d

Please sign in to comment.