/// <summary> /// Did we gain a start codon in this 5'UTR interval? /// </summary> /// <param name="seqChange"></param> /// <returns>A new start codon (if gained)</returns> private string startGained(Variant seqChange) { if (!seqChange.isSnv()) { return(""); } // Only SNPs supported. // Calculate SNP position relative to UTRs long pos = seqChange.DistanceBases(get5primeUtrs().OfType <Interval>().ToList(), IsStrandMinus()); // Change base at SNP position string sequence = getSequence(); char[] chars = sequence.ToCharArray(); char snpBase = seqChange.NetChange(this)[0]; if (IsStrandMinus() && Alphabets.DNA.TryGetComplementSymbol((byte)snpBase, out byte complement)) { snpBase = (char)complement; } chars[pos] = snpBase; // Do we gain a new start codon? return(startGained(chars, pos)); }