Пример #1
0
        public void GetMatchingAnnotations_NoOverlap_ReturnNull()
        {
            var variant = new RepeatExpansion(ChromosomeUtilities.Chr1, 220, 230, null, null, null, 9, 7);
            var sa      = _matcher.GetMatchingAnnotations(variant);

            Assert.Null(sa);
        }
        public void Annotate_RepeatExpansion_no_refRepeatCount()
        {
            var variant = new RepeatExpansion(ChromosomeUtilities.Chr3, Start, End + 1, "A", "<STR3>", null, 10, null);

            var annotatedPosition = GetAnnotatedPosition(variant);

            _provider.Annotate(annotatedPosition);

            var firstVariant = annotatedPosition.AnnotatedVariants[0];

            Assert.NotNull(firstVariant);
        }
        public void Annotate_RepeatExpansion_NotExactMatch_NullPhenotypes()
        {
            var variant = new RepeatExpansion(ChromosomeUtilities.Chr3, Start, End + 1, "A", "<STR3>", null, 10, 5);

            var annotatedPosition = GetAnnotatedPosition(variant);

            _provider.Annotate(annotatedPosition);

            var firstVariant = annotatedPosition.AnnotatedVariants[0];

            Assert.Null(firstVariant.RepeatExpansionPhenotypes);
        }
Пример #4
0
        public void GetMatchingAnnotations_Overlap_ReturnEntry()
        {
            var variant = new RepeatExpansion(ChromosomeUtilities.Chr1, 100, 200, null, null, null, 9, 7);
            var sa      = _matcher.GetMatchingAnnotations(variant);

            var sb = new StringBuilder();

            sa.SerializeJson(sb);
            string observedResult = sb.ToString();

            Assert.Contains("{\"phenotype\":\"A\"", observedResult);
        }
        public void Annotate_RepeatExpansion_ExactMatch_OnePhenotype()
        {
            var variant = new RepeatExpansion(ChromosomeUtilities.Chr3, Start, End, "A", "<STR3>", null, 10, 5);

            var annotatedPosition = GetAnnotatedPosition(variant);

            _provider.Annotate(annotatedPosition);

            var firstVariant = annotatedPosition.AnnotatedVariants[0];

            Assert.NotNull(firstVariant.RepeatExpansionPhenotypes);

            var sb         = StringBuilderCache.Acquire();
            var jsonObject = new JsonObject(sb);

            jsonObject.AddObjectValue(firstVariant.RepeatExpansionPhenotypes.JsonKey,
                                      firstVariant.RepeatExpansionPhenotypes);

            const string expectedJson = "\"repeatExpansionPhenotypes\":[{\"phenotype\":\"Spinocerebellar ataxia 7\",\"omimId\":164500,\"classifications\":[\"Normal\"],\"percentile\":6.33}]";
            string       observedJson = sb.ToString();

            Assert.Equal(expectedJson, observedJson);
        }