X-Git-Url: http://source.jalview.org/gitweb/?p=jalviewjs.git;a=blobdiff_plain;f=site%2Fj2s%2Fjalview%2Fschemes%2FBlosum62ColourScheme.js;h=87c4a514c31ccb879b09d5d63810c0b0f7e1ebb5;hp=3268bc77670368e75217062ae75bce6451dcafde;hb=b9b7a352eee79b7764c3b09c9d19663075061d8c;hpb=7301a2415adab88038b291fc54caeeb3a5a47a44 diff --git a/site/j2s/jalview/schemes/Blosum62ColourScheme.js b/site/j2s/jalview/schemes/Blosum62ColourScheme.js index 3268bc7..87c4a51 100644 --- a/site/j2s/jalview/schemes/Blosum62ColourScheme.js +++ b/site/j2s/jalview/schemes/Blosum62ColourScheme.js @@ -1,37 +1,37 @@ -Clazz.declarePackage ("jalview.schemes"); -Clazz.load (["jalview.schemes.ResidueColourScheme"], "jalview.schemes.Blosum62ColourScheme", ["jalview.schemes.ResidueProperties", "jalview.util.Comparison", "java.awt.Color"], function () { -c$ = Clazz.declareType (jalview.schemes, "Blosum62ColourScheme", jalview.schemes.ResidueColourScheme); -Clazz.defineMethod (c$, "findColour", -function (res, j, seq) { -if ('a' <= res && res <= 'z') { -res = String.fromCharCode (res.charCodeAt (0) - (32)); -}if (this.consensus == null || j >= this.consensus.length || this.consensus[j] == null || (this.threshold != 0 && !this.aboveThreshold (res, j))) { -return java.awt.Color.white; -}var currentColour; -if (!jalview.util.Comparison.isGap (res)) { -var max = this.consensus[j].get ("R"); -if (max.indexOf (res) > -1) { -currentColour = new java.awt.Color (154, 154, 255); -} else { -var c = 0; -var max_aa = 0; -var n = max.length; -do { -c += jalview.schemes.ResidueProperties.getBLOSUM62 (max.charAt (max_aa), res); -} while (++max_aa < n); -if (c > 0) { -currentColour = new java.awt.Color (204, 204, 255); -} else { -currentColour = java.awt.Color.white; -}}if (this.conservationColouring) { -currentColour = this.applyConservation (currentColour, j); -}} else { -return java.awt.Color.white; -}return currentColour; -}, "~S,~N,jalview.datamodel.SequenceI"); -Clazz.defineMethod (c$, "applyTo", -function (sg, hiddenRepSequences) { -var newcs = Clazz.superCall (this, jalview.schemes.Blosum62ColourScheme, "applyTo", [sg, hiddenRepSequences]); -return newcs; -}, "jalview.datamodel.AnnotatedCollectionI,java.util.Map"); -}); +Clazz.declarePackage ("jalview.schemes"); +Clazz.load (["jalview.schemes.ResidueColourScheme"], "jalview.schemes.Blosum62ColourScheme", ["jalview.schemes.ResidueProperties", "jalview.util.Comparison", "java.awt.Color"], function () { +c$ = Clazz.declareType (jalview.schemes, "Blosum62ColourScheme", jalview.schemes.ResidueColourScheme); +Clazz.defineMethod (c$, "findColour", +function (res, j, seq) { +if ('a' <= res && res <= 'z') { +res = String.fromCharCode (res.charCodeAt (0) - (32)); +}if (this.consensus == null || j >= this.consensus.length || this.consensus[j] == null || (this.threshold != 0 && !this.aboveThreshold (res, j))) { +return java.awt.Color.white; +}var currentColour; +if (!jalview.util.Comparison.isGap (res)) { +var max = this.consensus[j].get ("R"); +if (max.indexOf (res) > -1) { +currentColour = new java.awt.Color (154, 154, 255); +} else { +var c = 0; +var max_aa = 0; +var n = max.length; +do { +c += jalview.schemes.ResidueProperties.getBLOSUM62 (max.charAt (max_aa), res); +} while (++max_aa < n); +if (c > 0) { +currentColour = new java.awt.Color (204, 204, 255); +} else { +currentColour = java.awt.Color.white; +}}if (this.conservationColouring) { +currentColour = this.applyConservation (currentColour, j); +}} else { +return java.awt.Color.white; +}return currentColour; +}, "~S,~N,jalview.datamodel.SequenceI"); +Clazz.defineMethod (c$, "applyTo", +function (sg, hiddenRepSequences) { +var newcs = Clazz.superCall (this, jalview.schemes.Blosum62ColourScheme, "applyTo", [sg, hiddenRepSequences]); +return newcs; +}, "jalview.datamodel.AnnotatedCollectionI,java.util.Map"); +});