Accessing secondary structure

Hi Jan.

I’ll try and keep this email shorter :slight_smile:

Annotations are stored on the jalview.datamodel.AlignmentI object, and you can get the alignment being worked on via the jalview.gui.AlignPanel reference.

You will need to search the alignment annotations to find all those that have Rna secondary structure.

By the way, perhaps you should take a look at the annotation editing menu (created by clicking on annotationLabel panel). This way, the user picks the secondary structure row they want to visualize by right clicking on its label, and you don’t need to search the alignment.

Jim

J. B. Procter Jalview/enfin Barton group

···

-----Original Message-----
From: Jan Engelhardt <engelhardt87@googlemail.com>
To: jalview-dev@jalview.org
Sent: Tue, 28 Jun 2011 0:38
Subject: [Jalview-dev] Accessing secondary structure

Hi,

thanks for the window embedding mail. I need some time to parse your
long mails :slight_smile:

About the secondary structure: I failed to implement a method that gets
the secondary structure from the PopupMenu and I think thats because a
single sequence does not have a secondary structure but the alignment.
However I’m still not sure how can I implement an access to the
structure in an Alignment.
The last trace I found is that the structure is processed in
parseAnnotationRow() of StockholmFile but I’m not sure what happends
with the returned AlignmentAnnotation-object and in which way I can
access it later.
Could you give me a hint what happens after that?

Maybe we can have a talk tomorrow in the evening?
Jan


Jalview-dev mailing list
Jalview-dev@jalview.org
http://www.compbio.dundee.ac.uk/mailman/listinfo/jalview-dev

specifically - take a look at the mouseClicked handler method in jalview.gui.AnnotationLabels - the annotation label popup menu is created from scratch in that method, so all you'd have to do is test the currently selected annotation row for the presence of RNA secondary structure, and if that data is present, add a menu entry to open the secondary structure in a VARNA window.

Jim.

ps. I can skype today if it's early evening (7-8pm your time) - but it would be easiest to skype earlier this afternoon.

···

On 28/06/2011 08:38, jprocter@compbio.dundee.ac.uk wrote:

By the way, perhaps you should take a look at the annotation editing menu (created by clicking on annotationLabel panel). This way, the user picks the secondary structure row they want to visualize by right clicking on its label, and you don't need to search the alignment.

Hi Jim,

I just pushed a new version of my code.
I enabled the listPanel in the VARNA panel again. The user can now
choose between different RNAs in one VARNA panel.
By Default the consensus structure and a trimmed structure (all gaps
from the sequence are removed) are displayed.
I noticed that I misunderstood the two text fields at top. They can not
be used for editing existing structures but just for adding new ones.
Therefore I do not think we need them at the moment.

I thought about editing functions in VARNA that would be nice to have. I
think one mostly wants to edit the structure and not the sequence.
Therefore we could think about adding a text field for editing the
structure.
If it would be possible to copy an existing structure the user could
edit the new one (that should be associated with that sequence in
jalview) and compare it with the already existing.

What do you think?
Jan

PS: In the new VARNA version there is an varna.applications-class called
AlignmentDemo that has some alignment functionality. For me it looked a
bit confusing but maybe we could later think about using it for some
use-cases.

Hi Jim,

I just pushed a new version of my code.
I enabled the listPanel in the VARNA panel again. The user can now
choose between different RNAs in one VARNA panel.
By Default the consensus structure and a trimmed structure (all gaps
from the sequence are removed) are displayed.

Ok - a bit ugly but definitely progress. I tried this with the standard Rfam (full) family example, since the seed alignment doesn't result in this panel being shown, and had some problems with the trimmed alignment. I suspect some of the 'gaps' in the consensus are actually cases where there is a tie - Jalview uses a '-' character in that case, when its actually not a gap (which is probably a bug, but in fact, most folk are used to it now).

I noticed that I misunderstood the two text fields at top. They can not
be used for editing existing structures but just for adding new ones.
Therefore I do not think we need them at the moment.

Ok.

I thought about editing functions in VARNA that would be nice to have. I
think one mostly wants to edit the structure and not the sequence.
Therefore we could think about adding a text field for editing the
structure.

OK - I guess that's the easiest way.

If it would be possible to copy an existing structure the user could
edit the new one (that should be associated with that sequence in
jalview) and compare it with the already existing.

Not sure what you mean here - could you provide an example ?

What do you think?

its all good! One thing we really need is to get a good example with lots of different rna structures associated with an alignment. The annotation file IO bug, and the lack of any other kind of datasource for files makes this difficult - so you should probably try to fix that IO bug as soon as possible !

I'll also get that build sorted tomorrow afternoon.

PS: In the new VARNA version there is an varna.applications-class called
AlignmentDemo that has some alignment functionality. For me it looked a
bit confusing but maybe we could later think about using it for some
use-cases.

