[How do I open a gap in a large MSA and paste in a sequence block from another alignment?]

Hi Carville.

Well done for finding my email address - although you should have been able to post this to jalview-discuss@jalview.org - maybe you need to register your new email ?

Carville G. Bevans III, Ph.D. wrote:

Here's an /urgent/ "power user" question:

I have a large 327-sequence MSA (~160 residue protein domain) I created in Jalview. I made a copy of the .jar file and edited it to end up with a 25 residue subsequence MSA for which I then opimized the alignment separately. Now I would like to paste the entire 327x25 subsequence MSA back into the original large MSA, hopefully in one action. (It would take forever to use the sequence edit commands to do this one line at a time!)

I agree. It would take forever. I take it that you used another program to do the optimisation ? (read on below)

Since I'm able to select whole verticle blocks of the MSA to work on, I assume there must be some straightforward way of doing the cut-and-paste I need.

Unfortunately, there isn't at the moment. I've planned to implementa not a 'copy subalignment' command for some time, and some of the code is already present as part of the alignment web service handler - but I haven't, as yet, made a general copy/paste type function.

Following on from my remark above: If you are happy with using one of the three alignment web services to refine the 25 residue MSA, then the quickest way to do this is to perform the optimisation again :
  1. Select one or more sets of contigous columns of the alignment that you want to optimize.
  2. Use the 'Select->Invert Column Selection' function (or shift+ctrl+I) followed by the 'View->Hide->Selected columns' function (or press H) to hide the parts of the alignment that you want to preserve.
  3. Select all the visible regions and submit them to the alignment service (note - don't use 'Clustal realign' - it won't do anything in this case). The web service job window will contain one alignment job for each contiguous region.
  4. Once all the jobs finish, you'll have a new alignment window containing the re-aligned blocks pasted together. The regions that you excluded from the optimisation process will still be hidden, so select 'Reveal all hidden columns' to recover them.

However - if you've used something else to optimise the sub-alignment, the only thing I can suggest is to export both alignments in BLC format, which is unique in that each aligned column is written as a row in the ASCII file. You'll then have to manually copy the lines from the optimised sub-alignment rows into the correct position in the original alignment, and delete the rows they replace.

I hope this helps.


J. B. Procter (ENFIN/VAMSAS) 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.

Hello Carville. Sorry to hear that 2.7 is causing you problems!


On 30/09/2011 11:35, Carville G. Bevans III, Ph.D. wrote:

It’s been a few years since I last wrote you concerning a Jalview problem. Today I downloaded the latest Jalview 2.7, but was dissappointed to find out that under the WebService pulldown menu, under Alignment, that the web server alignment services are no longer there (Muscle, MAFFT, ClustalW, ClustalW Realign were in version 2.6).

Hmm. That suggests there’s a problem with your JABAWS network configuration (which would normally result in a dialog box popping up telling you there was a problem) - or you simply have JABAWS services disabled in your web services preferences.

Try going to the Jalview user preferences, and find the ‘web services’ configuration tab. Check that the ‘enable JABAWS services’ checkbox is ticked, and then click on either ‘reset services’ or ‘refresh services’. If everything has worked, then you should see the aligment submenu appear the next time you open the web services menu (check this after pressing ‘refresh services’ without closing the preference dialog box).

if the above doesn’t work, then you’ll need to send me the output from the Jalview java console. Do this by ticking the ‘jalview java console’ option in the tools menu, then close and restart Jalview.


Found the problem ... in your console output, there are the following warnings:

>Jalview Desktop 2.7
>Build Date: 28 September 2011
>Java version: 1.5.0_19
> ppc Mac OS X 10.4.11
.. and then:
Exception in thread "Thread-6" java.lang.UnsupportedClassVersionError: Bad version number in .class file
     at java.lang.ClassLoader.defineClass1(Native Method)
     at java.lang.ClassLoader.defineClass(ClassLoader.java:620)

Here lies the problem. Your machine does not have Java 1.6 (because apple never released a PPC build of java 1.6), and Jalview 2.7 as released this week isn't compatible with Java 1.5.

It's possible I can rebuild Jalview so it will run under java 1.5, but the ideal solution would be for you to move to a newer machine that supports Java 1.6 (nearly all intel based macs can run java 1.6), since I suspect that java 1.5 compatibility will be even more difficult to maintain in future Jalview releases.

Sorry about this !

ps. I'll email next week if we've managed to build Jalview 2.7 for java 1.5. Unfortunately, I can't get around to this any sooner.

Hi there.

Since you mentioned the lack of backwards file compatibility from Jalview 2.7 to 2.6, are the files created with 2.6 and earlier versions compatible with 2.7?

yes. earlier projects can be imported into 2.7. That is something I consider to be essential for every new Jalview release. Occasionally, you will find that the data in the file appears slightly differently in the new release, this is often where Jalview has had to guess the default visualization style for something that wasn't supported in earlier releases (structure colouring is one example where this happens in v2.7).

And, once earlier version files are opened and resaved in 2.7, will the files still open and be usable in version 2.6?

no. Version 2.7 files are not backwardly compatible, and version 2.7 cannot write older Jalview project files, so you really have no choice but to use version 2.7 on all machines.

Thanks, in advance, for all your effort towards rectifying the Java version usage. I hope it's not a lot of work. Also, you might want to have Jalview show a splash screen to alert users of 2.7 that they're running on Java 1.5 and to upgrade (if possible) to the newer version.

yes. I had thought about that, although in many cases, Jalview should simply fail to launch if the version of Java available is too old, but this may not be the case with the InstallAnywhere release, or when people are using a local JNLP file to launch jalview that has not been updated to the latest version (which includes the v1.6 minimum version of java requirement).



On 30/09/2011 20:02, Carville G. Bevans III, Ph.D. wrote: