git://source.jalview.org
/
jalview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
JAL-4366 JAL-4371 allow cruft after inferred pdb ids, ex 1xyz_A.pdb yields 1xyzA
[jalview.git]
/
src
/
jalview
/
schemes
/
CovariationColourScheme.java
diff --git
a/src/jalview/schemes/CovariationColourScheme.java
b/src/jalview/schemes/CovariationColourScheme.java
index
6cb095b
..
c91380e
100644
(file)
--- a/
src/jalview/schemes/CovariationColourScheme.java
+++ b/
src/jalview/schemes/CovariationColourScheme.java
@@
-20,10
+20,9
@@
*/
package jalview.schemes;
*/
package jalview.schemes;
+import jalview.api.AlignViewportI;
import jalview.datamodel.AlignmentAnnotation;
import jalview.datamodel.AnnotatedCollectionI;
import jalview.datamodel.AlignmentAnnotation;
import jalview.datamodel.AnnotatedCollectionI;
-import jalview.datamodel.SequenceCollectionI;
-import jalview.datamodel.SequenceI;
import jalview.util.ColorUtils;
import java.awt.Color;
import jalview.util.ColorUtils;
import java.awt.Color;
@@
-38,9
+37,9
@@
import java.util.Map;
*/
public class CovariationColourScheme extends ResidueColourScheme
{
*/
public class CovariationColourScheme extends ResidueColourScheme
{
- public Map<String, Color> helixcolorhash = new Hashtable<String, Color>();
+ public Map<String, Color> helixcolorhash = new Hashtable<>();
- public Map<Integer, String> positionsToHelix = new Hashtable<Integer, String>();
+ public Map<Integer, String> positionsToHelix = new Hashtable<>();
int numHelix = 0;
int numHelix = 0;
@@
-51,8
+50,8
@@
public class CovariationColourScheme extends ResidueColourScheme
* be coloured
*/
@Override
* be coloured
*/
@Override
- public ColourSchemeI getInstance(AnnotatedCollectionI coll,
- Map<SequenceI, SequenceCollectionI> hrs)
+ public ColourSchemeI getInstance(AlignViewportI view,
+ AnnotatedCollectionI coll)
{
return new CovariationColourScheme(coll.getAlignmentAnnotation()[0]);
}
{
return new CovariationColourScheme(coll.getAlignmentAnnotation()[0]);
}
@@
-66,9
+65,10
@@
public class CovariationColourScheme extends ResidueColourScheme
for (int x = 0; x < this.annotation._rnasecstr.length; x++)
{
for (int x = 0; x < this.annotation._rnasecstr.length; x++)
{
- // System.out.println(this.annotation._rnasecstr[x] + " Begin" +
+ // jalview.bin.Console.outPrintln(this.annotation._rnasecstr[x] + " Begin"
+ // +
// this.annotation._rnasecstr[x].getBegin());
// this.annotation._rnasecstr[x].getBegin());
- // System.out.println(this.annotation._rnasecstr[x].getFeatureGroup());
+ // jalview.bin.Console.outPrintln(this.annotation._rnasecstr[x].getFeatureGroup());
// pairs.put(this.annotation._rnasecstr[x].getBegin(),
// this.annotation._rnasecstr[x].getEnd());
// pairs.put(this.annotation._rnasecstr[x].getBegin(),
// this.annotation._rnasecstr[x].getEnd());
@@
-77,10
+77,11
@@
public class CovariationColourScheme extends ResidueColourScheme
positionsToHelix.put(this.annotation._rnasecstr[x].getEnd(),
this.annotation._rnasecstr[x].getFeatureGroup());
positionsToHelix.put(this.annotation._rnasecstr[x].getEnd(),
this.annotation._rnasecstr[x].getFeatureGroup());
- if (Integer.parseInt(this.annotation._rnasecstr[x].getFeatureGroup()) > numHelix)
+ if (Integer.parseInt(
+ this.annotation._rnasecstr[x].getFeatureGroup()) > numHelix)
{
{
- numHelix = Integer.parseInt(this.annotation._rnasecstr[x]
- .getFeatureGroup());
+ numHelix = Integer
+ .parseInt(this.annotation._rnasecstr[x].getFeatureGroup());
}
}
}
}
@@
-104,7
+105,7
@@
public class CovariationColourScheme extends ResidueColourScheme
@Override
public Color findColour(char c)
{
@Override
public Color findColour(char c)
{
- // System.out.println("called"); log.debug
+ // jalview.bin.Console.outPrintln("called"); log.debug
// Generate a random pastel color
return ResidueProperties.purinepyrimidine[ResidueProperties.purinepyrimidineIndex[c]];// jalview.util.ColorUtils.generateRandomColor(Color.white);
// Generate a random pastel color
return ResidueProperties.purinepyrimidine[ResidueProperties.purinepyrimidineIndex[c]];// jalview.util.ColorUtils.generateRandomColor(Color.white);
@@
-124,16
+125,17
@@
public class CovariationColourScheme extends ResidueColourScheme
{
Color currentColour = Color.white;
String currentHelix = null;
{
Color currentColour = Color.white;
String currentHelix = null;
- // System.out.println(c + " " + j);
+ // jalview.bin.Console.outPrintln(c + " " + j);
currentHelix = positionsToHelix.get(j);
currentHelix = positionsToHelix.get(j);
- // System.out.println(positionsToHelix.get(j));
+ // jalview.bin.Console.outPrintln(positionsToHelix.get(j));
if (currentHelix != null)
{
currentColour = helixcolorhash.get(currentHelix);
}
if (currentHelix != null)
{
currentColour = helixcolorhash.get(currentHelix);
}
- // System.out.println(c + " " + j + " helix " + currentHelix + " " +
+ // jalview.bin.Console.outPrintln(c + " " + j + " helix " + currentHelix + "
+ // " +
// currentColour);
return currentColour;
}
// currentColour);
return currentColour;
}