Ejemplo n.º 1
0
 public void CreateFromTranslocation_InvalidAltAllele_ThrowException()
 {
     Assert.Throws <InvalidDataException>(delegate
     {
         var variant = new SimpleVariant(ChromosomeUtilities.Chr1, 100, 100, "A", "A{3:115024109{T", VariantType.translocation_breakend);
         // ReSharper disable once UnusedVariable
         BreakEndAdjacency[] adjacencies = BreakEndUtilities.CreateFromTranslocation(variant, ChromosomeUtilities.RefNameToChromosome);
     });
 }
Ejemplo n.º 2
0
        public void CreateFromTranslocation_Nominal(int position, string refAllele, string altAllele,
                                                    bool expectedOnReverseStrand, string expectedPartnerChr, int expectedPartnerPosition,
                                                    bool expectedPartnerOnReverseStrand)
        {
            var variant = new SimpleVariant(ChromosomeUtilities.Chr1, position, position, refAllele, altAllele, VariantType.translocation_breakend);

            BreakEndAdjacency[] adjacencies = BreakEndUtilities.CreateFromTranslocation(variant, ChromosomeUtilities.RefNameToChromosome);

            Assert.NotNull(adjacencies);
            Assert.Single(adjacencies);

            var observed = adjacencies[0];

            Assert.Equal(expectedOnReverseStrand, observed.Origin.OnReverseStrand);
            Assert.Equal(expectedPartnerChr, observed.Partner.Chromosome.EnsemblName);
            Assert.Equal(expectedPartnerPosition, observed.Partner.Position);
            Assert.Equal(expectedPartnerOnReverseStrand, observed.Partner.OnReverseStrand);
        }
 private static BreakEndAdjacency[] GetBreakEndAdjacencies(ISimpleVariant variant, IDictionary <string, IChromosome> refNameToChromosome) =>
 variant.Type == VariantType.translocation_breakend
         ? BreakEndUtilities.CreateFromTranslocation(variant, refNameToChromosome)
         : BreakEndUtilities.CreateFromSymbolicAllele(variant, variant.Type);