Esempio n. 1
0
        public void GetNotation_tests(int start, int end, string referenceAllele, string altAllele, VariantType type, string expectedHgvsg)
        {
            var simpleVariant = new SimpleVariant(null, start, end, referenceAllele, altAllele, type);
            var observedHgvsg = HgvsgNotation.GetNotation(ReferenceAssertion, simpleVariant, SimpleSequence, _referenceInterval);

            Assert.Equal(expectedHgvsg, observedHgvsg);
        }
Esempio n. 2
0
        /// <summary>
        /// returns true if the specified reference sequence is in the standard reference sequences and in VEP
        /// </summary>
        public void Annotate(IAnnotatedPosition annotatedPosition)
        {
            LoadChromosome(annotatedPosition.Position.Chromosome);
            if (annotatedPosition.AnnotatedVariants == null)
            {
                return;
            }

            annotatedPosition.CytogeneticBand = _cytogeneticBands.GetCytogeneticBand(annotatedPosition.Position.Chromosome, annotatedPosition.Position.Start,
                                                                                     annotatedPosition.Position.End);

            if (annotatedPosition.Position.Chromosome.UcscName != "chrM")
            {
                return;
            }
            const string assertionNumber = "NC_012920.1";

            foreach (var annotatedVariant in annotatedPosition.AnnotatedVariants)
            {
                annotatedVariant.HgvsgNotation = HgvsgNotation.GetNotation(assertionNumber, annotatedVariant.Variant, Sequence, new Interval(0, Sequence.Length));
            }
        }
Esempio n. 3
0
        public void Annotate(IAnnotatedPosition annotatedPosition)
        {
            if (annotatedPosition.AnnotatedVariants == null)
            {
                return;
            }

            annotatedPosition.CytogeneticBand = Sequence.CytogeneticBands.Find(annotatedPosition.Position.Chromosome, annotatedPosition.Position.Start,
                                                                               annotatedPosition.Position.End);

            // we don't want HGVS g. nomenclature for structural variants or STRs
            if (annotatedPosition.Position.HasStructuralVariant || annotatedPosition.Position.HasShortTandemRepeat)
            {
                return;
            }

            string refSeqAccession = annotatedPosition.Position.Chromosome.RefSeqAccession;

            foreach (var annotatedVariant in annotatedPosition.AnnotatedVariants)
            {
                annotatedVariant.HgvsgNotation = HgvsgNotation.GetNotation(refSeqAccession, annotatedVariant.Variant, Sequence, new Interval(0, Sequence.Length));
            }
        }