Hi Mikk - this is the right place
Problem is that I would like to link protein multiple sequence alignment (MSA) with its corresponding DNA alignment, meaning that, if I click on the amino acid in some sequence in protein MSA view then the corresponding codon (three nucleotides) should be highlighted by jalview on the follower view.
interesting ! I can tell you right now that there are no applet examples currently available that do this, but we’re very keen to create some
Simpler solution would be for example, if I click on the second amino acid in some protein sequence in MSA then the fourth nucleotide should be highlighted (maybe n*3-2 correction?). At the moment if I enter a protein MSA to main view and corresponding nucleotide MSA to follower view and I select a protein at second position then second nucleotide highlights on follower view.
What you suggest is exactly what’s needed. The ‘two jalviewLites’ example simply echos events from one applet to the other, without any processing. If your DNA alignment only consist of codons then it is sort of straightforward to perform mouseover highlighting, since JalviewLite’s mouse over message gives you both sequence and alignment column position, and you can specify whether you want to highlight a position in sequence or alignment reference space:
jvfollower.highlight(“FER1_MESCR”,“70”,“false”) // residue 70
jvfollower.highlight(“FER1_MESCR”,“70”,“true”) // column 70
The only thing missing is to highlight a whole codon for a particular sequence. That’s not too hard to implement, though.
Selection is more tricky. JalviewLite works with columns for specifying regions to select, so you would need to do the column position correction yourself - and account for misaligned codons if necessary.
let me know what you’d prefer to do !
On 02/12/2014 17:40, Mikk Puustusmaa wrote: