Пример #1
0
        public void IntergenicVariant()
        {
            var sa = new SupplementaryAnnotationPosition(47960)
            {
                IsRefMinorAllele           = true,
                GlobalMajorAllele          = "A",
                GlobalMajorAlleleFrequency = "0.9239"
            };

            var saReader = new MockSupplementaryAnnotationReader(sa);

            var annotatedVariant = DataUtilities.GetVariant(Resources.CacheGRCh37("ENST00000518655_chr1_Ensembl84"), saReader,
                                                            "chr1	47960	.	T	.	1242.00	PASS	SNVSB=-87.0;SNVHPOL=3");

            Assert.NotNull(annotatedVariant);
            Assert.Contains("\"isReferenceMinorAllele\":true", annotatedVariant.ToString());

            var altAllele = annotatedVariant.AnnotatedAlternateAlleles.FirstOrDefault();

            Assert.NotNull(altAllele);

            // intergenic variant are not exposed in the JSON file
            AssertUtilities.CheckEnsemblTranscriptCount(0, altAllele);
            AssertUtilities.CheckRefSeqTranscriptCount(0, altAllele);
        }
Пример #2
0
        public void DuplicatedTranscripts()
        {
            var annotatedVariant = DataUtilities.GetVariant(Resources.CacheGRCh37("ENST00000483270_chr1_Ensembl84"),
                                                            "1	15910881	MantaBND:17185:0:1:0:9:0:0	G	[2:86827867[G	.	MinSomaticScore SVTYPE=BND;MATEID=MantaBND:17185:0:1:0:9:0:1;CIPOS=0,7;HOMLEN=7;HOMSEQ=TGATCCG;SOMATIC;SOMATICSCORE=19;BND_DEPTH=26;MATE_BND_DEPTH=21 PR:SR	30,0:20,0	64,2:173,8");

            Assert.NotNull(annotatedVariant);

            AssertUtilities.CheckAlleleCount(1, annotatedVariant);

            var altAllele = annotatedVariant.AnnotatedAlternateAlleles.First();

            AssertUtilities.CheckEnsemblTranscriptCount(1, altAllele);
        }
Пример #3
0
        public void UnwantedTranscriptInsertion()
        {
            var annotatedVariant = DataUtilities.GetVariant(Resources.CacheGRCh37("chr2_216305895_T_TAA_Ensembl84_pos"),
                                                            "chr2\t216305895\t.\tT\tTAA\t130.00\tPASS\t.");

            Assert.NotNull(annotatedVariant);

            var altAllele = annotatedVariant.AnnotatedAlternateAlleles.FirstOrDefault();

            Assert.NotNull(altAllele);

            AssertUtilities.CheckEnsemblTranscriptCount(1, altAllele);
        }
Пример #4
0
        public void FuzzyInsertion()
        {
            var annotatedVariant = DataUtilities.GetVariant(Resources.CacheGRCh38("ENST00000471857_chr2_Ensembl84"), null,
                                                            "chr2\t90221381\tMantaINS:49750:2:2:0:6:0\tC\t<INS>\t282\tPASS\tEND=90221390;SVTYPE=INS;LEFT_SVINSSEQ=CCGTGGCCACTCAGTTTTAGCGTCTCTGCTCTATTTGGACATTTTGCAGTTCT;RIGHT_SVINSSEQ=GATGTTGCAACTTATTACGGTCAACGGACTTACAATGCCCCTGA;DQ=0\tGT:FT:GQ:PL:PR:SR\t0/1:PASS:107:157,0,975:1,0:19,7\t0/1:PASS:175:225,0,730:1,0:14,7\t0/0:PASS:112:0,62,899:1,0:14,0");

            Assert.NotNull(annotatedVariant);

            AssertUtilities.CheckAlleleCount(1, annotatedVariant);

            var altAllele = annotatedVariant.AnnotatedAlternateAlleles.First();

            Assert.NotNull(altAllele);

            AssertUtilities.CheckEnsemblTranscriptCount(1, altAllele);
        }
Пример #5
0
        public void NoConsequences()
        {
            var annotatedVariant = DataUtilities.GetVariant(Resources.CacheGRCh37("chr1_115256529_G_TAA_RefSeq84_pos"),
                                                            "chr1	115256529	.	T	.	.	PASS	.	GT:GQX:DP:DPF	0/0:99:34:2");

            Assert.NotNull(annotatedVariant);
            Assert.DoesNotContain("\"isReferenceMinorAllele\":true", annotatedVariant.ToString());

            var altAllele = annotatedVariant.AnnotatedAlternateAlleles.FirstOrDefault();

            Assert.NotNull(altAllele);

            // intergenic variant are not exposed in the JSON file
            AssertUtilities.CheckEnsemblTranscriptCount(0, altAllele);
            AssertUtilities.CheckRefSeqTranscriptCount(0, altAllele);
        }
