Ejemplo n.º 1
0
        public void GetNonDuplicateItems()
        {
            var geneIdToSymbols = new Dictionary <string, string>
            {
                { "ENST00000426342", "MDGA2" },
                { "ENST00000439988", "MDGA2" }
            };

            using (var reader = new GnomadGeneParser(new StreamReader(GetStream_with_duplicate_gene_entries()), geneIdToSymbols))
            {
                var items = reader.GetItems().ToList();

                Assert.Single(items);
                Assert.Equal("{\"pLi\":9.99e-1,\"pRec\":7.81e-4,\"pNull\":8.65e-12,\"synZ\":8.30e-1,\"misZ\":1.68e0,\"loeuf\":2.39e-1}", items[0].Value[0].GetJsonString());
            }
        }
Ejemplo n.º 2
0
        public void GetItems()
        {
            var geneIdToSymbols = new Dictionary <string, string>
            {
                { "ENSG00000108510", "MED13" },
                { "ENSG00000164190", "NIPBL" },
                { "tENSG00000184779", "RPS17" }
            };

            using (var reader = new GnomadGeneParser(new StreamReader(GetStream()), geneIdToSymbols))
            {
                var items = reader.GetItems().ToList();

                Assert.Equal(3, items.Count);
                Assert.Equal("{\"pLi\":1.00e0,\"pRec\":1.84e-16,\"pNull\":8.94e-40,\"synZ\":-1.38e0,\"misZ\":2.62e0,\"loeuf\":3.00e-2}", items[0].Value[0].GetJsonString());
                Assert.Equal("{\"pLi\":3.26e-1,\"pRec\":4.99e-1,\"pNull\":1.76e-1,\"loeuf\":1.85e0}", items[2].Value[0].GetJsonString());
            }
        }
Ejemplo n.º 3
0
        public void ResolveDuplicateWithout_loeuf()
        {
            var geneIdToSymbols = new Dictionary <string, string>
            {
                { "ENSG00000162825", "NBPF20" },
                { "ENSG00000203832", "NBPF20" },
                { "ENSG00000268674", "FAM231D" },
                { "ENSG00000203815", "FAM231D" },
            };

            using (var reader = new GnomadGeneParser(new StreamReader(GetStream_resolve_without_loeuf()), geneIdToSymbols))
            {
                var items = reader.GetItems().ToList();

                Assert.Equal(2, items.Count);
                Assert.Equal("{\"pLi\":1.42e-7,\"pRec\":3.40e-2,\"pNull\":9.66e-1,\"synZ\":-1.86e0,\"misZ\":-2.88e0,\"loeuf\":1.97e0}", items[0].Value[0].GetJsonString());
                Assert.Equal("{\"synZ\":-1.98e0,\"misZ\":-1.44e0}", items[1].Value[0].GetJsonString());
            }
        }