Yes - This was what I was thinking about using - since the jalview alignment gives the correspondences (correspondence between nucleotides so when the diagram morphs from one structure to another, those nucleotides stay in the same place), it should be a good fit.

ok - off now :slight_smile:
Jim.

···

On 01/07/2011 16:47, Jan Engelhardt wrote:

Hi all.

Jan's version of Jalview is available from these addresses:

http://www.compbio.dundee.ac.uk/user/ws-dev1/jalview/jan/webstart/jalview_2G.jnlp
http://www.compbio.dundee.ac.uk/user/ws-dev1/jalview/jan/webstart/jalview_1G.jnlp
http://www.compbio.dundee.ac.uk/user/ws-dev1/jalview/jan/webstart/jalview.jnlp

As usual, you can also find all the other build artifacts under
http://www.compbio.dundee.ac.uk/user/ws-dev1/jalview/jan

Jim.

Hi Jan.

I've had a chance to take a look at the updates in more detail after getting the automated build working, and have some thoughts:

I just pushed a new version of my code.
I enabled the listPanel in the VARNA panel again. The user can now
choose between different RNAs in one VARNA panel.
By Default the consensus structure and a trimmed structure (all gaps
from the sequence are removed) are displayed.

Ok - a bit ugly but definitely progress. I tried this with the standard
Rfam (full) family example, since the seed alignment doesn't result in
this panel being shown, and had some problems with the trimmed
alignment. I suspect some of the 'gaps' in the consensus are actually
cases where there is a tie - Jalview uses a '-' character in that case,
when its actually not a gap (which is probably a bug, but in fact, most
folk are used to it now).

I've worked out what's going on here. When opening the VARNA panel for some sequences, the pairing structure in the trimmed structure is broken because there were gaps in the sequence that was selected when the varna panel was opened which broke the WUSS bracket pattern. This is probably going to happen often, so you'll need to add some checks to ensure that VARNA isn't passed an invalid structure .. or at least provide some visual indication that the consensus structure is not valid for that structure. I'm guessing that this should also be reflected in the Helix colourscheme - to highlight sequences where the consensus does not apply.

For the VARNA window, perhaps invalid structure WUSS strings could still be shown in the text field that you suggest below, but have it coloured in red (like VARNA can already do) to indicate that the structure is not valid. The user could then edit the trimmed structure and choose to annotate the sequence with it.

I noticed that I misunderstood the two text fields at top. They can not
be used for editing existing structures but just for adding new ones.
Therefore I do not think we need them at the moment.

Ok.

I thought about editing functions in VARNA that would be nice to have. I
think one mostly wants to edit the structure and not the sequence.
Therefore we could think about adding a text field for editing the
structure.

Lets try to think of the specific tasks that we'd like the user to perform:
1. view consensus structure for an alignment. This can now be done, but I think you need to explicitly call this structure 'Consensus' in the side panel and in the title shown in VARNA.
2. view how the consensus structure fits a particular sequence in the alignment - this is the trimmed WUSS string. Here, you need visual indications for whether the structure fits or not (check for compatible base pairing as well as gaps).
3. View a sequence's own secondary structure(s). Here, there will probably be some informative label on the annotation row that holds the secondary structure for the sequence (perhaps a special label indicating when this sequence forms this structure). All distinct 'sequence associated' secondary structures need to be distinguished in the VARNA side panel.
4. Compare two (or more) secondary structures. You mentioned the 'AlignmentDemo' - which looks like it allows two secondary structures to be compared - this could be used for :
a. comparing an observed secondary structure for a sequence against the consensus secondary structure for the alignment.
b. comparing different observed secondary structures for the same sequence.
c. comparing secondary structures from different sequences.

5. Editing/Creating new secondary structure. In any of the above viewing situations, the user might want to edit or create a new secondary structure entry. There are two situations this is probably useful:
a. curating a given secondary structure in the light of new knowledge, or comparison with the consensus for an alignment.
b. transferring a consensus prediction onto a specific sequence - this is essentially the next thing the user might want to do after performing step 2 - mapping the consensus onto a specific sequence, so you might need to provide a 'transfer' or 'save structure on sequence' button that saves the trimmed version as a new annotation row specifically associated with the given sequence, and then allows the user to edit the newly created structure.

If it would be possible to copy an existing structure the user could
edit the new one (that should be associated with that sequence in
jalview) and compare it with the already existing.
Not sure what you mean here - could you provide an example ?

I think that you were talking about the situation in 5.b. - where the user would want to copy an existing [consensus] structure onto a specific sequence, and then go on and edit it for that sequence, in the light of the original consensus structure for the alignment.

How do these use cases sound to you ? If they sound OK, then we can then look at exactly what kinds of GUI events need to be exchanged between jalview and varna (e.g. dynamic highlighting, selecting, colouring of varna usng Jalview, or colouring Jalview using varna, etc).

