diff options
author | Brian Cully <bjc@kublai.com> | 2021-02-19 15:21:27 -0500 |
---|---|---|
committer | Brian Cully <bjc@kublai.com> | 2021-02-19 15:21:27 -0500 |
commit | ed2b76634a6fb1a9fb45abdd7afc7342f5b6f12c (patch) | |
tree | dd323eacb14b0d2daf849b09d8ec1422989eba63 | |
parent | 11ab02da706e0c3b60c363325eabdf88e47ea522 (diff) | |
download | molsim2-ed2b76634a6fb1a9fb45abdd7afc7342f5b6f12c.tar.gz molsim2-ed2b76634a6fb1a9fb45abdd7afc7342f5b6f12c.zip |
Add length getter for genome.
-rw-r--r-- | genome.mjs | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -43,6 +43,12 @@ class Genome { }, []) } + get length() { + return this.codons.reduce((acc, c) => { + return acc + c.bases.length + }, 0) + } + get onNucleotideSelectionChanged() { if (this._onNucleotideSelectionChanged !== undefined) { return this._onNucleotideSelectionChanged |