summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Cully <bjc@kublai.com>2021-02-19 11:27:51 -0500
committerBrian Cully <bjc@kublai.com>2021-02-19 11:27:51 -0500
commit555e3faea8d3cc8ae5764876fe957039cdc0d431 (patch)
tree8d217720d55d4a5b7546d0ec6e259ee66f34ff42
parentfc3f9feeddd755d357fa76a28ce5d4a327e0c2e1 (diff)
downloadmolsim2-555e3faea8d3cc8ae5764876fe957039cdc0d431.tar.gz
molsim2-555e3faea8d3cc8ae5764876fe957039cdc0d431.zip
Add getter for nucleotides in Genome.
-rw-r--r--genome.mjs4
1 files changed, 4 insertions, 0 deletions
diff --git a/genome.mjs b/genome.mjs
index 7303b40..49cae0f 100644
--- a/genome.mjs
+++ b/genome.mjs
@@ -37,6 +37,10 @@ class Genome {
return this._elt
}
+ get nucleotides() {
+ return this.codons.flatMap(c => c.bases)
+ }
+
get onNucleotideSelectionChanged() {
if (this._onNucleotideSelectionChanged !== undefined) {
return this._onNucleotideSelectionChanged