Jim.

···

On 01/07/2011 18:07, Jim Procter wrote:

On 01/07/2011 16:47, Jan Engelhardt wrote:

Further to Jim’s comment 3. I’ve attached an alignment with individual (MFE) structures marked up within the alignment (the “#=GR SS” lines). The beauty of the Stockholm format is that it supports exactly this sort of annotation.

Also, regarding 5b. It’d be useful to be able to do a constrained-fold of the sequence using the consensus structure to provide the constraints. This is “RNAfold -C” in Vienna parlance.

RF00031_folded.stk (18.7 KB)

···

On Sun, Jul 3, 2011 at 06:14, Jim Procter <jprocter@compbio.dundee.ac.uk> wrote:

Hi Jan.

I’ve had a chance to take a look at the updates in more detail after
getting the automated build working, and have some thoughts:

On 01/07/2011 18:07, Jim Procter wrote:

On 01/07/2011 16:47, Jan Engelhardt wrote:

I just pushed a new version of my code.
I enabled the listPanel in the VARNA panel again. The user can now
choose between different RNAs in one VARNA panel.
By Default the consensus structure and a trimmed structure (all gaps
from the sequence are removed) are displayed.
Ok - a bit ugly but definitely progress. I tried this with the standard
Rfam (full) family example, since the seed alignment doesn’t result in
this panel being shown, and had some problems with the trimmed
alignment. I suspect some of the ‘gaps’ in the consensus are actually
cases where there is a tie - Jalview uses a ‘-’ character in that case,
when its actually not a gap (which is probably a bug, but in fact, most
folk are used to it now).

I’ve worked out what’s going on here. When opening the VARNA panel for
some sequences, the pairing structure in the trimmed structure is broken
because there were gaps in the sequence that was selected when the varna
panel was opened which broke the WUSS bracket pattern. This is probably
going to happen often, so you’ll need to add some checks to ensure that
VARNA isn’t passed an invalid structure … or at least provide some
visual indication that the consensus structure is not valid for that
structure. I’m guessing that this should also be reflected in the Helix
colourscheme - to highlight sequences where the consensus does not apply.

For the VARNA window, perhaps invalid structure WUSS strings could still
be shown in the text field that you suggest below, but have it coloured
in red (like VARNA can already do) to indicate that the structure is not
valid. The user could then edit the trimmed structure and choose to
annotate the sequence with it.

I noticed that I misunderstood the two text fields at top. They can not
be used for editing existing structures but just for adding new ones.
Therefore I do not think we need them at the moment.
Ok.
I thought about editing functions in VARNA that would be nice to have. I
think one mostly wants to edit the structure and not the sequence.
Therefore we could think about adding a text field for editing the
structure.

Lets try to think of the specific tasks that we’d like the user to perform:

  1. view consensus structure for an alignment. This can now be done, but
    I think you need to explicitly call this structure ‘Consensus’ in the
    side panel and in the title shown in VARNA.

  2. view how the consensus structure fits a particular sequence in the
    alignment - this is the trimmed WUSS string. Here, you need visual
    indications for whether the structure fits or not (check for compatible
    base pairing as well as gaps).

  3. View a sequence’s own secondary structure(s). Here, there will
    probably be some informative label on the annotation row that holds the
    secondary structure for the sequence (perhaps a special label indicating
    when this sequence forms this structure). All distinct ‘sequence
    associated’ secondary structures need to be distinguished in the VARNA
    side panel.

  4. Compare two (or more) secondary structures. You mentioned the
    ‘AlignmentDemo’ - which looks like it allows two secondary structures to
    be compared - this could be used for :
    a. comparing an observed secondary structure for a sequence against the
    consensus secondary structure for the alignment.
    b. comparing different observed secondary structures for the same sequence.
    c. comparing secondary structures from different sequences.

  5. Editing/Creating new secondary structure. In any of the above viewing
    situations, the user might want to edit or create a new secondary
    structure entry. There are two situations this is probably useful:
    a. curating a given secondary structure in the light of new knowledge,
    or comparison with the consensus for an alignment.
    b. transferring a consensus prediction onto a specific sequence - this
    is essentially the next thing the user might want to do after performing
    step 2 - mapping the consensus onto a specific sequence, so you might
    need to provide a ‘transfer’ or ‘save structure on sequence’ button that
    saves the trimmed version as a new annotation row specifically
    associated with the given sequence, and then allows the user to edit the
    newly created structure.

If it would be possible to copy an existing structure the user could
edit the new one (that should be associated with that sequence in
jalview) and compare it with the already existing.
Not sure what you mean here - could you provide an example ?

I think that you were talking about the situation in 5.b. - where the
user would want to copy an existing [consensus] structure onto a
specific sequence, and then go on and edit it for that sequence, in the
light of the original consensus structure for the alignment.

How do these use cases sound to you ? If they sound OK, then we can
then look at exactly what kinds of GUI events need to be exchanged
between jalview and varna (e.g. dynamic highlighting, selecting,
colouring of varna usng Jalview, or colouring Jalview using varna, etc).

Jim.


Jalview-dev mailing list
Jalview-dev@jalview.org
http://www.compbio.dundee.ac.uk/mailman/listinfo/jalview-dev

Hi Jim & Jan,

What’s the difference, if any, between these addresses?

Cheers,
Paul.

···

On Sun, Jul 3, 2011 at 04:19, Jim Procter <jprocter@compbio.dundee.ac.uk> wrote:

Hi all.

Jan’s version of Jalview is available from these addresses:

http://www.compbio.dundee.ac.uk/user/ws-dev1/jalview/jan/webstart/jalview_2G.jnlp
http://www.compbio.dundee.ac.uk/user/ws-dev1/jalview/jan/webstart/jalview_1G.jnlp
http://www.compbio.dundee.ac.uk/user/ws-dev1/jalview/jan/webstart/jalview.jnlp

As usual, you can also find all the other build artifacts under
http://www.compbio.dundee.ac.uk/user/ws-dev1/jalview/jan

Jim.


Jalview-dev mailing list
Jalview-dev@jalview.org
http://www.compbio.dundee.ac.uk/mailman/listinfo/jalview-dev

Hi Paul - thanks for the notes on usecases :slight_smile:

What’s the difference, if any, between these addresses?

good question ! The only difference is the amount of memory allocated to Jalview when it starts up. Since we haven’t come up with some clever mechanism of doing this automatically, yet (although I do have an idea which involves our launchApp service), you have to modify the webstart JNLP file to change the Java memory parameters.

http://www.compbio.dundee.ac.uk/user/ws-dev1/jalview/jan/webstart/jalview_2G.jnlp
http://www.compbio.dundee.ac.uk/user/ws-dev1/jalview/jan/webstart/jalview_1G.jnlp
http://www.compbio.dundee.ac.uk/user/ws-dev1/jalview/jan/webstart/jalview.jnlp

The 2G version will allocate 1G of memory to Jalview, and the 1G version allocates 512MB. Due to some bizarreness with JVMs, you can’t ask for more than around half of your machine’s physical memory - any more and the JVM will refuse to start.

As usual, you can also find all the other build artifacts under
http://www.compbio.dundee.ac.uk/user/ws-dev1/jalview/jan

This is just the parent directory for the full build set - i.e. the source archive, InstallAnywhere distribution, applet and its online documentation.

Jim.

···

On 03/07/2011 23:43, Paul P. Gardner wrote:

Hi Paul.

···

On 03/07/2011 23:25, Paul P. Gardner wrote:

Further to Jim's comment 3. I've attached an alignment with individual (MFE) structures marked up within the alignment (the "#=GR <seqname> SS" lines). The beauty of the Stockholm format is that it supports exactly this sort of annotation.

Thanks for this ! I just tried it on Jan's latest build, and it doesn't seem to play nice yet, but it gives us something to work towards :slight_smile:

One thing I notice here is that the consensus secondary structure includes a mix of '-' and '_' - is there any difference in how these characters should be treated ? (it looks like the _ appears in a loop).

Jim.

I noticed that I misunderstood the two text fields at top. They can not
be used for editing existing structures but just for adding new ones.
Therefore I do not think we need them at the moment.

I'm not too sure, but you seem to be integrating the VARNAGUI class, right?
It would perhaps be better to create your own view/model structure, and to integrate
some instance(s) of the VARNAPanel, which already provides anything in store for VARNA.

I thought about editing functions in VARNA that would be nice to have. I
think one mostly wants to edit the structure and not the sequence.
Therefore we could think about adding a text field for editing the
structure.

Editing structure is already possible within VARNA. What you are looking for is the
"Ctrl+Left click/Drag" (undocumented :frowning: ) gesture.

If it would be possible to copy an existing structure the user could
edit the new one (that should be associated with that sequence in
jalview) and compare it with the already existing.

The new FullBackup(VARNAConfig conf, RNA r, String title) might be what you are looking for.
It really clones the necessary models (RNA + Panel configuration), so that user can now perform
edits on a fresh copy.

Best,

Yann

···

--
Yann Ponty (mailto:yann.ponty@lix.polytechnique.fr)
CNRS junior research scientist-INRIA associate (AMIB team)
http://www.lix.polytechnique.fr/~ponty/
Laboratoire d'Informatique de l'Ecole Polytechnique (LIX)
Bioinformatics team
Tel: +33.1.69.33.41.12 fax: ++33.1.69.33.40.49
Address: LIX (L0), room 412-7
Ecole Polytechnique, 91128 Palaiseau,FRANCE

Yes - This was what I was thinking about using - since the jalview
alignment gives the correspondences (correspondence between nucleotides
so when the diagram morphs from one structure to another, those
nucleotides stay in the same place), it should be a good fit.

Actually, we have at least three ways to highlight correspondences:
   1) Supertree (AlignmentDemo application): Given two aligned sequences and a consensus
   structure (eg Stockholm format), one can draw a common supertree (aka super-secondary
   structure, aka RFAM consensus), where each node features the base/gaps in each sequence.
   No very pretty, and does not scale up very well for diverse structures, AND requires a
   consensus structure (subtly different from an alignment when two input structures are given,
   but we also have an algorithm in VARNA to align two trees in reasonable time) but worth
   mentioning nevertheless.

    Recently, we added a superimposition procedure:
      ControleurInterpolator.moveNearOtherRNA(RNA rna1, RNA rna2, Mapping mapping)
   which takes two already-drawn RNAs and a mapping, computes an RMSD minimization,
   and shifts/rotates rna2 accordingly.

   2) Morphs (aka position interpolations), which require a mapping between the two structures.
   Two similar-looking RNAs will give rise to very small changes, whereas dissimilar will give a visual "explosion".
   3) Side-by-Side (SuperpositionDemo application): Simply superimpose them in two separate panels
    Each time a structure is moved, the other one is shifted/rotated to minimize the visual distance.
    This can be useful for structures that have to be "disentangled".

