/// <summary> /// Creates an IGEPCodon for the given IFunctionPair and INucleotide Sequence. /// /// Adds the IGEPCodon to the IGEPGeneticCode. /// </summary> /// <param name="functionPair"></param> /// <param name="nucleotideSequence"></param> private void AddCodonFunctionPair(IFunctionPair functionPair, INucleotide[] nucleotideSequence, Action onCodonAdded = null) { var codon = new GEPCodon(geneticCode: this, codonIdentifier: new CodonIdentifier(nucleotideSequence.Select(n => n.Identifier.ToString()).ConcatContents()), codonType: CodonType.Standard, nucleotides: nucleotideSequence, functions: functionPair); this.AddCodon(codon); if (onCodonAdded != null) onCodonAdded(); }
protected GEPCodonBase(IGEPGeneticCode geneticCode, ICodonIdentifier codonIdentifier, CodonType codonType, IEnumerable<INucleotide> nucleotides, IFunctionPair functions) : base(geneticCode, codonIdentifier, codonType, nucleotides) { this.Functions = functions; }