SimpleAlignmentStyler (biojava-legacy 1.9.5 API)
Simple implementation for specifying markup styles. Has 3 modes of operation: SHOW_ALL, SHOW_SAME & SHOW_DIFF.
SHOW_ALL - returns the default style for all given residues.
SHOW_SAME - only returns a markup style if the styles for both
characters are the same.
SHOW_DIFF - only returns a markup style if the styles for both
are different.
Styles can be easily defined in two ways.
1. Add each style by calling addStyle( poChar, poColour )
For example,
String oRed = "FFA2A2";
oStyler.addStyle( "-", oRed );
oStyler.addStyle( "N", oRed );
oStyler.addStyle( "A", oRed );
oStyler.addStyle( "T", oRed );
oStyler.addStyle( "C", oRed );
oStyler.addStyle( "G", oRed );
2. Alternatively the styles could be specified in a java properties file
and loaded by calling readColourMapFromProperties( poFilename ),
or readColourMap() and setting the system property 'colourMap'
to the correct filename.
This file should be in java properties format, mapping
characters to colours, specified in HEX RGB.
For example:
# set everything red - = FFA2A2 N = FFA2A2 A = FFA2A2 T = FFA2A2 C = FFA2A2 G = FFA2A2
Note this is simply character based, so if you want to colour gaps then you need to specify a colour for the gap character.
If no colour is specified for a character then it is uncoloured. Primary author - Colin Hardman (CAT) Other authors - Tim Dilks (CAT) Simon Brocklehurst (CAT) Stuart Johnston (CAT) Lawerence Bower (CAT) Derek Crockford (CAT) Neil Benn (CAT) Copyright 2001 Cambridge Antibody Technology Group plc. This code released to the biojava project, May 2001 under the LGPL license.