示例#1
0
        public void ClinvarSignificanceWithComma()
        {
            var saReader = ResourceUtilities.GetSupplementaryAnnotationReader(Resources.MiniSuppAnnot("chrX_76937963_76937963.nsa"));

            VcfUtilities.FieldContains(saReader, "X	76937963	.	G	C	.	.	.",
                                       "conflicting_interpretations_of_pathogenicity\\x2c_not_provided", VcfCommon.InfoIndex);
        }
示例#2
0
        public void DbSnpOutputTest()
        {
            var saReader = ResourceUtilities.GetSupplementaryAnnotationReader(Resources.MiniSuppAnnot("chr1_115256529_115256530.nsa"));

            VcfUtilities.FieldContains(saReader,
                                       "chr1	115256529	.	T	C	1000	PASS	.	GT	0/1", "rs11554290", VcfCommon.IdIndex);
        }
示例#3
0
        public void OneAlleleFreqMissing()
        {
            var sa = new SupplementaryAnnotationPosition(825069);

            var saCreator = new SupplementaryPositionCreator(sa);

            var dbSnp = new DbSnpAnnotation
            {
                DbSnp = new List <long> {
                    4475692
                }
            };

            var oneKg = new OneKGenAnnotation
            {
                OneKgAllAn = 5008,
                OneKgAllAc = 3392
            };

            saCreator.AddExternalDataToAsa(DataSourceCommon.DataSource.DbSnp, "C", dbSnp);
            saCreator.AddExternalDataToAsa(DataSourceCommon.DataSource.OneKg, "C", oneKg);

            var saReader = new MockSupplementaryAnnotationReader(sa);

            VcfUtilities.FieldContains(saReader,
                                       "chr1	825069	rs4475692	G	A,C	362.00	LowGQX;HighDPFRatio	SNVSB=-36.9;SNVHPOL=3	GT:GQ:GQX:DP:DPF:AD	1/2:4:0:52:38:8,11,33",
                                       "AF1000G=.,0.677316", VcfCommon.InfoIndex);
        }
示例#4
0
        public void UnwantedRefMinor()
        {
            var saReader = ResourceUtilities.GetSupplementaryAnnotationReader(Resources.MiniSuppAnnotGRCh38("chr1_26213904_26213905.nsa"));

            VcfUtilities.FieldContains(saReader,
                                       "chr1	26213904	.	C	.	.	LowGQX;HighDPFRatio	.	GT:GQX:DP:DPF	0/0:3:1:1", "RefMinor", VcfCommon.InfoIndex);
        }
示例#5
0
        public void EvsOutputTest()
        {
            var sa = new SupplementaryAnnotationPosition(115256529);

            var dbSnp = new DbSnpAnnotation
            {
                DbSnp = new List <long> {
                    121913237
                }
            };
            var evs = new EvsAnnotation
            {
                EvsAll        = "0.0001",
                EvsCoverage   = "102",
                NumEvsSamples = "3456"
            };

            var saCreator = new SupplementaryPositionCreator(sa);

            saCreator.AddExternalDataToAsa(DataSourceCommon.DataSource.Evs, "C", evs);
            saCreator.AddExternalDataToAsa(DataSourceCommon.DataSource.DbSnp, "C", dbSnp);

            var saReader = new MockSupplementaryAnnotationReader(sa);

            VcfUtilities.FieldContains(saReader,
                                       "chr1\t115256529\t.\tT\tC\t1000\tPASS\t.\tGT\t0/1", "EVS=0.0001|102|3456", VcfCommon.InfoIndex);
        }
示例#6
0
        public void AlleleFrequency1KgOutputTest()
        {
            var sa = new SupplementaryAnnotationPosition(115256529);

            var oneKg = new OneKGenAnnotation
            {
                OneKgAllAn = 5008,
                OneKgAllAc = 2130,
                OneKgAmrAn = 694,
                OneKgAmrAc = 250
            };

            var dbSnp = new DbSnpAnnotation
            {
                DbSnp = new List <long> {
                    11554290
                }
            };

            var saCreator = new SupplementaryPositionCreator(sa);

            saCreator.AddExternalDataToAsa(DataSourceCommon.DataSource.OneKg, "C", oneKg);
            saCreator.AddExternalDataToAsa(DataSourceCommon.DataSource.DbSnp, "C", dbSnp);

            var saReader = new MockSupplementaryAnnotationReader(sa);

            VcfUtilities.FieldContains(saReader,
                                       "chr1\t115256529\t.\tT\tC\t1000\tPASS\t.\tGT\t0/1", "AF1000G=0.425319", VcfCommon.InfoIndex);
        }
