public void IsAlleleSpecificNotSetJson() { var annotatedVariant = DataUtilities.GetVariant(DataUtilities.EmptyCachePrefix, Resources.MiniSuppAnnot("chr1_24122986_24122987.nsa"), "1 24122986 rs760941 C G,T . . ."); Assert.NotNull(annotatedVariant); var altAllele = JsonUtilities.GetAllele(annotatedVariant); Assert.NotNull(altAllele); var altAllele2 = JsonUtilities.GetAllele(annotatedVariant, 1); Assert.NotNull(altAllele2); const string asClinVar = "\"clinVar\":[{\"id\":\"RCV000078694.4\",\"reviewStatus\":\"criteria provided, single submitter\",\"isAlleleSpecific\":true"; const string asCosmic = "\"cosmic\":[{\"id\":\"COSN1100872\",\"isAlleleSpecific\":true"; Assert.DoesNotContain(asClinVar, altAllele); Assert.Contains(asCosmic, altAllele); Assert.Contains(asClinVar, altAllele2); Assert.DoesNotContain(asCosmic, altAllele2); //Assert.True(observedJsonLine.Contains("cosmic\":[{\"id\":\"COSN1100872\",\"refAllele\":\"C\",\"altAllele\":\"G\",\"gene\":\"GALE\"},{\"id\":\"COSN1100873\",\"refAllele\":\"C\",\"altAllele\":\"G\",\"gene\":\"GALE\"}]")); }
public void CosmicIndel() { var annotatedVariant = DataUtilities.GetVariant(DataUtilities.EmptyCachePrefix, Resources.MiniSuppAnnot("chr4_55589767_55589770.nsa"), "4 55589767 . ACTTACGACAGG AGCGTCATTGTGG . . ."); Assert.NotNull(annotatedVariant); var altAllele = JsonUtilities.GetAllele(annotatedVariant); Assert.NotNull(altAllele); var json = altAllele; Assert.Contains("\"id\":\"COSM1148\"", json); Assert.Contains("\"id\":\"COSM1149\"", json); Assert.Contains("\"id\":\"COSM1150\"", json); Assert.Contains("\"id\":\"COSM1151\"", json); Assert.Contains("\"id\":\"COSM22397\"", json); Assert.Contains("\"id\":\"COSM29819\"", json); Assert.Contains("\"id\":\"COSM30709\"", json); Assert.Contains("\"id\":\"COSM30711\"", json); Assert.Contains("\"id\":\"COSM34145\"", json); Assert.Equal(11, DataUtilities.GetCount(json, "\"gene\":\"KIT\"")); Assert.Equal(11, DataUtilities.GetCount(json, "\"histology\":\"haematopoietic neoplasm\"")); Assert.Equal(11, DataUtilities.GetCount(json, "\"primarySite\":\"haematopoietic and lymphoid tissue\"")); }
public void ExacClearing() { var annotatedVariant = DataUtilities.GetVariant(DataUtilities.EmptyCachePrefix, Resources.MiniSuppAnnot("chr9_21974694_21974696.nsa"), "9 21974694 . CGT C,CT 5216.02 PASS ."); Assert.NotNull(annotatedVariant); var altAllele = JsonUtilities.GetAllele(annotatedVariant); var altAllele2 = annotatedVariant.AnnotatedAlternateAlleles.ElementAt(1); Assert.Contains("exac", altAllele); Assert.DoesNotContain("exac", altAllele2.ToString()); }
public void ClinvarBlankRefAllele() { var annotatedVariant = DataUtilities.GetVariant(DataUtilities.EmptyCachePrefix, Resources.MiniSuppAnnot("chrX_17705850_17705851.nsa"), "chrX 17705850 . C CT 222 PASS CIGAR=1M2D"); Assert.NotNull(annotatedVariant); var altAllele = JsonUtilities.GetAllele(annotatedVariant); Assert.NotNull(altAllele); Assert.True(altAllele.Contains("\"clinVar\":[{\"id\":\"RCV000082806.4\",\"reviewStatus\":\"criteria provided, single submitter\",\"isAlleleSpecific\":true,\"alleleOrigins\":[\"germline\"],\"refAllele\":\"-\",\"altAllele\":\"T\",\"phenotypes\":[\"not specified\"],\"medGenIDs\":[\"CN169374\"],\"significance\":\"benign\",\"lastUpdatedDate\":\"2016-08-26\",\"pubMedIds\":[\"23757202\"]}]")); }
public void ClinVarUnknownAlleleShouldNotBeReported() { var annotatedVariant = DataUtilities.GetVariant(DataUtilities.EmptyCachePrefix, Resources.MiniSuppAnnot("chr13_40298637_40298638.nsa"), "chr13 40298637 . TTA T 222 PASS CIGAR=1M2D"); Assert.NotNull(annotatedVariant); var altAllele = JsonUtilities.GetAllele(annotatedVariant); Assert.NotNull(altAllele); Assert.DoesNotContain("clinVar", altAllele); }
public void RefMinorMissingCosmic() { var annotatedVariant = DataUtilities.GetVariant(DataUtilities.EmptyCachePrefix, Resources.MiniSuppAnnot("chrX_144904882_144904882.nsa"), "X 144904882 . T . . PASS RefMinor;phyloP=-0.312 GT:GQX:DP:DPF:AD 0:509:35:2:35"); Assert.NotNull(annotatedVariant); var altAllele = JsonUtilities.GetAllele(annotatedVariant); Assert.NotNull(altAllele); Assert.Equal( "{\"refAllele\":\"T\",\"begin\":144904882,\"chromosome\":\"X\",\"end\":144904882,\"globalMinorAllele\":\"T\",\"gmaf\":0.04185,\"isReferenceMinorAllele\":true,\"variantType\":\"SNV\",\"vid\":\"X:144904882:T\",\"cosmic\":[{\"id\":\"COSM391442\",\"refAllele\":\"T\",\"altAllele\":\"-\",\"gene\":\"SLITRK2\",\"sampleCount\":1,\"studies\":[{\"histology\":\"carcinoma\",\"primarySite\":\"lung\"}]}]}", altAllele); }
public void DuplicateClinVarJson() { var annotatedVariant = DataUtilities.GetVariant(DataUtilities.EmptyCachePrefix, Resources.MiniSuppAnnot("chr11_5247992_5247994.nsa"), "11 5247992 rs281864900 CAAAG C . . RS=281864900;RSPOS=5247993;RV"); Assert.NotNull(annotatedVariant); var altAllele = JsonUtilities.GetAllele(annotatedVariant); Assert.NotNull(altAllele); Assert.Equal( "{\"altAllele\":\"-\",\"refAllele\":\"AAAG\",\"begin\":5247993,\"chromosome\":\"11\",\"dbsnp\":[\"rs281864900\",\"rs80356821\"],\"end\":5247996,\"variantType\":\"deletion\",\"vid\":\"11:5247993:5247996\",\"clinVar\":[{\"id\":\"RCV000016277.3\",\"reviewStatus\":\"no assertion criteria provided\",\"alleleOrigins\":[\"germline\"],\"refAllele\":\"AAA\",\"altAllele\":\"-\",\"phenotypes\":[\"Hemoglobinopathy\"],\"medGenIDs\":[\"C0019045\"],\"significance\":\"pathogenic\",\"lastUpdatedDate\":\"2016-08-26\",\"pubMedIds\":[\"2599881\"]},{\"id\":\"RCV000020328.1\",\"reviewStatus\":\"no assertion criteria provided\",\"isAlleleSpecific\":true,\"alleleOrigins\":[\"not provided\"],\"refAllele\":\"AAAG\",\"altAllele\":\"-\",\"phenotypes\":[\"alpha Thalassemia\"],\"medGenIDs\":[\"C0002312\"],\"omimIDs\":[\"604131\"],\"orphanetIDs\":[\"846\"],\"significance\":\"pathogenic\",\"lastUpdatedDate\":\"2016-08-29\"},{\"id\":\"RCV000016278.26\",\"reviewStatus\":\"no assertion criteria provided\",\"alleleOrigins\":[\"germline\"],\"refAllele\":\"AAA\",\"altAllele\":\"-\",\"phenotypes\":[\"Heinz body anemia\"],\"medGenIDs\":[\"C0700299\"],\"omimIDs\":[\"140700\"],\"orphanetIDs\":[\"178330\"],\"significance\":\"pathogenic\",\"lastUpdatedDate\":\"2016-08-26\",\"pubMedIds\":[\"2599881\"]},{\"id\":\"RCV000016673.26\",\"reviewStatus\":\"no assertion criteria provided\",\"isAlleleSpecific\":true,\"alleleOrigins\":[\"germline\"],\"refAllele\":\"AAAG\",\"altAllele\":\"-\",\"phenotypes\":[\"beta^0^ Thalassemia\"],\"medGenIDs\":[\"C0271980\"],\"significance\":\"pathogenic\",\"lastUpdatedDate\":\"2016-08-26\",\"pubMedIds\":[\"4719677\",\"6714226\",\"6826539\",\"9113933\",\"12000828\",\"12383672\"]}],\"oneKgAll\":0.000998,\"oneKgAfr\":0,\"oneKgAmr\":0,\"oneKgEas\":0.00496,\"oneKgEur\":0,\"oneKgSas\":0,\"oneKgAllAn\":5008,\"oneKgAfrAn\":1322,\"oneKgAmrAn\":694,\"oneKgEasAn\":1008,\"oneKgEurAn\":1006,\"oneKgSasAn\":978,\"oneKgAllAc\":5,\"oneKgAfrAc\":0,\"oneKgAmrAc\":0,\"oneKgEasAc\":5,\"oneKgEurAc\":0,\"oneKgSasAc\":0,\"exacCoverage\":51,\"exacAll\":0.000272,\"exacAfr\":0,\"exacAmr\":0,\"exacEas\":0.002201,\"exacFin\":0,\"exacNfe\":0,\"exacOth\":0.001101,\"exacSas\":0.000787,\"exacAllAn\":121370,\"exacAfrAn\":10404,\"exacAmrAn\":11562,\"exacEasAn\":8632,\"exacFinAn\":6614,\"exacNfeAn\":66738,\"exacOthAn\":908,\"exacSasAn\":16512,\"exacAllAc\":33,\"exacAfrAc\":0,\"exacAmrAc\":0,\"exacEasAc\":19,\"exacFinAc\":0,\"exacNfeAc\":0,\"exacOthAc\":1,\"exacSasAc\":13}", altAllele); }
public void Wrong1000GArbitration() { var annotatedVariant = DataUtilities.GetVariant(DataUtilities.EmptyCachePrefix, Resources.MiniSuppAnnot("chr12_17752945_17752946.nsa"), "12 17752945 rs113134577 TTGTA T 100 PASS AC=1426;AF=0.284744;"); Assert.NotNull(annotatedVariant); var altAllele = JsonUtilities.GetAllele(annotatedVariant); Assert.NotNull(altAllele); Assert.Equal( "{\"altAllele\":\"-\",\"refAllele\":\"TGTA\",\"begin\":17752946,\"chromosome\":\"12\",\"dbsnp\":[\"rs113134577\",\"rs200438154\",\"rs74874317\",\"rs780786944\"],\"end\":17752949,\"variantType\":\"deletion\",\"vid\":\"12:17752946:17752949\"}", altAllele); }
public void ClinVarUnknownAllele() { var annotatedVariant = DataUtilities.GetVariant(DataUtilities.EmptyCachePrefix, Resources.MiniSuppAnnotGRCh38("chr13_39724500_39724501.nsa"), "chr13 39724500 . TTA T 222 PASS CIGAR=1M2D"); Assert.NotNull(annotatedVariant); var altAllele = JsonUtilities.GetAllele(annotatedVariant); Assert.NotNull(altAllele); Assert.Equal( "{\"altAllele\":\"-\",\"refAllele\":\"TA\",\"begin\":39724501,\"chromosome\":\"chr13\",\"dbsnp\":[\"rs796887249\"],\"end\":39724502,\"globalMinorAllele\":\"A\",\"gmaf\":0.008786,\"variantType\":\"deletion\",\"vid\":\"13:39724501:39724502\",\"cosmic\":[{\"id\":\"COSM4214738\",\"refAllele\":\"T\",\"altAllele\":\"A\",\"gene\":\"COG6\",\"sampleCount\":1,\"studies\":[{\"id\":646,\"histology\":\"carcinoma\",\"primarySite\":\"large intestine\"}]},{\"id\":\"COSM3730300\",\"isAlleleSpecific\":true,\"refAllele\":\"TA\",\"altAllele\":\"-\",\"gene\":\"COG6\",\"sampleCount\":1,\"studies\":[{\"histology\":\"carcinoma\",\"primarySite\":\"oesophagus\"}]},{\"id\":\"COSM3730301\",\"isAlleleSpecific\":true,\"refAllele\":\"TA\",\"altAllele\":\"-\",\"gene\":\"COG6_ENST00000416691\",\"sampleCount\":1,\"studies\":[{\"histology\":\"carcinoma\",\"primarySite\":\"oesophagus\"}]},{\"id\":\"COSM4214739\",\"refAllele\":\"T\",\"altAllele\":\"A\",\"gene\":\"COG6_ENST00000416691\",\"sampleCount\":1,\"studies\":[{\"id\":646,\"histology\":\"carcinoma\",\"primarySite\":\"large intestine\"}]}]}", altAllele); }
public void ConservationScoreTest2() { var saReader = ResourceUtilities.GetSupplementaryAnnotationReader(Resources.MiniSuppAnnot("chr1_13528_13529.nsa")); var csReader = new MockConservationScoreReader(ResourceUtilities.GetReadStream(Resources.TopPath("chr1_10918_150000.npd"))); var annotatedVariant = DataUtilities.GetVariant(DataUtilities.EmptyCachePrefix, saReader, "1 13528 . C G,CT 1771.54 VQSRTrancheSNP99.60to99.80 AC=21,11;AC_AFR=12,0", csReader); Assert.NotNull(annotatedVariant); var altAllele = JsonUtilities.GetAllele(annotatedVariant); Assert.NotNull(altAllele); var altAllele2 = JsonUtilities.GetAllele(annotatedVariant, 1); Assert.NotNull(altAllele2); Assert.Contains("\"phylopScore\":0.81", altAllele); Assert.DoesNotContain("\"phylopScore\"", altAllele2); }
public void FirstExacTest() { var annotatedVariant = DataUtilities.GetVariant(DataUtilities.EmptyCachePrefix, Resources.MiniSuppAnnot("chr1_13528_13529.nsa"), "1 13528 . C G,T 1771.54 VQSRTrancheSNP99.60to99.80 AC=21,11;AC_AFR=12,0"); Assert.NotNull(annotatedVariant); var altAllele = JsonUtilities.GetAllele(annotatedVariant); Assert.NotNull(altAllele); var altAllele2 = JsonUtilities.GetAllele(annotatedVariant, 1); Assert.NotNull(altAllele2); Assert.Contains("\"exacCoverage\":28,\"exacAll\":0.001247,\"exacAfr\":0.030769,\"exacAmr\":0.008621,\"exacEas\":0,\"exacFin\":0,\"exacNfe\":0,\"exacOth\":0,\"exacSas\":0", altAllele); Assert.Contains("\"exacCoverage\":28,\"exacAll\":0.000863,\"exacAfr\":0,\"exacAmr\":0,\"exacEas\":0,\"exacFin\":0,\"exacNfe\":0.000765,\"exacOth\":0,\"exacSas\":0.000995", altAllele2); }
public void MissingCosmicId() { var annotatedVariant = DataUtilities.GetVariant(DataUtilities.EmptyCachePrefix, Resources.MiniSuppAnnot("chr1_26608814_26608815.nsa"), "1 26608811 . TCCAGGACAGGGACTGGGGCCGGGACCGGGACC TCCGGGACC,TCCAGGACA 139 LowGQXHetAltDel CIGAR=1M24D8M,9M24"); Assert.NotNull(annotatedVariant); AssertUtilities.CheckAlleleCount(2, annotatedVariant); var altAllele = JsonUtilities.GetAllele(annotatedVariant); var altAllele2 = JsonUtilities.GetAllele(annotatedVariant, 1); Assert.Contains( "\"cosmic\":[{\"id\":\"COSM4143711\",\"refAllele\":\"A\",\"altAllele\":\"G\",\"gene\":\"UBXN11\",\"sampleCount\":22,\"studies\":[{\"histology\":\"carcinoma\",\"primarySite\":\"upper aerodigestive tract\"},{\"id\":589,\"histology\":\"other\",\"primarySite\":\"thyroid\"}]}]", altAllele); Assert.DoesNotContain("\"cosmic\":", altAllele2); }