2 * Jalview - A Sequence Alignment Editor and Viewer (Version 2.9)
3 * Copyright (C) 2015 The Jalview Authors
5 * This file is part of Jalview.
7 * Jalview is free software: you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation, either version 3
10 * of the License, or (at your option) any later version.
12 * Jalview is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty
14 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with Jalview. If not, see <http://www.gnu.org/licenses/>.
19 * The Jalview Authors are detailed in the 'AUTHORS' file.
21 package jalview.json.binding.biojson.v1;
23 import jalview.schemes.Blosum62ColourScheme;
24 import jalview.schemes.BuriedColourScheme;
25 import jalview.schemes.ColourSchemeI;
26 import jalview.schemes.HelixColourScheme;
27 import jalview.schemes.HydrophobicColourScheme;
28 import jalview.schemes.NucleotideColourScheme;
29 import jalview.schemes.PIDColourScheme;
30 import jalview.schemes.PurinePyrimidineColourScheme;
31 import jalview.schemes.RNAInteractionColourScheme;
32 import jalview.schemes.StrandColourScheme;
33 import jalview.schemes.TaylorColourScheme;
34 import jalview.schemes.TurnColourScheme;
35 import jalview.schemes.ZappoColourScheme;
37 public enum JalviewBioJsColorSchemeMapper
40 USER_DEFINED("User Defined", "user defined", null), NONE("None", "foo",
41 null), CLUSTAL("Clustal", "clustal", null), ZAPPO("Zappo",
42 "zappo", new ZappoColourScheme()), TAYLOR("Taylor", "taylor",
43 new TaylorColourScheme()), NUCLEOTIDE("Nucleotide", "nucleotide",
44 new NucleotideColourScheme()), PURINE_PYRIMIDINE(
45 "Purine/Pyrimidine", "purine", new PurinePyrimidineColourScheme()), HELIX_PROPENSITY(
46 "Helix Propensity", "helix", new HelixColourScheme()), TURN_PROPENSITY(
47 "Turn Propensity", "turn", new TurnColourScheme()), STRAND_PROPENSITY(
48 "Strand Propensity", "strand", new StrandColourScheme()), BURIED_INDEX(
49 "Buried Index", "buried", new BuriedColourScheme()), HYDROPHOBIC(
50 "Hydrophobic", "hydro", new HydrophobicColourScheme()),
52 // The color types below are not yet supported by BioJs MSA viewer
53 T_COFFE_SCORES("T-Coffee Scores", "T-Coffee Scores", null), RNA_INT_TYPE(
54 "RNA Interaction type", "RNA Interaction type",
55 new RNAInteractionColourScheme()), BLOSUM62("Blosum62",
56 "Blosum62", new Blosum62ColourScheme()), RNA_HELICES(
57 "RNA Helices", "RNA Helices", null), PERCENTAGE_IDENTITY(
58 "% Identity", "pid", new PIDColourScheme());
60 private String jalviewName;
62 private String bioJsName;
64 private ColourSchemeI jvColourScheme;
66 private JalviewBioJsColorSchemeMapper(String jalviewName,
67 String bioJsName, ColourSchemeI jvColourScheme)
69 this.jalviewName = jalviewName;
70 this.bioJsName = bioJsName;
71 this.setJvColourScheme(jvColourScheme);
74 public String getJalviewName()
79 public String getBioJsName()
84 public ColourSchemeI getJvColourScheme()
86 return jvColourScheme;
89 public void setJvColourScheme(ColourSchemeI jvColourScheme)
91 this.jvColourScheme = jvColourScheme;