feature groups, feature labels

Hi Patrick.

I believe I'm a mailing list member... not sure what the problem was.

Looks like the mail server rejected you because you had a reply to of 'localhost@localdomain'. I can investigate further later, but just check that you can still get a mailing list password reminder from http://www.compbio.dundee.ac.uk/mailman/listinfo/jalview-discuss

I'm adding a feature group using Javascript to jalview at runtime.
It parses and loads correctly, I even set the group visible state to
true. But, none of the labels in the feature group turn on.

You mean the feature types ? Normally, feature types turn on when they are newly added to the alignment - if there are features of that type already there then I don't think they'll be turned on by default.

They all
seem to be turned off by default, meaning none of the colors are
visible until I manually open the feature settings box and turn them
on. Why aren't the labels defined for a group enabled by default?

Partly legacy, partly because no-one has complained about it or submitted a patch to fix it. Groups in jalview traditionally relate to origin of a feature type - rather than a hierarchical parent relationship - ie if you've already get a set of types turned off, they don't get turned back on if you add another bunch of assorted features - regardless of if its come from a new group or the empty group.

  Do
we have any Javascript control of these? Barring this, can you point
me to how I can enable labels in the applet code? I've already done a
good deal of modification, and I could override one of the applet
methods or create a new one.

Sounds like you can submit a patch(or several) - I'll give you some pointers tomorrow if your interested in doing this, otherwise, add it to the bugtrack at issues.jalview.org and someone might get round to it some time. Typically, the feature type display is set by the type/colour definitions in the jalview feature file you used to import the features... I'm guessing you're importing by a gff file - is that correct?

S Also
applet.getFeatureGroups()
hits an ArrayIndexOutOfBoundsException if there are currently no
feature groups defined. This should probably return a blank string.

thanks. sounds like a one line patch to me. again - no one has given me any feedback about this, so I appreciate you letting me know!

Jim.

···

On 01/09/2010 19:57, Patrick Winters wrote:

---------- Forwarded message ----------
From: Patrick Winters<patrick.winters@gmail.com>
To: jalview-discuss@jalview.org
Date: Wed, 1 Sep 2010 14:36:03 -0400
Subject: feature groups, feature labels
Hi,
  I'm adding a feature group using Javascript to jalview at runtime.
It parses and loads correctly, I even set the group visible state to
true. But, none of the labels in the feature group turn on. They all
seem to be turned off by default, meaning none of the colors are
visible until I manually open the feature settings box and turn them
on. Why aren't the labels defined for a group enabled by default? Do
we have any Javascript control of these? Barring this, can you point
me to how I can enable labels in the applet code? I've already done a
good deal of modification, and I could override one of the applet
methods or create a new one.

Also
applet.getFeatureGroups()
hits an ArrayIndexOutOfBoundsException if there are currently no
feature groups defined. This should probably return a blank string.

--
Patrick

--
-------------------------------------------------------------------
J. B. Procter (JALVIEW/ENFIN) Barton Bioinformatics Research Group
Phone/Fax:+44(0)1382 388734/345764 http://www.compbio.dundee.ac.uk
The University of Dundee is a Scottish Registered Charity, No. SC015096.

Hi again Patrick.

I've been thinking about the problem you're having a bit more. The quick (and clunky) workaround to ensure all features are displayed is to hide *all* groups, and then display the groups you want.

However - I suspect you'll agree this is quite imprecise, and the API could really do with functions like :

Jalview.getFeatureState(boolean state);
Jalview.setFeatureState(String listoffeaturetypes,boolean state);
Jalview.setFeatureDisplayOrder(String listoffeaturetypesInOrder);
Jalview.getFeatureDisplayOrder();

Feel free to comment on the issue here: http://issues.jalview.org/browse/JAL-630

Jim.