public static IAnnotatedTranscript GetAnnotatedTranscript(ITranscript transcript, IVariant leftShiftedVariant, ISequence refSequence, IPredictionCache siftCache, IPredictionCache polyphenCache, AminoAcids aminoAcids) { var rightShiftedVariant = VariantRotator.Right(leftShiftedVariant, transcript, refSequence, transcript.Gene.OnReverseStrand); var leftAnnotation = AnnotateTranscript(transcript, leftShiftedVariant, aminoAcids, refSequence); var rightAnnotation = ReferenceEquals(leftShiftedVariant, rightShiftedVariant) ? leftAnnotation : AnnotateTranscript(transcript, rightShiftedVariant, aminoAcids, refSequence); var consequences = GetConsequences(transcript, leftShiftedVariant, leftAnnotation.VariantEffect); var hgvsCoding = HgvsCodingNomenclature.GetHgvscAnnotation(transcript, rightShiftedVariant, refSequence, rightAnnotation.Position.RegionStartIndex, rightAnnotation.Position.RegionEndIndex); var hgvsProtein = HgvsProteinNomenclature.GetHgvsProteinAnnotation(transcript, rightAnnotation.RefAminoAcids, rightAnnotation.AltAminoAcids, rightAnnotation.TranscriptAltAllele, rightAnnotation.Position, rightAnnotation.VariantEffect, rightShiftedVariant, refSequence, hgvsCoding, leftShiftedVariant.Chromosome.UcscName == "chrM"); var predictionScores = GetPredictionScores(leftAnnotation.Position, leftAnnotation.RefAminoAcids, leftAnnotation.AltAminoAcids, siftCache, polyphenCache, transcript.SiftIndex, transcript.PolyPhenIndex); return(new AnnotatedTranscript(transcript, leftAnnotation.RefAminoAcids, leftAnnotation.AltAminoAcids, leftAnnotation.RefCodons, leftAnnotation.AltCodons, leftAnnotation.Position, hgvsCoding, hgvsProtein, predictionScores.Sift, predictionScores.PolyPhen, consequences, false)); }
AnnotateTranscript(ITranscript transcript, IVariant variant, ITranscript[] geneFusionCandidates) { var position = GetMappedPosition(transcript.TranscriptRegions, variant); var geneFusionAnnotation = GeneFusionUtilities.GetGeneFusionAnnotation(variant.BreakEnds, transcript, geneFusionCandidates); return(position, geneFusionAnnotation); }
private static string GetHgvsFrameshiftNotation(ISequence refSequence, int cdsBegin, int cdsEnd, string transcriptAltAllele, ITranscript transcript, bool isMitochondrial, string proteinId, int start, int end) { var peptideSeq = transcript.Translation.PeptideSeq; var altPeptideSeq = HgvsUtilities.GetAltPeptideSequence(refSequence, cdsBegin, cdsEnd, transcriptAltAllele, transcript, isMitochondrial); if (start > end) { Swap.Int(ref start, ref end); } var frameshiftedParameters = HgvsUtilities.GetChangesAfterFrameshift(start, peptideSeq, altPeptideSeq); start = frameshiftedParameters.Item1; var refAminoAcid = frameshiftedParameters.Item2; var altAminoAcid = frameshiftedParameters.Item3; var refAbbreviation = AminoAcids.ConvertAminoAcidToAbbreviation(refAminoAcid); if (altAminoAcid == AminoAcids.StopCodonChar) { return(HgvspNotation.GetSubstitutionNotation(proteinId, start, refAbbreviation, "Ter")); } var altAbbreviation = AminoAcids.ConvertAminoAcidToAbbreviation(altAminoAcid); var countToStop = HgvsUtilities.GetNumAminoAcidsUntilStopCodon(altPeptideSeq, peptideSeq, start - 1, true); return(HgvspNotation.GetFrameshiftNotation(proteinId, start, refAbbreviation, altAbbreviation, countToStop)); }
internal static ITranscript UpdatePredictions(this ITranscript t, int siftIndex, int polyphenIndex) { return(new Transcript(t.Chromosome, t.Start, t.End, t.Id, t.Translation, t.BioType, t.Gene, t.TotalExonLength, t.StartExonPhase, t.IsCanonical, t.TranscriptRegions, t.NumExons, t.MicroRnas, siftIndex, polyphenIndex, t.Source, t.CdsStartNotFound, t.CdsEndNotFound, t.Selenocysteines, t.RnaEdits)); }
public static IAnnotatedTranscript GetAnnotatedTranscript(int variantEnd, ITranscript transcript) { bool isDownStream = variantEnd < transcript.Start == transcript.Gene.OnReverseStrand; List <ConsequenceTag> consequences = Consequences.DetermineFlankingVariantEffects(isDownStream); return(new AnnotatedTranscript(transcript, null, null, null, null, null, null, null, null, null, consequences, false)); }
private static IAnnotatedTranscript GetAnnotatedTranscript(IVariant variant, ISequence compressedSequence, ITranscript transcript, Status annotationStatus, IPredictionCache siftCache, IPredictionCache polyphenCache) { IAnnotatedTranscript annotatedTranscript = null; // ReSharper disable once SwitchStatementMissingSomeCases switch (annotationStatus) { case Status.FlankingAnnotation: annotatedTranscript = FlankingTranscriptAnnotator.GetAnnotatedTranscript(variant.End, transcript); break; case Status.ReducedAnnotation: annotatedTranscript = ReducedTranscriptAnnotator.GetAnnotatedTranscript(transcript, variant); break; case Status.RohAnnotation: annotatedTranscript = RohTranscriptAnnotator.GetAnnotatedTranscript(transcript); break; case Status.FullAnnotation: var acidsProvider = variant.Chromosome.UcscName == "chrM" ? MitoAminoAcidsProvider : AminoAcidsProvider; annotatedTranscript = FullTranscriptAnnotator.GetAnnotatedTranscript(transcript, variant, compressedSequence, siftCache, polyphenCache, acidsProvider); break; } return(annotatedTranscript); }
public void DetermineExonicEffect(ITranscript transcript, IInterval variant, IMappedPosition position, int coveredCdnaStart, int coveredCdnaEnd, int coveredCdsStart, int coveredCdsEnd, string altAllele, bool startCodonInsertionWithNoImpact) { HasExonOverlap = position.ExonStart != -1 || position.ExonEnd != -1; if (transcript.Translation != null) { var codingRegion = transcript.Translation.CodingRegion; AfterCoding = IsAfterCoding(variant.Start, variant.End, transcript.End, codingRegion.End); BeforeCoding = IsBeforeCoding(variant.Start, variant.End, transcript.Start, codingRegion.Start); WithinCds = IsWithinCds(coveredCdsStart, coveredCdsEnd, codingRegion, variant); IsCoding = !startCodonInsertionWithNoImpact && (position.CdsStart != -1 || position.CdsEnd != -1); } WithinCdna = IsWithinCdna(coveredCdnaStart, coveredCdnaEnd, transcript.TotalExonLength); if (coveredCdsStart != -1 && coveredCdsEnd != -1) { var varLen = coveredCdsEnd - coveredCdsStart + 1; var alleleLen = altAllele?.Length ?? 0; HasFrameShift = position.CdsStart != -1 && position.CdsEnd != -1 && !Codons.IsTriplet(alleleLen - varLen); } OverlapWithMicroRna = IsMatureMirnaVariant(position.CdnaStart, position.CdnaEnd, transcript.MicroRnas, transcript.BioType == BioType.miRNA); }
public VariantEffect(TranscriptPositionalEffect transcriptEffect, ISimpleVariant variant, ITranscript transcript, string referenAminoAcids, string alternateAminoAcids, string referenceCodons, string alternateCodons, int?proteinBegin, string coveredReferenceAminoAcids, string coveredAlternateAminoAcids, VariantEffectCache cache = null) { _transcript = transcript; _variant = variant; _preCache = transcriptEffect; _cache = cache ?? new VariantEffectCache(); _referenceAminoAcids = referenAminoAcids; _alternateAminoAcids = alternateAminoAcids; _referenceAminoAcidsLen = _referenceAminoAcids?.Length ?? 0; _alternateAminoAcidsLen = _alternateAminoAcids?.Length ?? 0; _coveredReferenceAminoAcids = coveredReferenceAminoAcids; _coveredAlternateAminoAcids = coveredAlternateAminoAcids; _referenceCodons = referenceCodons; _alternateCodons = alternateCodons; _referenceCodonsLen = _referenceCodons?.Length ?? 0; _alternateCodonsLen = _alternateCodons?.Length ?? 0; _isInsertion = variant.AltAllele.Length > variant.RefAllele.Length; _isDeletion = variant.AltAllele.Length < variant.RefAllele.Length; _proteinBegin = proteinBegin ?? -1; }
public void OnStarted() { if (m_transcript == null) m_transcript = m_boss.Get<ITranscript>(); m_transcript.Show(); }
public Debugger(ProcessStartInfo info, bool breakInMain) { Contract.Requires(info != null, "info is null"); ActiveObjects.Add(this); m_thread = new DebuggerThread(this, breakInMain); Boss boss = ObjectModel.Create("Application"); m_transcript = boss.Get<ITranscript>(); StepBy = StepSize.Line; var options = new LaunchOptions(); // options.AgentArgs = "loglevel=1,logfile='/Users/jessejones/Source/Continuum/sdb.log'"; // We do this lame assignment to a static so that OnLaunched can be made a static // method. Mono 2.6.7 doesn't GC asynchronously invoked delegates in a timely fashion // (tho it does appear to collect them if more than ten stack up). ms_debugger = this; Unused.Value = VirtualMachineManager.BeginLaunch(info, Debugger.OnLaunched, options); Broadcaster.Register("added breakpoint", this); Broadcaster.Register("removing breakpoint", this); Broadcaster.Register("toggled exceptions", this); ms_running = true; }
private static IInterval[] ConstructCdsIntervalsFromTranscript(ITranscript transcript) { var cdsIntervals = new List <IInterval>(); if (transcript.Translation == null) { return(null); } ICodingRegion codingRegion = transcript.Translation.CodingRegion; List <ITranscriptRegion> exonRegions = transcript.TranscriptRegions.Where(x => x.Type == TranscriptRegionType.Exon).ToList(); if (codingRegion == null) { return(null); // no coding region } foreach (var exonRegion in exonRegions) // assume the exon regions are ordered { var exonCodingRegion = exonRegion.Intersects(codingRegion); if (exonCodingRegion.Start == -1) { continue; } cdsIntervals.Add(new Interval(exonCodingRegion.Start, exonCodingRegion.End)); } return(cdsIntervals.ToArray()); }
public static IAnnotatedTranscript GetAnnotatedTranscript(ITranscript transcript, IVariant variant, ITranscript[] geneFusionCandidates) { var annotation = AnnotateTranscript(transcript, variant, geneFusionCandidates); var consequences = GetConsequences(transcript, variant, annotation.GeneFusion != null); return(new AnnotatedTranscript(transcript, null, null, null, null, annotation.Position, null, null, null, null, consequences, annotation.GeneFusion, false)); }
public static string GetHgvscAnnotation(ITranscript transcript, ISimpleVariant variant, ISequence refSequence, int regionStart, int regionEnd) { // sanity check: don't try to handle odd characters, make sure this is not a reference allele, // and make sure that we have protein coordinates if (variant.Type == VariantType.reference || SequenceUtilities.HasNonCanonicalBase(variant.AltAllele)) { return(null); } var onReverseStrand = transcript.Gene.OnReverseStrand; var refAllele = onReverseStrand ? SequenceUtilities.GetReverseComplement(variant.RefAllele) : variant.RefAllele; var altAllele = onReverseStrand ? SequenceUtilities.GetReverseComplement(variant.AltAllele) : variant.AltAllele; // decide event type from HGVS nomenclature var genomicChange = GetGenomicChange(transcript, onReverseStrand, refSequence, variant); var variantStart = variant.Start; var variantEnd = variant.End; if (genomicChange == GenomicChange.Duplication) { (variantStart, variantEnd, refAllele, regionStart, regionEnd) = transcript.TranscriptRegions.ShiftDuplication(variantStart, altAllele, onReverseStrand); } var startPositionOffset = HgvsUtilities.GetCdnaPositionOffset(transcript, variantStart, regionStart); var endPositionOffset = variantStart == variantEnd ? startPositionOffset : HgvsUtilities.GetCdnaPositionOffset(transcript, variantEnd, regionEnd); if (onReverseStrand) { var tmp = startPositionOffset; startPositionOffset = endPositionOffset; endPositionOffset = tmp; } // sanity check: make sure we have coordinates if (startPositionOffset == null || endPositionOffset == null) { return(null); } var transcriptLen = transcript.End - transcript.Start + 1; //_hgvs notation past the transcript if (startPositionOffset.Position > transcriptLen || endPositionOffset.Position > transcriptLen) { return(null); } var hgvsNotation = new HgvscNotation(refAllele, altAllele, transcript.Id.WithVersion, genomicChange, startPositionOffset, endPositionOffset, transcript.Translation != null); // generic formatting return(hgvsNotation.ToString()); }
public static IAnnotatedTranscript GetAnnotatedTranscript(int variantEnd, ITranscript transcript) { var isDownStream = variantEnd < transcript.Start == transcript.Gene.OnReverseStrand; var consequence = new Consequences(); consequence.DetermineFlankingVariantEffects(isDownStream); return(new AnnotatedTranscript(transcript, null, null, null, null, null, null, null, null, null, consequence.GetConsequences(), false)); }
private static IEnumerable <ConsequenceTag> GetConsequences(ITranscript transcript, IVariant variant, bool hasGeneFusionAnnotation) { var featureEffect = new FeatureVariantEffects(transcript, variant.Type, variant, true); var consequence = new Consequences(null, featureEffect); consequence.DetermineStructuralVariantEffect(variant.Type, hasGeneFusionAnnotation); return(consequence.GetConsequences()); }
private static bool SkipGeneFusion(ITranscript transcript, ITranscript transcript2, IBreakEndPiece piece2) { return(transcript.Source != transcript2.Source || transcript2.Translation == null || transcript2.Gene.Symbol == transcript.Gene.Symbol || transcript2.Chromosome.Index == transcript.Chromosome.Index && transcript2.Chromosome.Index != piece2.Chromosome.Index || transcript2.Translation.CodingRegion.Overlaps(transcript.Translation.CodingRegion) || !transcript2.Translation.CodingRegion.Overlaps(piece2.Position, piece2.Position)); }
public Hac(IAttendance attendance, ICourses courses, IIpr ipr, IReportCard reportCard, IStudentInfo studentInfo, ITranscript transcript) { _attendance = attendance; _courses = courses; _ipr = ipr; _reportCard = reportCard; _studentInfo = studentInfo; _transcript = transcript; }
private static List <ConsequenceTag> GetConsequences(ITranscript transcript, IVariant variant, VariantEffect variantEffect) { var featureEffect = new FeatureVariantEffects(transcript, variant.Type, variant.Start, variant.End, variant.Behavior.StructuralVariantConsequence); var consequence = new Consequences(variantEffect, featureEffect); consequence.DetermineSmallVariantEffects(); return(consequence.GetConsequences()); }
public static IAnnotatedTranscript GetAnnotatedTranscript(ITranscript transcript, IVariant variant) { bool completeOverlap = variant.Contains(transcript); var mappedPosition = completeOverlap ? null : GetMappedPosition(transcript.TranscriptRegions, variant); List <ConsequenceTag> consequences = GetConsequences(transcript, variant); return(new AnnotatedTranscript(transcript, null, null, null, null, mappedPosition, null, null, null, null, consequences, completeOverlap)); }
public GeneFusionUtilitiesTests() { IGene mzt2BGene = new Gene(ChromosomeUtilities.Chr2, 0, 0, false, "MZT2B", 0, CompactId.Empty, CompactId.Empty); IGene mzt2AGene = new Gene(ChromosomeUtilities.Chr2, 0, 0, true, "MZT2A", 0, CompactId.Empty, CompactId.Empty); var transcriptRegions = new ITranscriptRegion[5]; transcriptRegions[0] = new TranscriptRegion(TranscriptRegionType.Exon, 1, 130181729, 130181797, 1, 61); transcriptRegions[1] = new TranscriptRegion(TranscriptRegionType.Intron, 1, 130181798, 130182626, 61, 62); transcriptRegions[2] = new TranscriptRegion(TranscriptRegionType.Exon, 2, 130182627, 130182775, 62, 210); transcriptRegions[3] = new TranscriptRegion(TranscriptRegionType.Intron, 2, 130182776, 130190468, 210, 211); transcriptRegions[4] = new TranscriptRegion(TranscriptRegionType.Exon, 3, 130190469, 130190713, 211, 455); var codingRegion = new CodingRegion(130181737, 130190626, 1, 368, 369); var translation = new Translation(codingRegion, CompactId.Empty, null); _enst00000425361 = new Transcript(ChromosomeUtilities.Chr2, 130181737, 130190713, CompactId.Convert("ENST00000425361", 5), translation, BioType.other, mzt2BGene, 0, 0, false, transcriptRegions, 0, null, 0, 0, Source.Ensembl, false, false, null, null); _originTranscripts = new[] { _enst00000425361 }; var transcriptRegions2 = new ITranscriptRegion[10]; transcriptRegions2[0] = new TranscriptRegion(TranscriptRegionType.Exon, 5, 131464900, 131465047, 532, 679); transcriptRegions2[1] = new TranscriptRegion(TranscriptRegionType.Intron, 4, 131465048, 131470205, 531, 532); transcriptRegions2[2] = new TranscriptRegion(TranscriptRegionType.Exon, 4, 131470206, 131470343, 394, 531); transcriptRegions2[3] = new TranscriptRegion(TranscriptRegionType.Intron, 3, 131470344, 131472067, 393, 394); transcriptRegions2[4] = new TranscriptRegion(TranscriptRegionType.Exon, 3, 131472068, 131472182, 279, 393); transcriptRegions2[5] = new TranscriptRegion(TranscriptRegionType.Intron, 2, 131472183, 131491875, 278, 279); transcriptRegions2[6] = new TranscriptRegion(TranscriptRegionType.Exon, 2, 131491876, 131492024, 130, 278); transcriptRegions2[7] = new TranscriptRegion(TranscriptRegionType.Intron, 1, 131492025, 131492206, 129, 130); transcriptRegions2[8] = new TranscriptRegion(TranscriptRegionType.Exon, 1, 131492207, 131492335, 1, 129); transcriptRegions2[9] = new TranscriptRegion(TranscriptRegionType.Intron, 0, 131492336, 131492341, 0, 0); var codingRegion2 = new CodingRegion(131470316, 131492335, 1, 421, 423); var translation2 = new Translation(codingRegion2, CompactId.Empty, null); _enst00000427024 = new Transcript(ChromosomeUtilities.Chr2, 131464900, 131492335, CompactId.Convert("ENST00000427024", 5), translation2, BioType.other, mzt2AGene, 0, 0, false, transcriptRegions2, 0, null, 0, 0, Source.Ensembl, false, false, null, null); var transcriptRegions3 = new ITranscriptRegion[5]; transcriptRegions3[0] = new TranscriptRegion(TranscriptRegionType.Exon, 3, 131483960, 131484218, 366, 624); transcriptRegions3[1] = new TranscriptRegion(TranscriptRegionType.Intron, 2, 131484219, 131491875, 365, 366); transcriptRegions3[2] = new TranscriptRegion(TranscriptRegionType.Exon, 2, 131491876, 131492024, 217, 365); transcriptRegions3[3] = new TranscriptRegion(TranscriptRegionType.Intron, 1, 131492025, 131492206, 216, 217); transcriptRegions3[4] = new TranscriptRegion(TranscriptRegionType.Exon, 1, 131492207, 131492422, 1, 216); var codingRegion3 = new CodingRegion(131484061, 131492376, 47, 523, 477); var translation3 = new Translation(codingRegion3, CompactId.Empty, null); var enst00000309451 = new Transcript(ChromosomeUtilities.Chr2, 131483960, 131492422, CompactId.Convert("ENST00000309451", 6), translation3, BioType.other, mzt2AGene, 0, 0, false, transcriptRegions3, 0, null, 0, 0, Source.Ensembl, false, false, null, null); _partnerTranscripts = new[] { _enst00000427024, enst00000309451 }; }
public PianoAnnotatedTranscript(ITranscript transcript, string referenceAminoAcids, string alternateAminoAcids, IMappedPositions mappedPositions, string upstreamAminoAcids, string downStreamAminoAcids, IEnumerable <ConsequenceTag> consequences) { Transcript = transcript; ReferenceAminoAcids = referenceAminoAcids; AlternateAminoAcids = alternateAminoAcids; MappedPositions = mappedPositions; UpstreamAminoAcids = upstreamAminoAcids; DownStreamAminoAcids = downStreamAminoAcids; Consequences = consequences; }
private static ISequence GetCodingSequence(ITranscript transcript, ISequence refSequence) { if (transcript.Translation == null) { return(null); } return(transcript.CodingSequence ?? (transcript.CodingSequence = new CodingSequence(refSequence, transcript.Translation.CodingRegion, transcript.TranscriptRegions, transcript.Gene.OnReverseStrand, transcript.StartExonPhase, transcript.RnaEdits))); }
private IGeneralAttributes GetGeneralAttributes(ITranscript transcript) { string bioType = AnnotatedTranscript.GetBioType(transcript.BioType); int internalGeneId = _geneToInternalId[transcript.Gene]; string geneId = transcript.Source == Source.Ensembl ? transcript.Gene.EnsemblId.WithVersion : transcript.Gene.EntrezGeneId.WithVersion; return(new GeneralAttributes(geneId, transcript.Gene.Symbol, transcript.Id.WithVersion, transcript.Translation?.ProteinId?.WithVersion, bioType, transcript.IsCanonical, internalGeneId)); }
private static (string Hgvs, bool IsTranscriptSuffix) GetBreakEndHgvs(ITranscript transcript, int regionIndex, int position, bool isGenomicSuffix) { var positionOffset = HgvsUtilities.GetCdnaPositionOffset(transcript, position, regionIndex); var isTranscriptSuffix = isGenomicSuffix != transcript.Gene.OnReverseStrand; var codingRegionLength = transcript.Translation.CodingRegion.CdnaEnd - transcript.Translation.CodingRegion.CdnaStart + 1; var hgvsPosString = isTranscriptSuffix ? positionOffset.Value + "_" + codingRegionLength : 1 + "_" + positionOffset.Value; var hgvs = transcript.Gene.Symbol + "{" + transcript.Id.WithVersion + "}" + ":c." + hgvsPosString; return(hgvs, isTranscriptSuffix); }
protected BaseFindInFiles(string directory, string[] include, string[] exclude) { m_directory = directory; m_include = include; m_exclude = exclude; Boss boss = ObjectModel.Create("TextEditorPlugin"); m_encoding = boss.Get<ITextEncoding>(); boss = ObjectModel.Create("Application"); m_transcript = boss.Get<ITranscript>(); }
private static VariantEffect GetVariantEffect(ITranscript transcript, ISimpleVariant variant, IMappedPositions mappedPositions, string refAminoAcids, string altAminoAcids, string refCodons, string altCodons, bool insertionInStartAndNoImpact) { var positionalEffect = new TranscriptPositionalEffect(); positionalEffect.DetermineIntronicEffect(transcript.Introns, variant, variant.Type); positionalEffect.DetermineExonicEffect(transcript, variant, mappedPositions, variant.AltAllele, insertionInStartAndNoImpact); var variantEffect = new VariantEffect(positionalEffect, variant, transcript, refAminoAcids, altAminoAcids, refCodons, altCodons, mappedPositions.ProteinInterval.Start); return(variantEffect); }
private static void AddOverlappingTranscript(Status annotationStatus, ITranscript transcript, IInterval variant, IList <IOverlappingTranscript> overlappingTranscripts) { if (annotationStatus == Status.SvCompleteOverlapAnnotation) { overlappingTranscripts.Add(new OverlappingTranscript(transcript.Id, transcript.Gene.Symbol, transcript.IsCanonical, false)); } if (annotationStatus == Status.ReducedAnnotation) { var partialOverlap = !variant.Contains(transcript); overlappingTranscripts.Add(new OverlappingTranscript(transcript.Id, transcript.Gene.Symbol, transcript.IsCanonical, partialOverlap)); } }
private static TranscriptPositionalEffect GetPositionalEffect(ITranscript transcript, ISimpleVariant variant, IMappedPosition position, string refAminoAcid, string altAminoAcid, int coveredCdnaStart, int coveredCdnaEnd, int coveredCdsStart, int coveredCdsEnd) { bool startCodonInsertionWithNoImpact = variant.Type == VariantType.insertion && position.ProteinStart <= 1 && altAminoAcid.EndsWith(refAminoAcid); var positionalEffect = new TranscriptPositionalEffect(); positionalEffect.DetermineIntronicEffect(transcript.TranscriptRegions, variant, variant.Type); positionalEffect.DetermineExonicEffect(transcript, variant, position, coveredCdnaStart, coveredCdnaEnd, coveredCdsStart, coveredCdsEnd, variant.AltAllele, startCodonInsertionWithNoImpact); return(positionalEffect); }
private void Write(ITranscript transcript) { var requiredFields = GetRequiredFields(transcript); var attribs = GetGeneralAttributes(transcript); WriteGene(transcript.Gene, requiredFields, attribs.GeneId, attribs.InternalGeneId); WriteTranscript(transcript, requiredFields, attribs); var exons = transcript.TranscriptRegions.GetExons(); var codingRegion = transcript.Translation?.CodingRegion; foreach (var exon in exons) { WriteExon(exon, requiredFields, attribs, codingRegion); } }
private static Tuple <string, string, string, string> GetCodonsAndAminoAcids(ITranscript transcript, ISequence refSequence, string transcriptRefAllele, string transcriptAltAllele, ISimpleVariant variant, IMappedPositions mappedPositions, AminoAcids aminoAcidsProvider) { var codingSequence = transcript.Translation == null ? null : new CodingSequence(refSequence, transcript.Translation.CodingRegion.Start, transcript.Translation.CodingRegion.End, transcript.CdnaMaps, transcript.Gene.OnReverseStrand, transcript.StartExonPhase); // compute codons and amino acids AssignCodonsAndAminoAcids(transcriptRefAllele, transcriptAltAllele, mappedPositions, codingSequence, aminoAcidsProvider, out string referenceCodons, out string alternateCodons, out string referenceAminoAcids, out string alternateAminoAcids); return(Tuple.Create(referenceCodons ?? "", alternateCodons ?? "", referenceAminoAcids ?? "", alternateAminoAcids ?? "")); }
public AnnotatedTranscript(ITranscript transcript, string referenceAminoAcids, string alternateAminoAcids, string referenceCodons, string alternateCodons, IMappedPosition mappedPosition, string hgvsCoding, string hgvsProtein, PredictionScore sift, PredictionScore polyphen, List <ConsequenceTag> consequences, bool?completeOverlap) { Transcript = transcript; ReferenceAminoAcids = referenceAminoAcids; AlternateAminoAcids = alternateAminoAcids; ReferenceCodons = referenceCodons; AlternateCodons = alternateCodons; MappedPosition = mappedPosition; HgvsCoding = hgvsCoding; HgvsProtein = hgvsProtein; Sift = sift; PolyPhen = polyphen; Consequences = consequences; CompleteOverlap = completeOverlap; }
public AnnotatedTranscript(ITranscript transcript, string referenceAminoAcids, string alternateAminoAcids, string referenceCodons, string alternateCodons, IMappedPosition mappedPosition, string hgvsCoding, string hgvsProtein, PredictionScore sift, PredictionScore polyphen, IEnumerable <ConsequenceTag> consequences, IGeneFusionAnnotation geneFusionAnnotation) { Transcript = transcript; ReferenceAminoAcids = referenceAminoAcids; AlternateAminoAcids = alternateAminoAcids; ReferenceCodons = referenceCodons; AlternateCodons = alternateCodons; MappedPosition = mappedPosition; HgvsCoding = hgvsCoding; HgvsProtein = hgvsProtein; Sift = sift; PolyPhen = polyphen; Consequences = consequences; GeneFusionAnnotation = geneFusionAnnotation; PluginData = new List <IPluginData>(); }
public static IAnnotatedTranscript GetAnnotatedTranscript(ITranscript transcript, IVariant variant, ISequence refSequence, AminoAcids aminoAcidsProvider) { var mappedPositions = MappedPositionsUtils.ComputeMappedPositions(variant.Start, variant.End, transcript); var transcriptRefAllele = HgvsUtilities.GetTranscriptAllele(variant.RefAllele, transcript.Gene.OnReverseStrand); var transcriptAltAllele = HgvsUtilities.GetTranscriptAllele(variant.AltAllele, transcript.Gene.OnReverseStrand); var codonsAndAminoAcids = GetCodonsAndAminoAcids(transcript, refSequence, transcriptRefAllele, transcriptAltAllele, variant, mappedPositions, aminoAcidsProvider); var referenceCodons = codonsAndAminoAcids.Item1; var alternateCodons = codonsAndAminoAcids.Item2; var referenceAminoAcids = codonsAndAminoAcids.Item3; var alternateAminoAcids = codonsAndAminoAcids.Item4; var insertionInStartCodonAndNoimpact = variant.Type == VariantType.insertion && mappedPositions.ProteinInterval.Start <= 1 && alternateAminoAcids.EndsWith(referenceAminoAcids); var variantEffect = GetVariantEffect(transcript, variant, mappedPositions, referenceAminoAcids, alternateAminoAcids, referenceCodons, alternateCodons, insertionInStartCodonAndNoimpact); var consequences = GetConsequences(transcript, variant, variantEffect); var proteinBegin = mappedPositions.ProteinInterval.Start == null ? -1 : mappedPositions.ProteinInterval.Start.Value; var proteinEnd = mappedPositions.ProteinInterval.End == null ? -1 : mappedPositions.ProteinInterval.End.Value; var upStreamAminoAcids = GetFlankingPeptides(transcript.Translation?.PeptideSeq, proteinBegin, proteinEnd, FlankingAminoAcidLength, true); var downStreamAminoAcids = consequences.Contains(ConsequenceTag.frameshift_variant)? null: GetFlankingPeptides(transcript.Translation?.PeptideSeq, proteinBegin, proteinEnd, FlankingAminoAcidLength, false); return(new PianoAnnotatedTranscript(transcript, referenceAminoAcids, alternateAminoAcids, mappedPositions, upStreamAminoAcids, downStreamAminoAcids, consequences)); }
private void DoWrite(Output type, string text) { if (m_transcript == null) m_transcript = m_boss.Get<ITranscript>(); m_transcript.Write(type, text); }