public void BasicReadTest() { var sequenceProvider = GetSequenceProvider(GenomeAssembly.GRCh37, new Chromosome("chr17", "17", 16), 41234419, "A"); var reader = new ClinVarXmlReader(new FileInfo(Resources.ClinvarXmlFiles("RCV000077146.xml")), sequenceProvider); Assert.True(reader.GetItems().Any()); foreach (var clinVarItem in reader.GetItems()) { Assert.Equal("RCV000077146.3", clinVarItem.Id); switch (clinVarItem.Id) { case "RCV000077146.3": Assert.Equal("17", clinVarItem.Chromosome.EnsemblName); Assert.Equal(41234419, clinVarItem.Start); Assert.Equal("A", clinVarItem.ReferenceAllele); Assert.Equal("C", clinVarItem.AlternateAllele); Assert.Equal(ClinVarXmlReader.ParseDate("2016-07-31"), clinVarItem.LastUpdatedDate); Assert.True(clinVarItem.AlleleOrigins.SequenceEqual(new List <string> { "germline" })); Assert.Equal("C2676676", clinVarItem.MedGenIDs.First()); Assert.Equal("145", clinVarItem.OrphanetIDs.First()); Assert.Equal("604370", clinVarItem.OmimIDs.First()); Assert.Equal("Breast-ovarian cancer, familial 1", clinVarItem.Phenotypes.First()); Assert.Null(clinVarItem.PubmedIds); break; } } }
public void NonEnglishChars() { var sequenceProvider = GetSequenceProvider(GenomeAssembly.GRCh37, new Chromosome("chr1", "1", 0), 225592188, "TAGAAGA"); var reader = new ClinVarXmlReader(Resources.ClinvarXmlFiles("RCV000087262.xml"), sequenceProvider); Assert.True(reader.GetItems().Any()); foreach (var clinVarItem in reader.GetItems()) { Assert.Equal("Pelger-Huët anomaly", clinVarItem.Phenotypes.First()); } }
public void MissingClinvarInsertion() { var sequenceProvider = GetSequenceProvider(GenomeAssembly.GRCh37, new Chromosome("chr1", "1", 1), 2337967, "G"); var reader = new ClinVarXmlReader(new FileInfo(Resources.ClinvarXmlFiles("RCV000179026.xml")), sequenceProvider); Assert.True(reader.GetItems().Any()); foreach (var clinVarItem in reader.GetItems()) { Assert.Equal(2337968, clinVarItem.Start); } }
public void MissingClinvarInsertionShift2() { var sequenceProvider = GetSequenceProvider(GenomeAssembly.GRCh37, new Chromosome("chr1", "1", 1), 9324412, "C"); var reader = new ClinVarXmlReader(Resources.ClinvarXmlFiles("RCV000017510.xml"), sequenceProvider); Assert.True(reader.GetItems().Any()); foreach (var clinVarItem in reader.GetItems()) { Assert.Equal(9324413, clinVarItem.Position); } }
public void PubmedTest5() { var sequenceProvider = GetSequenceProvider(GenomeAssembly.GRCh37, new Chromosome("chr16", "16", 6), 88907409, "A"); var reader = new ClinVarXmlReader(new FileInfo(Resources.ClinvarXmlFiles("RCV000000734.xml")), sequenceProvider); Assert.True(reader.GetItems().Any()); foreach (var clinVarItem in reader.GetItems()) { Assert.Null(clinVarItem.PubmedIds); } }
public void AlternatePhenotype() { var sequenceProvider = GetSequenceProvider(GenomeAssembly.GRCh37, new Chromosome("chr7", "7", 1), 42018228, "TC"); var reader = new ClinVarXmlReader(Resources.ClinvarXmlFiles("RCV000032707.xml"), sequenceProvider); Assert.True(reader.GetItems().Any()); foreach (var clinVarItem in reader.GetItems()) { Assert.NotNull(clinVarItem.Phenotypes); } }
public void OmitOmimFromAltPhenotypes() { var sequenceProvider = GetSequenceProvider(GenomeAssembly.GRCh37, new Chromosome("chr1", "1", 1), 55529187, "G"); var reader = new ClinVarXmlReader(Resources.ClinvarXmlFiles("RCV000030349.xml"), sequenceProvider); Assert.True(reader.GetItems().Any()); foreach (var clinVarItem in reader.GetItems()) { Assert.Single(clinVarItem.OmimIds); } }
public void ClinvarInsertion() { var sequenceProvider = GetSequenceProvider(GenomeAssembly.GRCh37, new Chromosome("chrX", "X", 1), 122318386, "A"); var reader = new ClinVarXmlReader(Resources.ClinvarXmlFiles("RCV000153339.xml"), sequenceProvider); Assert.True(reader.GetItems().Any()); foreach (var clinVarItem in reader.GetItems()) { Assert.Equal(122318387, clinVarItem.Position); } }
public void TrimSpaceFromOmimIds() { var sequenceProvider = GetSequenceProvider(GenomeAssembly.GRCh37, new Chromosome("chrX", "X", 1), 129283520, "A"); var reader = new ClinVarXmlReader(Resources.ClinvarXmlFiles("RCV000373191.xml"), sequenceProvider); Assert.True(reader.GetItems().Any()); foreach (var clinVarItem in reader.GetItems()) { Assert.Single(clinVarItem.OmimIds); Assert.Equal("609060", clinVarItem.OmimIds.FirstOrDefault()); } }
public void MissingAltAllele() { var sequenceProvider = GetSequenceProvider(GenomeAssembly.GRCh37, new Chromosome("chr1", "1", 0), 118165691, "C"); var reader = new ClinVarXmlReader(Resources.ClinvarXmlFiles("RCV000120902.xml"), sequenceProvider); Assert.True(reader.GetItems().Any()); foreach (var clinVarItem in reader.GetItems()) { Assert.Equal("C", clinVarItem.RefAllele); Assert.Equal("G", clinVarItem.AltAllele); } }
public void PubmedTest5() { var sequenceProvider = GetSequenceProvider(GenomeAssembly.GRCh37, new Chromosome("chr16", "16", 6), 88907409, "A"); var reader = new ClinVarXmlReader(Resources.ClinvarXmlFiles("RCV000000734.xml"), sequenceProvider); Assert.True(reader.GetItems().Any()); foreach (var clinVarItem in reader.GetItems()) { Assert.Equal(699, clinVarItem.VariationId); Assert.Null(clinVarItem.PubmedIds); Assert.Contains("\"variationId\":699", clinVarItem.GetJsonString()); } }
public void PubmedTest4() { var sequenceProvider = GetSequenceProvider(GenomeAssembly.GRCh37, new Chromosome("chr10", "10", 6), 43609944, "GCTGT"); var reader = new ClinVarXmlReader(Resources.ClinvarXmlFiles("RCV000021819.xml"), sequenceProvider); Assert.True(reader.GetItems().Any()); foreach (var clinVarItem in reader.GetItems()) { Assert.Equal(new List <long> { 7595167, 8099202, 8612479 }, clinVarItem.PubmedIds); } }
public void PubmedTest3() { var sequenceProvider = GetSequenceProvider(GenomeAssembly.GRCh37, new Chromosome("chr7", "7", 6), 55259485, "C"); var reader = new ClinVarXmlReader(Resources.ClinvarXmlFiles("RCV000038438.xml"), sequenceProvider); Assert.True(reader.GetItems().Any()); foreach (var clinVarItem in reader.GetItems()) { Assert.Equal(new List <long> { 17285735, 17877814, 22848293, 24033266 }, clinVarItem.PubmedIds); } }
public void PubmedTest2() { var sequenceProvider = GetSequenceProvider(GenomeAssembly.GRCh37, new Chromosome("chr11", "11", 10), 5247993, "AAAG"); var reader = new ClinVarXmlReader(Resources.ClinvarXmlFiles("RCV000016673.xml"), sequenceProvider); Assert.True(reader.GetItems().Any()); foreach (var clinVarItem in reader.GetItems()) { Assert.Equal(new List <long> { 6826539, 9113933, 9845707, 12000828, 12383672 }, clinVarItem.PubmedIds); } }
public void PubmedTest1() { var sequenceProvider = GetSequenceProvider(GenomeAssembly.GRCh37, new Chromosome("chr3", "3", 2), 10183457, "CGCACGCAGCTCCGCCCCGCG"); var reader = new ClinVarXmlReader(Resources.ClinvarXmlFiles("RCV000152657.xml"), sequenceProvider); Assert.True(reader.GetItems().Any()); foreach (var clinVarItem in reader.GetItems()) { Assert.Equal(new List <long> { 12114475, 18836774, 22357542, 24033266 }, clinVarItem.PubmedIds); } }
public void CapturePhenotypicSeriesOmimIDandUniq() { var sequenceProvider = GetSequenceProvider(GenomeAssembly.GRCh37, new Chromosome("chr4", "4", 1), 122746325, "A"); var reader = new ClinVarXmlReader(Resources.ClinvarXmlFiles("RCV000401212.xml"), sequenceProvider); Assert.True(reader.GetItems().Any()); foreach (var clinVarItem in reader.GetItems()) { Assert.Equal(clinVarItem.OmimIds, new List <string> { "209900" }); } }
public void MultipleOrigins() { var sequenceProvider = GetSequenceProvider(GenomeAssembly.GRCh37, new Chromosome("chrX", "X", 23), 18671566, "G"); //no citations show up for this RCV in the website. But the XML has these pubmed ids under fields that we parse pubmed ids from var reader = new ClinVarXmlReader(Resources.ClinvarXmlFiles("RCV000080071.xml"), sequenceProvider); Assert.True(reader.GetItems().Any()); foreach (var clinVarItem in reader.GetItems()) { var expectedOrigins = new List <string> { "germline", "maternal", "unknown" }; Assert.Equal(expectedOrigins, clinVarItem.AlleleOrigins); } }
public void PubmedTest6() { var sequenceProvider = GetSequenceProvider(GenomeAssembly.GRCh37, new Chromosome("chr1", "1", 6), 118165691, "C"); //extracting from SCV record var reader = new ClinVarXmlReader(Resources.ClinvarXmlFiles("RCV000120902.xml"), sequenceProvider); Assert.True(reader.GetItems().Any()); foreach (var clinVarItem in reader.GetItems()) { Assert.Equal(clinVarItem.PubmedIds, new List <long> { 24728327 }); } }
public void CaptureGeneOmimId() { var sequenceProvider = GetSequenceProvider(GenomeAssembly.GRCh37, new Chromosome("chr4", "4", 1), 3494837, "TGCC"); var reader = new ClinVarXmlReader(Resources.ClinvarXmlFiles("RCV000235027.xml"), sequenceProvider); Assert.True(reader.GetItems().Any()); foreach (var clinVarItem in reader.GetItems()) { Assert.Equal(clinVarItem.OmimIds, new List <string> { "601462", "610285.0001" }); } }
public void CapturePhenotypeSeriesOmimId() { var sequenceProvider = GetSequenceProvider(GenomeAssembly.GRCh37, new Chromosome("chr4", "4", 1), 15513014, "GAA"); var reader = new ClinVarXmlReader(Resources.ClinvarXmlFiles("RCV000406351.xml"), sequenceProvider); Assert.True(reader.GetItems().Any()); foreach (var clinVarItem in reader.GetItems()) { Assert.Equal(clinVarItem.OmimIds, new List <string> { "213300" }); } }
public void Remove9DigitsPubmedId() { var sequenceProvider = GetSequenceProvider(GenomeAssembly.GRCh37, new Chromosome("chr11", "11", 1), 534286, "C"); var reader = new ClinVarXmlReader(Resources.ClinvarXmlFiles("RCV000207504.xml"), sequenceProvider); Assert.True(reader.GetItems().Any()); foreach (var clinVarItem in reader.GetItems()) { Assert.Equal(clinVarItem.PubmedIds, new List <long> { 16329078, 16372351, 19213030, 21438134, 25741868 }); } }
public void MultiScvPubmeds() { var sequenceProvider = GetSequenceProvider(GenomeAssembly.GRCh37, new Chromosome("chr7", "7", 3), 116411990, "C"); //extracting from SCV record var reader = new ClinVarXmlReader(Resources.ClinvarXmlFiles("RCV000203290.xml"), sequenceProvider); Assert.True(reader.GetItems().Any()); foreach (var clinVarItem in reader.GetItems()) { Assert.Equal(clinVarItem.PubmedIds, new List <long> { 23806086, 24088041, 25736269 }); } }
public void MultiScvPubmed() { var sequenceProvider = GetSequenceProvider(GenomeAssembly.GRCh37, new Chromosome("chr4", "4", 6), 15589553, "G"); //extracting from SCV record var reader = new ClinVarXmlReader(new FileInfo(Resources.ClinvarXmlFiles("RCV000194003.xml")), sequenceProvider); Assert.True(reader.GetItems().Any()); foreach (var clinVarItem in reader.GetItems()) { Assert.True(clinVarItem.PubmedIds.SequenceEqual(new List <long> { 25741868, 26092869 })); } }
public void IupacBases() { var sequenceProvider = GetSequenceProvider(GenomeAssembly.GRCh37, new Chromosome("chr13", "13", 1), 32913457, "C"); var reader = new ClinVarXmlReader(new FileInfo(Resources.ClinvarXmlFiles("RCV000113363.xml")), sequenceProvider); Assert.True(reader.GetItems().Any()); var altAlleles = new List <string>(); foreach (var clinVarItem in reader.GetItems()) { altAlleles.Add(clinVarItem.AlternateAllele); } Assert.Equal(2, altAlleles.Count); }
public void Skip_entries_with_inconsistant_start_end() { var sequenceProvider = GetSequenceProvider(GenomeAssembly.GRCh37, new Chromosome("chr9", "9", 1), 132903739, "AAACGCTCATAGAGTAACTGGTTGTGCAGTAAAAGCAACTGGTCTCAAACGCTCATAGAGTAACTGGTTGTGCAGTAAAAGCAACTGGTCTC"); var reader = new ClinVarXmlReader(Resources.ClinvarXmlFiles("RCV000342164.xml"), sequenceProvider); Assert.False(reader.GetItems().Any()); }
public void IupacBases() { var sequenceProvider = GetSequenceProvider(GenomeAssembly.GRCh38, new Chromosome("chr13", "13", 1), 32339320, "C"); var reader = new ClinVarXmlReader(Resources.ClinvarXmlFiles("RCV000113363.xml"), sequenceProvider); Assert.True(reader.GetItems().Any()); var altAlleles = new List <string>(); foreach (var clinVarItem in reader.GetItems()) { altAlleles.Add(clinVarItem.AltAllele); Assert.Equal(new[] { "pathogenic" }, clinVarItem.Significances); } Assert.Equal(2, altAlleles.Count); }
public void SkipMicrosatellitesWithoutAltAllele() { var sequenceProvider = GetSequenceProvider(GenomeAssembly.GRCh37, new Chromosome("chr22", "22", 1), 46191240, "ATTCT"); var reader = new ClinVarXmlReader(Resources.ClinvarXmlFiles("RCV000001054.xml"), sequenceProvider); Assert.False(reader.GetItems().Any()); }
public void RCV000435546_NotMissing() { var sequenceProvider = GetSequenceProvider(GenomeAssembly.GRCh37, new Chromosome("chr12", "12", 11), 110221557, "CGCGG"); var reader = new ClinVarXmlReader(Resources.ClinvarXmlFiles("RCV000435546.xml"), sequenceProvider); var clinVarItems = reader.GetItems(); Assert.True(clinVarItems.Any()); }
public void RemoveDuplicationWithWrongRefSequence() { var sequenceProvider = GetSequenceProvider(GenomeAssembly.GRCh37, new Chromosome("chr3", "3", 1), 10183702, "GCGGCCGCGGCCCG"); var reader = new ClinVarXmlReader(Resources.ClinvarXmlFiles("RCV000267121.xml"), sequenceProvider); Assert.False(reader.GetItems().Any()); }
public void SkipMicrosattelite() { var sequenceProvider = GetSequenceProvider(GenomeAssembly.GRCh37, new Chromosome("chr16", "16", 15), 87637894, "CTG"); var reader = new ClinVarXmlReader(Resources.ClinvarXmlFiles("RCV000005426.xml"), sequenceProvider); Assert.False(reader.GetItems().Any()); }