Let me know what seems best for you, and I can help you locate code examples.

Yann

···

ok - off now :slight_smile:
Jim.
_______________________________________________
Jalview-dev mailing list
Jalview-dev@jalview.org
http://www.compbio.dundee.ac.uk/mailman/listinfo/jalview-dev

--
Yann Ponty (mailto:yann.ponty@lix.polytechnique.fr)
CNRS junior research scientist-INRIA associate (AMIB team)
http://www.lix.polytechnique.fr/~ponty/
Laboratoire d'Informatique de l'Ecole Polytechnique (LIX)
Bioinformatics team
Tel: +33.1.69.33.41.12 fax: ++33.1.69.33.40.49
Address: LIX (L0), room 412-7
Ecole Polytechnique, 91128 Palaiseau,FRANCE

Hi,

thanks for the file.

To be able to call RNAfold from Jalview would be definitely very cool.
However since it's a complete new construction site this has to wait
until the end of the summer project or even later.

best
Jan

···

On 07/04/11 00:25, Paul P. Gardner wrote:

Further to Jim's comment 3. I've attached an alignment with individual (MFE)
structures marked up within the alignment (the "#=GR <seqname> SS" lines).
The beauty of the Stockholm format is that it supports exactly this sort of
annotation.

Also, regarding 5b. It'd be useful to be able to do a constrained-fold of
the sequence using the consensus structure to provide the constraints. This
is "RNAfold -C" in Vienna parlance.

