Пример #1
0
        private void CreateTranscriptDictionary(List <Transcript> transcripts)
        {
            _transcriptsById.Clear();

            foreach (var transcript in transcripts)
            {
                _transcriptsById[TranscriptUtilities.GetTranscriptId(transcript)] = transcript;
            }
        }
Пример #2
0
            public SvOverlapTranscript(DataStructures.Transcript transcript, VariantAlternateAllele altAllele)
            {
                TranscriptID = TranscriptUtilities.GetTranscriptId(transcript);
                IsCanonical  = transcript.IsCanonical ? "true" : null;
                Hgnc         = transcript.Gene.Symbol;
                var isFullOverlap = altAllele.Start <= transcript.Start && altAllele.End >= transcript.End;

                IsPartialOverlap = isFullOverlap ? null : "true";
            }
Пример #3
0
        public void AddFlankingTranscript(Transcript transcript, TranscriptAnnotation ta, string[] consequences)
        {
            _currTranscript = new JsonVariant.Transcript
            {
                IsCanonical  = transcript.IsCanonical ? TrueTag : null,
                Consequence  = consequences,
                ProteinID    = ta.HasValidCdnaCodingStart ? TranscriptUtilities.GetProteinId(transcript) : null,
                TranscriptID = TranscriptUtilities.GetTranscriptId(transcript),
                BioType      = BioTypeUtilities.GetBiotypeDescription(transcript.BioType),
                Gene         = transcript.TranscriptSource == TranscriptDataSource.Ensembl ? transcript.Gene.EnsemblId.ToString() : transcript.Gene.EntrezGeneId.ToString(),
                Hgnc         = transcript.Gene.Symbol
            };

            if (ta.HasValidCdnaStart && ta.HasValidCdnaEnd)
            {
                _currTranscript.ComplementaryDnaPosition = GetCdnaRangeString(ta);
            }

            _currJsonVariant.AddTranscript(_currTranscript, transcript.TranscriptSource);
        }
Пример #4
0
        public void CreateAnnotationObject(Transcript transcript, VariantAlternateAllele altAllele)
        {
            // while annotating alternate allele, the first output function to be called is AddExonData.
            // So, we set the current json variant and transcript here.
            // they will subsequently be used in other output functions.
            FindCorrespondingJsonVariant(altAllele);

            if (_currJsonVariant == null)
            {
                throw new GeneralException("Cannot find jsonVariant corresponding to alternate allele");
            }

            _currTranscript = new JsonVariant.Transcript
            {
                IsCanonical  = transcript.IsCanonical ? TrueTag : null,
                TranscriptID = TranscriptUtilities.GetTranscriptId(transcript),
                BioType      = BioTypeUtilities.GetBiotypeDescription(transcript.BioType),
                Gene         = transcript.TranscriptSource == TranscriptDataSource.Ensembl ? transcript.Gene.EnsemblId.ToString() : transcript.Gene.EntrezGeneId.ToString(),
                Hgnc         = transcript.Gene.Symbol
            };
        }
        public BreakendTranscriptAnnotation(Transcript transcript, int breakendPosition, char isBreakendSuffix)
        {
            var transcriptId = TranscriptUtilities.GetTranscriptId(transcript);

            TranscriptDataSource = transcript.TranscriptSource;

            GeneName = transcript.Gene.Symbol;

            if (transcript.Translation == null || breakendPosition < transcript.Translation.CodingRegion.GenomicStart || breakendPosition > transcript.Translation.CodingRegion.GenomicEnd)
            {
                InCodingRegion = false;
                return;
            }

            InCodingRegion = true;
            var transcriptCdnaLength = transcript.Translation.CodingRegion.CdnaEnd - transcript.Translation.CodingRegion.CdnaStart + 1;

            _referenceName = "chr";
            _codingStart   = transcript.Translation.CodingRegion.GenomicStart;
            _codingEnd     = transcript.Translation.CodingRegion.GenomicEnd;

            // map cdn position
            var complementaryCdnaPosDescription = MapCdnaPosition(transcript, breakendPosition);

            LocateExonIntron(transcript, breakendPosition);

            var transcriptOrientation = transcript.Gene.OnReverseStrand ? '-' : '+';

            ConsistentOrientation = transcriptOrientation == isBreakendSuffix;

            if (ConsistentOrientation)
            {
                HgvsDescription = GeneName + "{" + transcriptId + "}" + ":c." + complementaryCdnaPosDescription + "_" +
                                  transcriptCdnaLength;
            }
            else
            {
                HgvsDescription = GeneName + "{" + transcriptId + "}" + ":c." + 1 + "_" + complementaryCdnaPosDescription;
            }
        }