예제 #1
0
        /// <summary>
        /// creates a new cell with no genetic information.
        /// Initializes the 'normal' machinery.
        /// </summary>
        public NormalCell()
        {
            List <AACodon> stops = new List <AACodon>
            {
                AACodon.UGA,
                AACodon.UAA,
                AACodon.UAG
            };

            this.pol = new Polymerase();
            this.rib = new Ribosome(AACodon.AUG, stops, new AAFactory(), 3);
            this.dna = new Nucleobase[0];
            this.rna = new Nucleobase[0];
            this.pro = new List <IAminoAcid>();
        }
예제 #2
0
        public NormalCell(int sequenceLength)
        {
            if (sequenceLength < 0)
            {
                throw new ArgumentException("Illegal sequence length");
            }

            List <AACodon> stops = new List <AACodon>
            {
                AACodon.UGA,
                AACodon.UAA,
                AACodon.UAG
            };

            this.rib = new Ribosome(AACodon.AUG, stops, new AAFactory(), 3);
            this.dna = FrameshiftUtil.GenerateDNASequence(sequenceLength);
            this.rna = Polymerase.Transcribe(this.dna);
            this.pro = this.rib.Translate(this.rna);
        }