On Sun, Jul 3, 2011 at 06:14, Jim Procter <jprocter@compbio.dundee.ac.uk>wrote:

Hi Jan.

I've had a chance to take a look at the updates in more detail after
getting the automated build working, and have some thoughts:

On 01/07/2011 18:07, Jim Procter wrote:

On 01/07/2011 16:47, Jan Engelhardt wrote:

I just pushed a new version of my code.
I enabled the listPanel in the VARNA panel again. The user can now
choose between different RNAs in one VARNA panel.
By Default the consensus structure and a trimmed structure (all gaps
from the sequence are removed) are displayed.

Ok - a bit ugly but definitely progress. I tried this with the standard
Rfam (full) family example, since the seed alignment doesn't result in
this panel being shown, and had some problems with the trimmed
alignment. I suspect some of the 'gaps' in the consensus are actually
cases where there is a tie - Jalview uses a '-' character in that case,
when its actually not a gap (which is probably a bug, but in fact, most
folk are used to it now).

I've worked out what's going on here. When opening the VARNA panel for
some sequences, the pairing structure in the trimmed structure is broken
because there were gaps in the sequence that was selected when the varna
panel was opened which broke the WUSS bracket pattern. This is probably
going to happen often, so you'll need to add some checks to ensure that
VARNA isn't passed an invalid structure .. or at least provide some
visual indication that the consensus structure is not valid for that
structure. I'm guessing that this should also be reflected in the Helix
colourscheme - to highlight sequences where the consensus does not apply.

For the VARNA window, perhaps invalid structure WUSS strings could still
be shown in the text field that you suggest below, but have it coloured
in red (like VARNA can already do) to indicate that the structure is not
valid. The user could then edit the trimmed structure and choose to
annotate the sequence with it.

I noticed that I misunderstood the two text fields at top. They can not
be used for editing existing structures but just for adding new ones.
Therefore I do not think we need them at the moment.

Ok.

I thought about editing functions in VARNA that would be nice to have. I
think one mostly wants to edit the structure and not the sequence.
Therefore we could think about adding a text field for editing the
structure.