示例#7
0
        public void CosmicOutputTest()
        {
            var sa        = new SupplementaryAnnotationPosition(115256529);
            var saCreator = new SupplementaryPositionCreator(sa);
            var altAllele = "C";

            var cosmicItem1 = new CosmicItem("chr1", 115256529, "COSM1000", "T", altAllele, "TP53",
                                             new HashSet <CosmicItem.CosmicStudy> {
                new CosmicItem.CosmicStudy("", "carcinoma", "oesophagus")
            }, 1,
                                             altAllele);

            var cosmicItem2 = new CosmicItem("chr1", 115256529, "COSM1001", "T", altAllele, "TP53",
                                             new HashSet <CosmicItem.CosmicStudy> {
                new CosmicItem.CosmicStudy("01", "carcinoma", "large_intestine")
            }, 1,
                                             altAllele);

            cosmicItem1.AddCosmicToSa(saCreator);
            cosmicItem2.AddCosmicToSa(saCreator);

            var saReader = new MockSupplementaryAnnotationReader(sa);

            VcfUtilities.FieldContains(saReader,
                                       "chr1\t115256529\t.\tT\tC\t1000\tPASS\t.\tGT\t0/1", "cosmic=1|COSM1000", VcfCommon.InfoIndex);
        }
示例#8
0
        public void ClinVarOutputTest()
        {
            var sa = new SupplementaryAnnotationPosition(115256529);

            var clinvarItem1 = new ClinVarItem(null, 0, null, "C", null, "RCV001",
                                               null, null, new List <string> {
                "ORPHA2462"
            }, null, null, "other");

            sa.ClinVarItems.Add(clinvarItem1);

            var saReader = new MockSupplementaryAnnotationReader(sa);

            VcfUtilities.FieldContains(saReader,
                                       "chr1\t115256529\t.\tT\tC\t1000\tPASS\t.\tGT\t0/1", "clinvar=1|other", VcfCommon.InfoIndex);
        }
示例#9
0
        public void DbSnpOutputTest()
        {
            var sa = new SupplementaryAnnotationPosition(115256529);

            var dbSnp = new DbSnpAnnotation
            {
                DbSnp = new List <long> {
                    11554290
                }
            };

            var saCreator = new SupplementaryPositionCreator(sa);

            saCreator.AddExternalDataToAsa(DataSourceCommon.DataSource.DbSnp, "C", dbSnp);

            var saReader = new MockSupplementaryAnnotationReader(sa);

            VcfUtilities.FieldContains(saReader,
                                       "chr1\t115256529\t.\tT\tC\t1000\tPASS\t.\tGT\t0/1", "rs11554290", VcfCommon.IdIndex);
        }
示例#10
0
        public void MultipleDbSnpIds()
        {
            var sa = new SupplementaryAnnotationPosition(115256529);

            var dbSnp = new DbSnpAnnotation
            {
                DbSnp = new List <long> {
                    111, 222, 333
                }
            };

            var saCreator = new SupplementaryPositionCreator(sa);

            saCreator.AddExternalDataToAsa(DataSourceCommon.DataSource.DbSnp, "C", dbSnp);

            var saReader = new MockSupplementaryAnnotationReader(sa);

            VcfUtilities.FieldContains(saReader,
                                       "chr1\t115256529\tMantaFluff\tT\tC\t1000\tPASS\t.\tGT\t0/1", "MantaFluff;rs111;rs222;rs333",
                                       VcfCommon.IdIndex);
        }
示例#11
0
        public void MultiAlleleTest()
        {
            var sa = new SupplementaryAnnotationPosition(4634317);

            var oneKg1 = new OneKGenAnnotation
            {
                AncestralAllele = "C",
                OneKgAllAn      = 5008,
                OneKgAllAc      = 2049
            };

            var oneKg2 = new OneKGenAnnotation
            {
                AncestralAllele = "C",
                OneKgAllAn      = 5008,
                OneKgAllAc      = 1200
            };
            var dbSnp = new DbSnpAnnotation
            {
                DbSnp = new List <long> {
                    11078537
                }
            };

            var saCreator = new SupplementaryPositionCreator(sa);

            saCreator.AddExternalDataToAsa(DataSourceCommon.DataSource.DbSnp, "A", dbSnp);
            saCreator.AddExternalDataToAsa(DataSourceCommon.DataSource.DbSnp, "T", dbSnp);
            saCreator.AddExternalDataToAsa(DataSourceCommon.DataSource.OneKg, "A", oneKg1);
            saCreator.AddExternalDataToAsa(DataSourceCommon.DataSource.OneKg, "T", oneKg2);

            var saReader = new MockSupplementaryAnnotationReader(sa);

            VcfUtilities.FieldContains(saReader,
                                       "17\t4634317\trs11078537\tC\tA,T\t256\tPASS\t.\tGT\t0/1", "AF1000G=0.409145,0.239617", VcfCommon.InfoIndex);
        }