X-Git-Url: http://source.jalview.org/gitweb/?p=jalviewjs.git;a=blobdiff_plain;f=site%2Fj2s%2Fjalview%2Fschemes%2FPIDColourScheme.js;fp=site%2Fj2s%2Fjalview%2Fschemes%2FPIDColourScheme.js;h=bdf6f2406834e2b9b13833f442457697494efe09;hp=093328cafadee08d54929f4af29ec18e96007e88;hb=b9b7a352eee79b7764c3b09c9d19663075061d8c;hpb=7301a2415adab88038b291fc54caeeb3a5a47a44 diff --git a/site/j2s/jalview/schemes/PIDColourScheme.js b/site/j2s/jalview/schemes/PIDColourScheme.js index 093328c..bdf6f24 100644 --- a/site/j2s/jalview/schemes/PIDColourScheme.js +++ b/site/j2s/jalview/schemes/PIDColourScheme.js @@ -1,39 +1,39 @@ -Clazz.declarePackage ("jalview.schemes"); -Clazz.load (["jalview.schemes.ResidueColourScheme"], "jalview.schemes.PIDColourScheme", ["jalview.schemes.ResidueProperties", "jalview.util.Comparison", "java.awt.Color"], function () { -c$ = Clazz.decorateAsClass (function () { -this.pidColours = null; -this.thresholds = null; -this.group = null; -Clazz.instantialize (this, arguments); -}, jalview.schemes, "PIDColourScheme", jalview.schemes.ResidueColourScheme); -Clazz.makeConstructor (c$, -function () { -Clazz.superConstructor (this, jalview.schemes.PIDColourScheme, []); -this.pidColours = jalview.schemes.ResidueProperties.pidColours; -this.thresholds = jalview.schemes.ResidueProperties.pidThresholds; -}); -Clazz.defineMethod (c$, "findColour", -function (c, j, seq) { -if ('a' <= c && c <= 'z') { -c = String.fromCharCode (c.charCodeAt (0) - (32)); -}if (this.consensus == null || j >= this.consensus.length || this.consensus[j] == null) { -return java.awt.Color.white; -}if ((this.threshold != 0) && !this.aboveThreshold (c, j)) { -return java.awt.Color.white; -}var currentColour = java.awt.Color.white; -var sc = 0; -if (this.consensus.length <= j) { -return java.awt.Color.white; -}if ((Integer.parseInt (this.consensus[j].get ("C").toString ()) != -1) && this.consensus[j].contains (String.valueOf (c))) { -sc = (this.consensus[j].get (this.ignoreGaps)).floatValue (); -if (!jalview.util.Comparison.isGap (c)) { -for (var i = 0; i < this.thresholds.length; i++) { -if (sc > this.thresholds[i]) { -currentColour = this.pidColours[i]; -break; -}} -}}if (this.conservationColouring) { -currentColour = this.applyConservation (currentColour, j); -}return currentColour; -}, "~S,~N,jalview.datamodel.SequenceI"); -}); +Clazz.declarePackage ("jalview.schemes"); +Clazz.load (["jalview.schemes.ResidueColourScheme"], "jalview.schemes.PIDColourScheme", ["jalview.schemes.ResidueProperties", "jalview.util.Comparison", "java.awt.Color"], function () { +c$ = Clazz.decorateAsClass (function () { +this.pidColours = null; +this.thresholds = null; +this.group = null; +Clazz.instantialize (this, arguments); +}, jalview.schemes, "PIDColourScheme", jalview.schemes.ResidueColourScheme); +Clazz.makeConstructor (c$, +function () { +Clazz.superConstructor (this, jalview.schemes.PIDColourScheme, []); +this.pidColours = jalview.schemes.ResidueProperties.pidColours; +this.thresholds = jalview.schemes.ResidueProperties.pidThresholds; +}); +Clazz.defineMethod (c$, "findColour", +function (c, j, seq) { +if ('a' <= c && c <= 'z') { +c = String.fromCharCode (c.charCodeAt (0) - (32)); +}if (this.consensus == null || j >= this.consensus.length || this.consensus[j] == null) { +return java.awt.Color.white; +}if ((this.threshold != 0) && !this.aboveThreshold (c, j)) { +return java.awt.Color.white; +}var currentColour = java.awt.Color.white; +var sc = 0; +if (this.consensus.length <= j) { +return java.awt.Color.white; +}if ((Integer.parseInt (this.consensus[j].get ("C").toString ()) != -1) && this.consensus[j].contains (String.valueOf (c))) { +sc = (this.consensus[j].get (this.ignoreGaps)).floatValue (); +if (!jalview.util.Comparison.isGap (c)) { +for (var i = 0; i < this.thresholds.length; i++) { +if (sc > this.thresholds[i]) { +currentColour = this.pidColours[i]; +break; +}} +}}if (this.conservationColouring) { +currentColour = this.applyConservation (currentColour, j); +}return currentColour; +}, "~S,~N,jalview.datamodel.SequenceI"); +});