Lets try to think of the specific tasks that we'd like the user to perform:
1. view consensus structure for an alignment. This can now be done, but
I think you need to explicitly call this structure 'Consensus' in the
side panel and in the title shown in VARNA.
2. view how the consensus structure fits a particular sequence in the
alignment - this is the trimmed WUSS string. Here, you need visual
indications for whether the structure fits or not (check for compatible
base pairing as well as gaps).
3. View a sequence's own secondary structure(s). Here, there will
probably be some informative label on the annotation row that holds the
secondary structure for the sequence (perhaps a special label indicating
when this sequence forms this structure). All distinct 'sequence
associated' secondary structures need to be distinguished in the VARNA
side panel.
4. Compare two (or more) secondary structures. You mentioned the
'AlignmentDemo' - which looks like it allows two secondary structures to
be compared - this could be used for :
a. comparing an observed secondary structure for a sequence against the
consensus secondary structure for the alignment.
b. comparing different observed secondary structures for the same sequence.
c. comparing secondary structures from different sequences.

5. Editing/Creating new secondary structure. In any of the above viewing
situations, the user might want to edit or create a new secondary
structure entry. There are two situations this is probably useful:
a. curating a given secondary structure in the light of new knowledge,
or comparison with the consensus for an alignment.
b. transferring a consensus prediction onto a specific sequence - this
is essentially the next thing the user might want to do after performing
step 2 - mapping the consensus onto a specific sequence, so you might
need to provide a 'transfer' or 'save structure on sequence' button that
saves the trimmed version as a new annotation row specifically
associated with the given sequence, and then allows the user to edit the
newly created structure.

If it would be possible to copy an existing structure the user could
edit the new one (that should be associated with that sequence in
jalview) and compare it with the already existing.
Not sure what you mean here - could you provide an example ?

I think that you were talking about the situation in 5.b. - where the
user would want to copy an existing [consensus] structure onto a
specific sequence, and then go on and edit it for that sequence, in the
light of the original consensus structure for the alignment.

How do these use cases sound to you ? If they sound OK, then we can
then look at exactly what kinds of GUI events need to be exchanged
between jalview and varna (e.g. dynamic highlighting, selecting,
colouring of varna usng Jalview, or colouring Jalview using varna, etc).

Jim.

_______________________________________________
Jalview-dev mailing list
Jalview-dev@jalview.org
http://www.compbio.dundee.ac.uk/mailman/listinfo/jalview-dev

_______________________________________________
Jalview-dev mailing list
Jalview-dev@jalview.org
http://www.compbio.dundee.ac.uk/mailman/listinfo/jalview-dev

Hi Paul,

I figured out that the problems with my build are related to the new gap
type: "_".
Maybe it would be useful if you could give us a hint what the meaning
is, before I adopt our parsing methods.

thanks a lot
Jan

···

On 07/04/11 11:01, Jim Procter wrote:

Hi Paul.

On 03/07/2011 23:25, Paul P. Gardner wrote:

Further to Jim's comment 3. I've attached an alignment with individual
(MFE) structures marked up within the alignment (the "#=GR <seqname>
SS" lines). The beauty of the Stockholm format is that it supports
exactly this sort of annotation.

Thanks for this ! I just tried it on Jan's latest build, and it doesn't
seem to play nice yet, but it gives us something to work towards :slight_smile:

One thing I notice here is that the consensus secondary structure
includes a mix of '-' and '_' - is there any difference in how these
characters should be treated ? (it looks like the _ appears in a loop).

Jim.
_______________________________________________
Jalview-dev mailing list
Jalview-dev@jalview.org
http://www.compbio.dundee.ac.uk/mailman/listinfo/jalview-dev

Hi Yann,

the Supertree correspondence-highlighting sounds interesting for some
use-cases.
Do you have further example data or documentation for it because we are
at the moment not completely sure how it is supposed to behave.

We would appreciate you help with the state saving very much. We would
come back to that later. I will visit Jim in two weeks and this sounds
like an issue that is better discussed in person.

best regards
Jan

···

On 07/04/11 11:48, Yann Ponty wrote:

Yes - This was what I was thinking about using - since the jalview
alignment gives the correspondences (correspondence between nucleotides
so when the diagram morphs from one structure to another, those
nucleotides stay in the same place), it should be a good fit.

Actually, we have at least three ways to highlight correspondences:
   1) Supertree (AlignmentDemo application): Given two aligned sequences
and a consensus
   structure (eg Stockholm format), one can draw a common supertree (aka
super-secondary
   structure, aka RFAM consensus), where each node features the
base/gaps in each sequence.
   No very pretty, and does not scale up very well for diverse
