diff --git a/src/main/scala/emc/rna/RNA.scala b/src/main/scala/emc/rna/RNA.scala index d7ed40a..07d7f73 100644 --- a/src/main/scala/emc/rna/RNA.scala +++ b/src/main/scala/emc/rna/RNA.scala @@ -87,7 +87,7 @@ final class RNA private(val slots: Array[Int], val length: Int) /** Returns a codon iterator for this sequence starting at given reading frame, * which will drop `rf` nucleotides first, RNA library writers may as conjugated - * with RNA application writers may prefer to read `codons` as `skip`. + * with RNA application writers prefer to read the `codons` reference frame as `skip`. * * @return A codon iterator for this RNA sequence. */ diff --git a/src/test/scala/emc/rna/RNASpecification.scala b/src/test/scala/emc/rna/RNASpecification.scala index 33b72f5..3e6b26e 100644 --- a/src/test/scala/emc/rna/RNASpecification.scala +++ b/src/test/scala/emc/rna/RNASpecification.scala @@ -4,20 +4,10 @@ package rna import org.scalatest.funspec.* import org.scalatest.matchers.should.* -val fixture: RNA = - rna"CCCCC" ++ // semi-random prefix - Codon.Start.asRNA ++ // [A,U,G] - rna"AUGCCC" ++ // semi-random post-start junk rna - Codon.Stop.Amber.asRNA ++ // known amber codon, also a stop codon - rna"CCC" ++ // semi-random junk rna - Codon.Stop.Opal.asRNA ++ // known opal codon, also a stop codon - Codon.Start.asRNA ++ // start again,... - rna"CAUG" // but include [A,U,G], after just one nucleotide - class RNASpecification extends AnyFunSpec with Matchers: import Nucleotide.* - import AminoAcid.* + import RNASpecification.* describe("An RNA sequence"): @@ -56,3 +46,15 @@ class RNASpecification extends AnyFunSpec with Matchers: Codon(A, U, G), Codon(C, A, U)) ) + +object RNASpecification: + + val fixture: RNA = + rna"CCCCC" ++ // semi-random prefix + Codon.Start.asRNA ++ // [A,U,G] + rna"AUGCCC" ++ // semi-random post-start junk rna + Codon.Stop.Amber.asRNA ++ // known amber codon, also a stop codon + rna"CCC" ++ // semi-random junk rna + Codon.Stop.Opal.asRNA ++ // known opal codon, also a stop codon + Codon.Start.asRNA ++ // start again,... + rna"CAUG" // but include [A,U,G], after just one nucleotide diff --git a/src/test/scala/emc/rna/RibosomeSpecification.scala b/src/test/scala/emc/rna/RibosomeSpecification.scala index 7ad1271..c5d25d7 100644 --- a/src/test/scala/emc/rna/RibosomeSpecification.scala +++ b/src/test/scala/emc/rna/RibosomeSpecification.scala @@ -5,8 +5,8 @@ import org.scalatest.matchers.should.Matchers class RibosomeSpecification extends AnyFunSpec with Matchers: - import Nucleotide.* import AminoAcid.* + import RNASpecification.* // expected results at given reference frame val expected: Map[Int, Seq[Seq[AminoAcid]]] =