public void ChangeSequence(int len) { if (len < 0) { throw new ArgumentException("Could not change sequence: illegal sequence length"); } this.WipeCell(); this.dna = FrameshiftUtil.GenerateDNASequence(len); this.rna = Polymerase.Transcribe(this.dna); this.pro = this.rib.Translate(this.rna); }
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); }
/// <summary> /// Given an amino acid codon, returns a sequence of /// nucleobases corresponding to that codon /// </summary> /// <param name="codon">Codon to break down</param> /// <returns>Array of appropriate bases</returns> public static Nucleobase[] BreakAACodon(AACodon codon) { return(FrameshiftUtil.StringSeq(codon.ToString())); //TODO }