structures, AND requires a
   consensus structure (subtly different from an alignment when two
input structures are given,
   but we also have an algorithm in VARNA to align two trees in
reasonable time) but worth
   mentioning nevertheless.

    Recently, we added a superimposition procedure:
      ControleurInterpolator.moveNearOtherRNA(RNA rna1, RNA rna2,
Mapping mapping)
   which takes two already-drawn RNAs and a mapping, computes an RMSD
minimization,
   and shifts/rotates rna2 accordingly.

   2) Morphs (aka position interpolations), which require a mapping
between the two structures.
   Two similar-looking RNAs will give rise to very small changes,
whereas dissimilar will give a visual "explosion".
   3) Side-by-Side (SuperpositionDemo application): Simply superimpose
them in two separate panels
    Each time a structure is moved, the other one is shifted/rotated to
minimize the visual distance.
    This can be useful for structures that have to be "disentangled".

Let me know what seems best for you, and I can help you locate code
examples.

Yann

ok - off now :slight_smile:
Jim.
_______________________________________________
Jalview-dev mailing list
Jalview-dev@jalview.org
http://www.compbio.dundee.ac.uk/mailman/listinfo/jalview-dev

Hi Jan,

the Supertree correspondence-highlighting sounds interesting for some
use-cases.
Do you have further example data or documentation for it because we are
at the moment not completely sure how it is supposed to behave.

First, you might want to look at the "AlignmentDemo":
    java -cp VARNAxxx.jar fr.orsay.lri.varna.applications.AlignmentDemo
to see if this mode works for your intended use cases.

Using this mode within a, previously allocated instance "vpMaster" of VARNAPanel can be done through:
     vpMaster.drawRNA(seq1, str1,seq2, str2,drawMode);
Where:
   - seq1 is the first RNA sequence, gapped '-' (String)
   - str1 is the secondary structure of seq1 (dot-bracket notation+Gaps '-') (String)
   - seq2 is the first RNA sequence, gapped '-' (String)
   - str2 is the secondary structure of seq1 (dot-bracket notation+Gaps '-') (String)
   - drawMode is an int code for one of the algorithms defined in RNA.
     For continuity you might want to use vpMaster.getDrawMode() (previously used layout algorithm)

Additional prerequisites:
   - |seq1| = |str1| = |seq2| = |str2| (Four strings have equal length including gaps)
   - Gaps chars have to be found at same positions for seq1 and dbnStr1 (resp. seq2 and str2)
   - str1 and str2 have to match on non-gapped portions, and form a valid secondary structure when merged
E.g.:
   seq1 AA----CUU
   str1 ((----.))
   seq2 -GGUUCCC-
   str2 _((..).)-

If you are interested, I can provide an API where a single sec. str. is specified (avoiding the necessity to "break" the structure in two)

We would appreciate you help with the state saving very much. We would
come back to that later. I will visit Jim in two weeks and this sounds
like an issue that is better discussed in person.

No problem, cannot say I have much time for this before August anyway...

Yann

···

best regards
Jan

On 07/04/11 11:48, Yann Ponty wrote:

Yes - This was what I was thinking about using - since the jalview
alignment gives the correspondences (correspondence between nucleotides
so when the diagram morphs from one structure to another, those
nucleotides stay in the same place), it should be a good fit.

Actually, we have at least three ways to highlight correspondences:
    1) Supertree (AlignmentDemo application): Given two aligned sequences
and a consensus
    structure (eg Stockholm format), one can draw a common supertree (aka
super-secondary
    structure, aka RFAM consensus), where each node features the
base/gaps in each sequence.
    No very pretty, and does not scale up very well for diverse
structures, AND requires a
    consensus structure (subtly different from an alignment when two
input structures are given,
    but we also have an algorithm in VARNA to align two trees in
reasonable time) but worth
    mentioning nevertheless.

     Recently, we added a superimposition procedure:
       ControleurInterpolator.moveNearOtherRNA(RNA rna1, RNA rna2,
Mapping mapping)
    which takes two already-drawn RNAs and a mapping, computes an RMSD
minimization,
    and shifts/rotates rna2 accordingly.

    2) Morphs (aka position interpolations), which require a mapping
between the two structures.
    Two similar-looking RNAs will give rise to very small changes,
whereas dissimilar will give a visual "explosion".
    3) Side-by-Side (SuperpositionDemo application): Simply superimpose
them in two separate panels
     Each time a structure is moved, the other one is shifted/rotated to
minimize the visual distance.
     This can be useful for structures that have to be "disentangled".

Let me know what seems best for you, and I can help you locate code
examples.

Yann

ok - off now :slight_smile:
Jim.
_______________________________________________
Jalview-dev mailing list
Jalview-dev@jalview.org
http://www.compbio.dundee.ac.uk/mailman/listinfo/jalview-dev

_______________________________________________
Jalview-dev mailing list
Jalview-dev@jalview.org
http://www.compbio.dundee.ac.uk/mailman/listinfo/jalview-dev

