From d719da3d11885a532c40103d81640d344d301f8b Mon Sep 17 00:00:00 2001 From: Brigitte Hofmeister Date: Thu, 22 Jun 2017 08:22:58 -0400 Subject: [PATCH] moved nucleotide table out of json and into Util.js directly --- js/Store/Util.js | 28 +++++++++++++++++++++------- js/main.js | 2 +- nucleotide_table.json | 18 ------------------ 3 files changed, 22 insertions(+), 26 deletions(-) delete mode 100644 nucleotide_table.json diff --git a/js/Store/Util.js b/js/Store/Util.js index 77b7282..f4510fd 100644 --- a/js/Store/Util.js +++ b/js/Store/Util.js @@ -1,22 +1,36 @@ define('NucleotideDensityPlugin/Store/Util',[ 'dojo/_base/declare', 'dojo/_base/array', - 'dojo/_base/lang', - 'dojo/json', - 'dojo/text!plugins/NucleotideDensityPlugin/nucleotide_table.json' + 'dojo/_base/lang' ], function( declare, array, - lang, - JSON, - nucleotidetable + lang ){ /* Utility class dealing with degenerate nucleotide sequences */ var Util; - var ntable = JSON.parse(nucleotidetable); + + var ntable = { + "A": ["A"], + "C": ["C"], + "G": ["G"], + "T": ["T"], + "U": ["T"], + "R": ["A", "G"], + "Y": ["C", "T"], + "S": ["C", "G"], + "W": ["A", "T"], + "K": ["G", "T"], + "M": ["A", "C"], + "B": ["C", "G", "T"], + "D": ["A", "G", "T"], + "H": ["A", "C", "T"], + "V": ["A", "C", "G"], + "N": ["A", "C", "G", "T"] + } Util = { diff --git a/js/main.js b/js/main.js index 3d89743..600ed58 100644 --- a/js/main.js +++ b/js/main.js @@ -12,7 +12,7 @@ return declare( JBrowsePlugin, var browser = args.browser; // do anything you need to initialize your plugin here - console.log( "NucleotideDensityPlugin plugin starting" ); + console.log( "NucleotideDensityPlugin starting" ); // register new track type browser.registerTrackType({ diff --git a/nucleotide_table.json b/nucleotide_table.json deleted file mode 100644 index f61db09..0000000 --- a/nucleotide_table.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "A": ["A"], - "C": ["C"], - "G": ["G"], - "T": ["T"], - "U": ["T"], - "R": ["A", "G"], - "Y": ["C", "T"], - "S": ["C", "G"], - "W": ["A", "T"], - "K": ["G", "T"], - "M": ["A", "C"], - "B": ["C", "G", "T"], - "D": ["A", "G", "T"], - "H": ["A", "C", "T"], - "V": ["A", "C", "G"], - "N": ["A", "C", "G", "T"] -}