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); }
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 }; }