--
Yann Ponty (mailto:yann.ponty@lix.polytechnique.fr)
CNRS junior research scientist-INRIA associate (AMIB team)
http://www.lix.polytechnique.fr/~ponty/
Laboratoire d'Informatique de l'Ecole Polytechnique (LIX)
Bioinformatics team
Tel: +33.1.69.33.41.12 fax: ++33.1.69.33.40.49
Address: LIX (L0), room 412-7
Ecole Polytechnique, 91128 Palaiseau,FRANCE

Errmmm. I’m not entirely sure to be honest. Usually I check the Infernal/HMMER manuals for things like this. However, a parser that throws a wobbly over any strange character is not terribly useful IMHO. Individuals may use non-standard characters to indicate any number of cases. For example, on occasion I use “~” to indicate unknown data (eg. truncated sequences, sequencing errors, …). Things like this may happen frequently and be quite individualised.

···

On Mon, Jul 11, 2011 at 21:17, Jan Engelhardt <engelhardt87@googlemail.com> wrote:

Hi Paul,

I figured out that the problems with my build are related to the new gap
type: “_”.
Maybe it would be useful if you could give us a hint what the meaning
is, before I adopt our parsing methods.

thanks a lot
Jan

On 07/04/11 11:01, Jim Procter wrote:

Hi Paul.

On 03/07/2011 23:25, Paul P. Gardner wrote:

Further to Jim’s comment 3. I’ve attached an alignment with individual
(MFE) structures marked up within the alignment (the “#=GR
SS” lines). The beauty of the Stockholm format is that it supports
exactly this sort of annotation.

Thanks for this ! I just tried it on Jan’s latest build, and it doesn’t
seem to play nice yet, but it gives us something to work towards :slight_smile:

One thing I notice here is that the consensus secondary structure
includes a mix of ‘-’ and ‘_’ - is there any difference in how these
characters should be treated ? (it looks like the _ appears in a loop).

Jim.


Jalview-dev mailing list
Jalview-dev@jalview.org
http://www.compbio.dundee.ac.uk/mailman/listinfo/jalview-dev


Jalview-dev mailing list
Jalview-dev@jalview.org
http://www.compbio.dundee.ac.uk/mailman/listinfo/jalview-dev

Lauren blogged about this last year, Jan - you might want to check the links from her post:
http://jalview-rnasupport.blogspot.com/2010/06/parsing-wuss-notation-of-rna-secondary.html

From the looks of it, it's probably reasonably safe to assume that '_', '-' and '.' are interchangeable - but it'd be nice to have that confirmed by an expert :slight_smile:

Jim.

···

On 11/07/2011 11:59, Paul P. Gardner wrote:

Errmmm. I'm not entirely sure to be honest. Usually I check the Infernal/HMMER manuals for things like this. However, a parser that throws a wobbly over any strange character is not terribly useful IMHO. Individuals may use non-standard characters to indicate any number of cases. For example, on occasion I use "~" to indicate unknown data (eg. truncated sequences, sequencing errors, ...). Things like this may happen frequently and be quite individualised.

Hi Yann,

I'm currently with Jim in Dundee. There are already some new nice
features concerning the interaction of Jalview of Varna, eg. sequence
highlighting.
As we mentioned earlier we would like to be able to save the current
Varna state. Store it in xml-format would suits us very well.
We thought about which VARNA features we would like to get saved the most.

These are the features that we would really like to be able to restore:
-the current base positions in the diagram
-Annotations added to the sequence
-base coloring
-the draw algorithm
-the rotation of the structure
-zoom level

Minor prioritized would be:
-backbone color
-base-pair style
-color map
-background color

I also noticed that the selection of the sequence by a mouse click is
gone after one releases the mouse. In contrast to regions selected by
dragging a box around them. I'm not sure if it's by purpose by I think
it makes mouse selections a bit uncomfortable.
Another thing is that we would like to send sequence or structure edits
that where made in VARNA back to Jalview. Are there some public usable
Listeners for that? I could not figure them out.

Do you think you could do something about this stuff?

I'm looking foward to you answer.
best
Jan

Hi everybody,

my summer of code project is coming to an end soon. Therefore I would
highly appreciate for any comments on the current version especially bug
reports.
Of course we are also open for future feature requests.

My versions can still be accessed by the links Jim posted some time ago:

http://www.compbio.dundee.ac.uk/user/ws-dev1/jalview/jan/webstart/jalview_2G.jnlp
http://www.compbio.dundee.ac.uk/user/ws-dev1/jalview/jan/webstart/jalview_1G.jnlp
http://www.compbio.dundee.ac.uk/user/ws-dev1/jalview/jan/webstart/jalview.jnlp

As usual, you can also find all the other build artifacts under
http://www.compbio.dundee.ac.uk/user/ws-dev1/jalview/jan

Jan