Beispiel #1
0
        public void GetJsonStrings_NullJsonStrings()
        {
            var dataSource            = new SaDataSource("bob", "bobVcf", "A", false, false, null, null);
            var annotatedSaDataSource = new AnnotatedSaDataSource(dataSource, "A");

            var jsonStrings = annotatedSaDataSource.GetJsonStrings();

            Assert.Null(jsonStrings);
        }
        private static void AddSupplementaryAnnotation(IAnnotatedVariant annotatedVariant)
        {
            var dataSource = new SaDataSource("clinVar", "clinVar", "C", true, false, null,
                                              new[] { "\"good\":\"result\"" });
            var annotatedSaDataSource = new AnnotatedSaDataSource(dataSource, "C");

            var dataSource2 = new SaDataSource("exac", "exac", "G", true, true, null,
                                               new[] { "\"bad\":\"temper\"", "\"brutal\":\"kangaroo\"" });
            var annotatedSaDataSource2 = new AnnotatedSaDataSource(dataSource2, "G");

            annotatedVariant.SupplementaryAnnotations.Add(annotatedSaDataSource);
            annotatedVariant.SupplementaryAnnotations.Add(annotatedSaDataSource2);
        }
Beispiel #3
0
        public void GetJsonStrings_Positional_AlleleSpecific()
        {
            string[] expectedJsonStrings   = { "test1", "test2" };
            var      dataSource            = new SaDataSource("bob", "bobVcf", "A", false, false, null, expectedJsonStrings);
            var      annotatedSaDataSource = new AnnotatedSaDataSource(dataSource, "A");

            var jsonStrings = annotatedSaDataSource.GetJsonStrings();

            Assert.NotNull(jsonStrings);
            Assert.Equal(2, jsonStrings.Count);
            Assert.Contains(expectedJsonStrings[0], jsonStrings[0]);
            Assert.Contains(expectedJsonStrings[1], jsonStrings[1]);
        }