On Wed Jul 18 02:16:12 2012, Nicee Srivastava wrote:
>
> any suggestions as how to highlight/colour the columns.
sorry for not answering your quetion 'in turn' - I was travelling at 
the time, didn't have time to properly think about your code.

Generally, to colour parts of the alignment, you'd create a sequence 
group (jalview.datamodel.SequenceGroup), which holds a set of 
references to SequenceI objects in the alignment, a start/end column 
range, and has its own colourscheme and other display attributes. Then, 
simply add the sequence group to the AlignmentI (there's a method for 
this). if you're doing this on a panel that's already displayed, then 
you can call repaint(true) to tell the AlignPanel that the view has 
changed.

If you want to colour whole columns of the alignment, rather than 
create a column selection, you could add a series of groups containing 
all sequences, and where the start/end are contiguous columns that you 
want to highlight. Set the cs field with a colourscheme to control 
colour of each group (you can create new colourschemes where every 
residue gets the same colour with 
jalview.schemes.ColourSchemeProperty.getColour(AlignmentI 
alignment,"<red/green/etc colour name>")  (note - this is the method 
signature for version 2.8 - the v2.7 code method doesn't need the 
alignment reference, IIRC).

Jim.

_______________________________________________
Jalview-dev mailing list
[email protected]
http://www.compbio.dundee.ac.uk/mailman/listinfo/jalview-dev

Reply via email to