X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fschemes%2FClustalxColourScheme.java;h=8dd8994d8f61f93d7045b9513c27568bc381ce96;hb=7bc226b58110fa26d9dbd3f0c78095d06909ffc3;hp=eaf2a5f96e10ce729406c13d848ff438439deac8;hpb=dd74fc4938723fe5ec48d4e5fdcfbe58ac42a48d;p=jalview.git diff --git a/src/jalview/schemes/ClustalxColourScheme.java b/src/jalview/schemes/ClustalxColourScheme.java index eaf2a5f..8dd8994 100755 --- a/src/jalview/schemes/ClustalxColourScheme.java +++ b/src/jalview/schemes/ClustalxColourScheme.java @@ -1,6 +1,6 @@ /* * Jalview - A Sequence Alignment Editor and Viewer - * Copyright (C) 2006 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Copyright (C) 2007 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -70,7 +70,7 @@ public class ClustalxColourScheme int res; int i; int j = 0; - char [] seq; + char[] seq; while (j < seqs.size()) { @@ -86,7 +86,7 @@ public class ClustalxColourScheme } else { - res = ResidueProperties.aaIndex[seq[i]]; + res = ResidueProperties.aaIndex[seq[i]]; } cons2[i][res]++; @@ -249,8 +249,7 @@ public class ClustalxColourScheme { Color currentColour; - - if ( cons2.length<=j || (threshold != 0 && !aboveThreshold(c, j))) + if (cons2.length <= j || (threshold != 0 && !aboveThreshold(c, j))) { return Color.white; } @@ -264,13 +263,13 @@ public class ClustalxColourScheme return currentColour; } - for (int k = 0; k < ResidueColour[i].conses.length; k++) - { - if (ResidueColour[i].conses[k].isConserved(cons2, j, size)) + for (int k = 0; k < ResidueColour[i].conses.length; k++) { - currentColour = ResidueColour[i].c; + if (ResidueColour[i].conses[k].isConserved(cons2, j, size)) + { + currentColour = ResidueColour[i].c; + } } - } if (i == 4) { @@ -280,8 +279,10 @@ public class ClustalxColourScheme } } - if(conservationColouring) + if (conservationColouring) + { currentColour = applyConservation(currentColour, j); + } return currentColour; }