Пример #6
0
        public void DisableMitochondrialAnnotation()
        {
            var annotatedVariant = DataUtilities.GetVariant(Resources.CacheGRCh37("ENST00000387314_chrM_Ensembl84"), null,
                                                            "MT	589	.	C	A	.	PASS	.	.	.");

            Assert.NotNull(annotatedVariant);

            AssertUtilities.CheckAlleleCount(1, annotatedVariant);

            var altAllele = annotatedVariant.AnnotatedAlternateAlleles.First();

            Assert.NotNull(altAllele);

            AssertUtilities.CheckEnsemblTranscriptCount(0, altAllele);
            Assert.DoesNotContain("ENST00000387314", altAllele.ToString());
        }
Пример #7
0
        public void TranscriptInsertion5000()
        {
            var annotatedVariant = DataUtilities.GetVariant(Resources.CacheGRCh37("chr1_51801236_A_AA_Ensembl84_pos"),
                                                            "chr1\t51801235\t.\tCA\tCAA,C\t134.00\tPASS\t.");

            Assert.NotNull(annotatedVariant);

            var altAllele = annotatedVariant.AnnotatedAlternateAlleles.ElementAt(0);

            Assert.NotNull(altAllele);

            AssertUtilities.CheckEnsemblTranscriptCount(7, altAllele);

            altAllele = annotatedVariant.AnnotatedAlternateAlleles.ElementAt(1);
            Assert.NotNull(altAllele);

            AssertUtilities.CheckEnsemblTranscriptCount(8, altAllele);
        }
        public void UpstreamGeneVariant()
        {
            var annotatedVariant = DataUtilities.GetVariant(Resources.CacheGRCh37("ENST00000576171_chr17_Ensembl84"),
                Resources.MiniSuppAnnot("chr17_46107_46108.nsa"),
                "17	46107	.	A	.	153	LowGQX	SNVSB=-20.1;SNVHPOL=4;GMAF=G|0.9988;RefMinor;CSQT=A||ENST00000576171|upstream_gene_variant	GT:GQ:GQX:DP:DPF:AD	1/1:18:18:7:0:0,7");
            Assert.NotNull(annotatedVariant);

            var altAllele = annotatedVariant.AnnotatedAlternateAlleles.First();
            Assert.NotNull(altAllele);

            AssertUtilities.CheckEnsemblTranscriptCount(1, altAllele);

            var transcript = altAllele.EnsemblTranscripts.FirstOrDefault();
            Assert.NotNull(transcript);

            // ReSharper disable once AssignNullToNotNullAttribute
            Assert.Equal("upstream_gene_variant", string.Join("&", transcript.Consequence));
        }
Пример #9
0
        public void RepeatExpansionNoConsequence()
        {
            var annotatedVariant = DataUtilities.GetVariant(Resources.CacheGRCh37("ENST00000601841_chrX_Ensembl84"), "chrX	146993568	FMR1	G	<REPEAT:EXPANSION>	1.0	NoSuppReads	REPEAT_COUNT1=30,33");

            Assert.NotNull(annotatedVariant);

            var altAllele = annotatedVariant.AnnotatedAlternateAlleles.First();

            Assert.NotNull(altAllele);

            AssertUtilities.CheckEnsemblTranscriptCount(1, altAllele);

            var transcript = altAllele.EnsemblTranscripts.FirstOrDefault();

            Assert.NotNull(transcript);

            // ReSharper disable once PossibleNullReferenceException
            var          observedConsequence = string.Join("&", transcript.Consequence);
            const string expectedConsequence = "upstream_gene_variant";

            Assert.Equal(expectedConsequence, observedConsequence);
        }
Пример #10
0
        public void IntronNumbers()
        {
            var annotatedVariant = DataUtilities.GetVariant(Resources.CacheGRCh37("ENST00000380060_chrX_Ensembl84"),
                                                            "chrX	17705850	rs397759640;rs5901624	C	CT	1815.96	PASS	.	.	.");

            Assert.NotNull(annotatedVariant);

            AssertUtilities.CheckAlleleCount(1, annotatedVariant);

            var altAllele = annotatedVariant.AnnotatedAlternateAlleles.First();

            Assert.NotNull(altAllele);

            AssertUtilities.CheckEnsemblTranscriptCount(1, altAllele);

            var transcript = altAllele.EnsemblTranscripts.FirstOrDefault();

            Assert.NotNull(transcript);

            Assert.Equal("1/7", transcript.Introns);

            AssertUtilities.CheckJsonContains("\"introns\":\"1/7\"", annotatedVariant);
        }