From 9e7a588551c36090742394a80fa6d128f31b288b Mon Sep 17 00:00:00 2001 From: Brian Cully Date: Sat, 20 Jan 2024 08:35:52 -0500 Subject: javascript: import translation tables only where needed --- js-ver.org | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'js-ver.org') diff --git a/js-ver.org b/js-ver.org index fea26bd..324ec89 100644 --- a/js-ver.org +++ b/js-ver.org @@ -92,8 +92,6 @@ start a python http server with: set up the javascript code by loading direct module dependencies and running the analysis when the form is submitted. #+begin_src javascript :noweb yes :tangle main.mjs - import codon2AA from './codon2AminoAcid.mjs'; - import aa2Code from './aminoAcid2Code.mjs'; import process from './varscan.mjs'; import Log from './logging.mjs'; @@ -140,7 +138,7 @@ when the form is submitted, load the reference genome,its protein coding regions Promise.all([variantsPromise, genomePromise, protein2PosPromise]) .then(([variants, genome, protein2Pos]) => { - const results = process(codon2AA, aa2Code, genome, protein2Pos, variants); + const results = process(genome, protein2Pos, variants); updateDownloadLink(resultsFilename, results); fillTable(results); }); @@ -252,8 +250,10 @@ create a download link ** variant to codon whatever i need to name this #+begin_src javascript :tangle varscan.mjs import Log from './logging.mjs'; + import codon2AA from './codon2AminoAcid.mjs'; + import aa2Code from './aminoAcid2Code.mjs'; - function process(codon2AA, aa2Code, genome, protein2Pos, variants) { + function process(genome, protein2Pos, variants) { let lineno = 0; let name = 'unnamed-change'; return variants -- cgit v1.2.3