Merge branch 'features/JAL-1759jmolUpdate' into develop
authorJim Procter <jprocter@issues.jalview.org>
Thu, 23 Jul 2015 18:03:21 +0000 (19:03 +0100)
committerJim Procter <jprocter@issues.jalview.org>
Thu, 23 Jul 2015 18:03:21 +0000 (19:03 +0100)
updates from revisions due to JAL-1805

1  2 
src/jalview/gui/Jalview2XML.java
test/MCview/PDBChainTest.java
test/jalview/bin/CommandLineOperations.java

@@@ -676,8 -676,7 +676,7 @@@ public class Jalview2XM
      {
        final SequenceI jds = jal.getSequenceAt(i);
        final SequenceI jdatasq = jds.getDatasetSequence() == null ? jds
-               : jds
-               .getDatasetSequence();
+               : jds.getDatasetSequence();
        String id = seqHash(jds);
  
        if (seqRefIds.get(id) != null)
  
        if (jds.getSequenceFeatures() != null)
        {
-         jalview.datamodel.SequenceFeature[] sf = jds
-                 .getSequenceFeatures();
+         jalview.datamodel.SequenceFeature[] sf = jds.getSequenceFeatures();
          int index = 0;
          while (index < sf.length)
          {
            }
          }
  
- //      {
- //        AlcodonFrame alc = new AlcodonFrame();
- //        vamsasSet.addAlcodonFrame(alc);
- //        for (int p = 0; p < acf.aaWidth; p++)
- //        {
- //          Alcodon cmap = new Alcodon();
- //          if (acf.codons[p] != null)
- //          {
- //            // Null codons indicate a gapped column in the translated peptide
- //            // alignment.
- //            cmap.setPos1(acf.codons[p][0]);
- //            cmap.setPos2(acf.codons[p][1]);
- //            cmap.setPos3(acf.codons[p][2]);
- //          }
- //          alc.addAlcodon(cmap);
- //        }
- //        if (acf.getProtMappings() != null
- //                && acf.getProtMappings().length > 0)
- //        {
- //          SequenceI[] dnas = acf.getdnaSeqs();
- //          jalview.datamodel.Mapping[] pmaps = acf.getProtMappings();
- //          for (int m = 0; m < pmaps.length; m++)
- //          {
- //            AlcodMap alcmap = new AlcodMap();
- //            alcmap.setDnasq(seqHash(dnas[m]));
- //            alcmap.setMapping(createVamsasMapping(pmaps[m], dnas[m], null,
- //                    false));
- //            alc.addAlcodMap(alcmap);
- //          }
- //        }
+         // {
+         // AlcodonFrame alc = new AlcodonFrame();
+         // vamsasSet.addAlcodonFrame(alc);
+         // for (int p = 0; p < acf.aaWidth; p++)
+         // {
+         // Alcodon cmap = new Alcodon();
+         // if (acf.codons[p] != null)
+         // {
+         // // Null codons indicate a gapped column in the translated peptide
+         // // alignment.
+         // cmap.setPos1(acf.codons[p][0]);
+         // cmap.setPos2(acf.codons[p][1]);
+         // cmap.setPos3(acf.codons[p][2]);
+         // }
+         // alc.addAlcodon(cmap);
+         // }
+         // if (acf.getProtMappings() != null
+         // && acf.getProtMappings().length > 0)
+         // {
+         // SequenceI[] dnas = acf.getdnaSeqs();
+         // jalview.datamodel.Mapping[] pmaps = acf.getProtMappings();
+         // for (int m = 0; m < pmaps.length; m++)
+         // {
+         // AlcodMap alcmap = new AlcodMap();
+         // alcmap.setDnasq(seqHash(dnas[m]));
+         // alcmap.setMapping(createVamsasMapping(pmaps[m], dnas[m], null,
+         // false));
+         // alc.addAlcodMap(alcmap);
+         // }
+         // }
        }
      }
  
  
              if (sg.cs instanceof jalview.schemes.UserColourScheme)
              {
-               jGroup.setColour(setUserColourScheme(sg.cs, userColours,
-                       jms));
+               jGroup.setColour(setUserColourScheme(sg.cs, userColours, jms));
              }
              else
              {
-               jGroup
-                       .setColour(ColourSchemeProperty.getColourName(sg.cs));
+               jGroup.setColour(ColourSchemeProperty.getColourName(sg.cs));
              }
            }
            else if (sg.cs instanceof jalview.schemes.AnnotationColourGradient)
            }
            else if (sg.cs instanceof jalview.schemes.UserColourScheme)
            {
-             jGroup
-                     .setColour(setUserColourScheme(sg.cs, userColours, jms));
+             jGroup.setColour(setUserColourScheme(sg.cs, userColours, jms));
            }
            else
            {
              else
              {
                setting.setColour(ap.getSeqPanel().seqCanvas
-                       .getFeatureRenderer()
-                       .getColour(renderOrder[ro]).getRGB());
+                       .getFeatureRenderer().getColour(renderOrder[ro])
+                       .getRGB());
              }
  
              setting.setDisplay(av.getFeaturesDisplayed().isVisible(
            final SequenceI jds, List<String> viewIds, AlignmentPanel ap,
            boolean storeDataset)
    {
 +    if (Desktop.desktop == null)
 +    {
 +      return;
 +    }
      JInternalFrame[] frames = Desktop.desktop.getAllFrames();
      for (int f = frames.length - 1; f > -1; f--)
      {
                {
  
                  String varnaStateFile = varna.getStateInfo(model.rna);
-                 jarEntryName = RNA_PREFIX + viewId + "_"
-                       + nextCounter();
+                 jarEntryName = RNA_PREFIX + viewId + "_" + nextCounter();
                  copyFileToJar(jout, varnaStateFile, jarEntryName);
                  rnaSessions.put(model, jarEntryName);
                }
  
    private void storeAlignmentAnnotation(AlignmentAnnotation[] aa,
            IdentityHashMap<SequenceGroup, String> groupRefs,
-           AlignmentViewport av,
-           Set<String> calcIdSet, boolean storeDS, SequenceSet vamsasSet)
+           AlignmentViewport av, Set<String> calcIdSet, boolean storeDS,
+           SequenceSet vamsasSet)
    {
  
      for (int i = 0; i < aa.length; i++)
          if (groupIdr == null)
          {
            // make a locally unique String
-           groupRefs.put(annotation.groupRef,
+           groupRefs.put(
+                   annotation.groupRef,
                    groupIdr = ("" + System.currentTimeMillis()
-                           + annotation.groupRef.getName() + groupRefs.size()));
+                           + annotation.groupRef.getName() + groupRefs
+                           .size()));
          }
          an.setGroupRef(groupIdr.toString());
        }
              .entrySet())
      {
        AlignFrame af = candidate.getValue();
-       if (!addedToSplitFrames.contains(af)) {
+       if (!addedToSplitFrames.contains(af))
+       {
          Viewport view = candidate.getKey();
          Desktop.addInternalFrame(af, view.getTitle(), view.getWidth(),
                  view.getHeight());
  
          // set visiblity for other annotation in this view
          String annotationId = annotation.getId();
-         if (annotationId != null
-                 && annotationIds.containsKey(annotationId))
+         if (annotationId != null && annotationIds.containsKey(annotationId))
          {
            AlignmentAnnotation jda = annotationIds.get(annotationId);
            // in principle Visible should always be true for annotation displayed
  
          SequenceGroup sg = new SequenceGroup(seqs, jGroup.getName(), cs,
                  jGroup.getDisplayBoxes(), jGroup.getDisplayText(),
-                 jGroup.getColourText(), jGroup.getStart(),
-                 jGroup.getEnd());
+                 jGroup.getColourText(), jGroup.getStart(), jGroup.getEnd());
  
          sg.setOutlineColour(new java.awt.Color(jGroup.getOutlineColour()));
  
          if (jGroup.getId() != null && groupAnnotRefs.size() > 0)
          {
            // re-instate unique group/annotation row reference
-           List<AlignmentAnnotation> jaal = groupAnnotRefs
-                   .get(jGroup.getId());
+           List<AlignmentAnnotation> jaal = groupAnnotRefs.get(jGroup
+                   .getId());
            if (jaal != null)
            {
              for (AlignmentAnnotation jaa : jaal)
          if (addAnnotSchemeGroup)
          {
            // reconstruct the annotation colourscheme
-           sg.cs = constructAnnotationColour(
-                   jGroup.getAnnotationColours(), null, al, jms, false);
+           sg.cs = constructAnnotationColour(jGroup.getAnnotationColours(),
+                   null, al, jms, false);
          }
        }
      }
        for (int i = 0; i < jseq.getRnaViewerCount(); i++)
        {
          RnaViewer viewer = jseq.getRnaViewer(i);
-         AppVarna appVarna = findOrCreateVarnaViewer(viewer, uniqueSetSuffix,
-                 ap);
+         AppVarna appVarna = findOrCreateVarnaViewer(viewer,
+                 uniqueSetSuffix, ap);
  
          for (int j = 0; j < viewer.getSecondaryStructureCount(); j++)
          {
       * viewer not found - make it
       */
      RnaViewerModel model = new RnaViewerModel(postLoadId,
-             viewer.getTitle(), viewer.getXpos(),
-             viewer.getYpos(), viewer.getWidth(), viewer.getHeight(),
+             viewer.getTitle(), viewer.getXpos(), viewer.getYpos(),
+             viewer.getWidth(), viewer.getHeight(),
              viewer.getDividerLocation());
      AppVarna varna = new AppVarna(model, ap);
  
     * @param af
     * @param jprovider
     */
-   protected void createChimeraViewer(Entry<String, StructureViewerModel> viewerData,
-           AlignFrame af,
+   protected void createChimeraViewer(
+           Entry<String, StructureViewerModel> viewerData, AlignFrame af,
            jarInputStreamProvider jprovider)
    {
      StructureViewerModel data = viewerData.getValue();
-     String chimeraSessionFile =  data.getStateData();
+     String chimeraSessionFile = data.getStateData();
  
      /*
       * Copy Chimera session from jar entry "viewer_"+viewId to a temporary file
      String newViewId = viewerData.getKey();
  
      ChimeraViewFrame cvf = new ChimeraViewFrame(chimeraSessionFile,
-             af.alignPanel, pdbArray,
-             seqsArray, colourByChimera, colourBySequence, newViewId);
+             af.alignPanel, pdbArray, seqsArray, colourByChimera,
+             colourBySequence, newViewId);
      cvf.setSize(data.getWidth(), data.getHeight());
      cvf.setLocation(data.getX(), data.getY());
    }
        newFileLoc.append(";");
      }
  
-     if (newFileLoc.length() > 0)
+     if (newFileLoc.length() == 0)
+     {
+       return;
+     }
+     int histbug = newFileLoc.indexOf("history = ");
+     if (histbug > -1)
      {
-       int histbug = newFileLoc.indexOf("history = ");
+       /*
+        * change "history = [true|false];" to "history = [1|0];"
+        */
        histbug += 10;
        int diff = histbug == -1 ? -1 : newFileLoc.indexOf(";", histbug);
        String val = (diff == -1) ? null : newFileLoc
                .substring(histbug, diff);
        if (val != null && val.length() >= 4)
        {
-         if (val.contains("e"))
+         if (val.contains("e")) // eh? what can it be?
          {
            if (val.trim().equals("true"))
            {
            newFileLoc.replace(histbug, diff, val);
          }
        }
+     }
  
-       final String[] pdbf = pdbfilenames.toArray(new String[pdbfilenames
-               .size()]);
-       final String[] id = pdbids.toArray(new String[pdbids.size()]);
-       final SequenceI[][] sq = seqmaps
-               .toArray(new SequenceI[seqmaps.size()][]);
-       final String fileloc = newFileLoc.toString();
-       final String sviewid = viewerData.getKey();
-       final AlignFrame alf = af;
-       final Rectangle rect = new Rectangle(svattrib.getX(),
-               svattrib.getY(), svattrib.getWidth(), svattrib.getHeight());
-       try
+     final String[] pdbf = pdbfilenames.toArray(new String[pdbfilenames
+             .size()]);
+     final String[] id = pdbids.toArray(new String[pdbids.size()]);
+     final SequenceI[][] sq = seqmaps
+             .toArray(new SequenceI[seqmaps.size()][]);
+     final String fileloc = newFileLoc.toString();
+     final String sviewid = viewerData.getKey();
+     final AlignFrame alf = af;
+     final Rectangle rect = new Rectangle(svattrib.getX(), svattrib.getY(),
+             svattrib.getWidth(), svattrib.getHeight());
+     try
+     {
+       javax.swing.SwingUtilities.invokeAndWait(new Runnable()
        {
-         javax.swing.SwingUtilities.invokeAndWait(new Runnable()
+         @Override
+         public void run()
          {
-           @Override
-           public void run()
+           JalviewStructureDisplayI sview = null;
+           try
            {
-             JalviewStructureDisplayI sview = null;
-             try
-             {
-               sview = new StructureViewer(alf.alignPanel
-                       .getStructureSelectionManager()).createView(
-                       StructureViewer.ViewerType.JMOL, pdbf, id, sq,
-                       alf.alignPanel, svattrib, fileloc, rect, sviewid);
-               addNewStructureViewer(sview);
-             } catch (OutOfMemoryError ex)
+             sview = new StructureViewer(alf.alignPanel
+                     .getStructureSelectionManager()).createView(
+                     StructureViewer.ViewerType.JMOL, pdbf, id, sq,
+                     alf.alignPanel, svattrib, fileloc, rect, sviewid);
+             addNewStructureViewer(sview);
+           } catch (OutOfMemoryError ex)
+           {
+             new OOMWarning("restoring structure view for PDB id " + id,
+                     (OutOfMemoryError) ex.getCause());
+             if (sview != null && sview.isVisible())
              {
-               new OOMWarning("restoring structure view for PDB id " + id,
-                       (OutOfMemoryError) ex.getCause());
-               if (sview != null && sview.isVisible())
-               {
-                 sview.closeViewer(false);
-                 sview.setVisible(false);
-                 sview.dispose();
-               }
+               sview.closeViewer(false);
+               sview.setVisible(false);
+               sview.dispose();
              }
            }
-         });
-       } catch (InvocationTargetException ex)
-       {
-         warn("Unexpected error when opening Jmol view.", ex);
+         }
+       });
+     } catch (InvocationTargetException ex)
+     {
+       warn("Unexpected error when opening Jmol view.", ex);
  
-       } catch (InterruptedException e)
-       {
-         // e.printStackTrace();
-       }
+     } catch (InterruptedException e)
+     {
+       // e.printStackTrace();
      }
    }
  
    /**
        }
      }
      af.setMenusFromViewport(af.viewport);
-     
      // TODO: we don't need to do this if the viewport is aready visible.
      /*
       * Add the AlignFrame to the desktop (it may be 'gathered' later), unless it
          }
        }
      }
-   
      return result;
    }
  
@@@ -31,7 -31,7 +31,7 @@@ public class PDBChainTes
  
    final Atom a4 = new Atom(2f, 1f, 7f);
  
-  @BeforeMethod(alwaysRun = true)
 -  @BeforeMethod
++  @BeforeMethod(alwaysRun = true)
    public void setUp()
    {
      System.out.println("setup");
@@@ -24,10 -24,11 +24,10 @@@ import java.io.BufferedReader
  import java.io.File;
  import java.io.IOException;
  import java.io.InputStreamReader;
 +import java.util.ArrayList;
  
  import org.testng.Assert;
  import org.testng.FileAssert;
 -import org.testng.annotations.AfterClass;
 -import org.testng.annotations.BeforeClass;
  import org.testng.annotations.BeforeTest;
  import org.testng.annotations.DataProvider;
  import org.testng.annotations.Test;
  public class CommandLineOperations
  {
  
 -  @BeforeClass
 -  public static void setUpBeforeClass() throws Exception
 -  {
 -  }
 -
 -  @AfterClass
 -  public static void tearDownAfterClass() throws Exception
 -  {
 -  }
 +  private ArrayList<String> successfulCMDs = new ArrayList<String>();
  
    /***
     * from
@@@ -48,8 -57,7 +48,8 @@@
    private static class Worker extends Thread
    {
      private final Process process;
 -
 +    private BufferedReader outputReader;
 +    private BufferedReader errorReader;
      private Integer exit;
  
      private Worker(Process process)
          return;
        }
      }
 +
 +    public BufferedReader getOutputReader()
 +    {
 +      return outputReader;
 +    }
 +
 +    public void setOutputReader(BufferedReader outputReader)
 +    {
 +      this.outputReader = outputReader;
 +    }
 +
 +    public BufferedReader getErrorReader()
 +    {
 +      return errorReader;
 +    }
 +
 +    public void setErrorReader(BufferedReader errorReader)
 +    {
 +      this.errorReader = errorReader;
 +    }
    }
  
    private Worker jalviewDesktopRunner(boolean withAwt, String cmd,
 -          int timeout) throws InterruptedException, IOException
 +          int timeout)
    {
      String _cmd = "java "
              + (withAwt ? "-Djava.awt.headless=true" : "")
              + " -Djava.ext.dirs=./lib -classpath ./classes jalview.bin.Jalview ";
 -    System.out.println("############ Testing Jalview CMD: " + _cmd + cmd);
 -    Process ls2_proc = Runtime.getRuntime().exec(_cmd + cmd);
 -    BufferedReader outputReader = new BufferedReader(new InputStreamReader(
 -            ls2_proc.getInputStream()));
 -
 -    BufferedReader errorReader = new BufferedReader(new InputStreamReader(
 -            ls2_proc.getErrorStream()));
 -    Worker worker = new Worker(ls2_proc);
 -    worker.start();
 -    worker.join(timeout);
 -    // System.out.println("Output:  ");
 -    // String ln = null;
 -    // while ((ln = outputReader.readLine()) != null)
 -    // {
 -    // System.out.println(ln);
 -    // }
 -    //
 -    // System.out.println("Error:  ");
 -    // while ((ln = errorReader.readLine()) != null)
 -    // {
 -    // System.out.println(ln);
 -    // }
 +    System.out.println("CMD [" + cmd + "]");
 +    Process ls2_proc = null;
 +    Worker worker = null;
 +    try
 +    {
 +      ls2_proc = Runtime.getRuntime().exec(_cmd + cmd);
 +    } catch (IOException e1)
 +    {
 +      e1.printStackTrace();
 +    }
 +    if (ls2_proc != null)
 +    {
 +      BufferedReader outputReader = new BufferedReader(
 +              new InputStreamReader(ls2_proc.getInputStream()));
 +      BufferedReader errorReader = new BufferedReader(
 +              new InputStreamReader(ls2_proc.getErrorStream()));
 +      worker = new Worker(ls2_proc);
 +      worker.start();
 +      try
 +      {
 +        worker.join(timeout);
 +      } catch (InterruptedException e)
 +      {
 +        // e.printStackTrace();
 +      }
 +      worker.setOutputReader(outputReader);
 +      worker.setErrorReader(errorReader);
 +    }
      return worker;
    }
  
 -  @BeforeTest
 +  @BeforeTest(alwaysRun = true)
    public void initialize()
    {
      new CommandLineOperations();
    }
  
-   
 -  @Test(groups =
 -  { "Functional" }, dataProvider = "headlessModeOutputParams")
 -  public void testHeadlessModeOutputs(String harg, String type,
 -          String fileName, boolean withAWT, int expectedMinFileSize)
 +  @BeforeTest(alwaysRun = true)
 +  public void setUpForHeadlessCommandLineInputOperations()
 +          throws IOException
    {
 -    String cmd = harg + type + " " + fileName;
 -    // System.out.println(">>>>>>>>>>>>>>>> Command : " + cmd);
 -    File file = new File(fileName);
 -    Worker worker = null;
 -    try
 +    String cmds = "nodisplay -open examples/uniref50.fa -sortbytree -props FILE -colour zappo "
 +            + "-jabaws http://www.compbio.dundee.ac.uk/jabaws -nosortbytree -dasserver nickname=www.test.com "
 +            + "-features examples/testdata/plantfdx.features -annotations examples/testdata/plantfdx.annotations -tree examples/testdata/uniref50_test_tree";
 +    Worker worker = jalviewDesktopRunner(true, cmds, 9000);
 +    String ln = null;
 +    while ((ln = worker.getOutputReader().readLine()) != null)
      {
 -      worker = jalviewDesktopRunner(withAWT, cmd, 9000);
 -    } catch (InterruptedException e)
 +      System.out.println(ln);
 +      successfulCMDs.add(ln);
 +    }
 +  }
 +
 +  @BeforeTest(alwaysRun = true)
 +  public void setUpForCommandLineInputOperations() throws IOException
 +  {
 +    String cmds = "-open examples/uniref50.fa -noquestionnaire -nousagestats";
 +    Worker worker = jalviewDesktopRunner(false, cmds, 9000);
 +    String ln = null;
 +    int count = 0;
 +    while ((ln = worker.getErrorReader().readLine()) != null)
      {
 -      e.printStackTrace();
 -    } catch (IOException e)
 +      System.out.println(ln);
 +      successfulCMDs.add(ln);
 +      if (++count > 5)
 +      {
 +        break;
 +      }
 +    }
 +    if (worker != null && worker.exit == null)
      {
 -      e.printStackTrace();
 +      worker.interrupt();
 +      Thread.currentThread().interrupt();
 +      worker.process.destroy();
      }
 +  }
 +
 +  @Test(groups =
 +  { "Functional" }, dataProvider = "allInputOpearationsData")
 +  public void testAllInputOperations(String expectedString,
 +          String failureMsg)
 +  {
 +    Assert.assertTrue(successfulCMDs.contains(expectedString), failureMsg);
 +  }
 +
 +  @Test(groups =
 +  { "Functional" }, dataProvider = "headlessModeOutputOperationsData")
 +  public void testHeadlessModeOutputOperations(String harg, String type,
 +          String fileName, boolean withAWT, int expectedMinFileSize,
 +          int timeout)
 +  {
 +    String cmd = harg + type + " " + fileName;
 +    // System.out.println(">>>>>>>>>>>>>>>> Command : " + cmd);
 +    File file = new File(fileName);
 +    Worker worker = jalviewDesktopRunner(withAWT, cmd, timeout);
  
      FileAssert.assertFile(file, "Didn't create an output" + type
              + " file.[" + harg + "]");
        worker.interrupt();
        Thread.currentThread().interrupt();
        worker.process.destroy();
 -      Assert.fail("Jalview did not exit after  "
 +      Assert.fail("Jalview did not exit after "
                + type
                + " generation (try running test again to verify - timeout at 9000ms). ["
                + harg + "]");
      new File(fileName).delete();
    }
  
 -  @DataProvider(name = "headlessModeOutputParams")
 -  public static Object[][] headlessModeOutput()
 +
 +  @DataProvider(name = "allInputOpearationsData")
 +  public Object[][] getHeadlessModeInputParams()
 +  {
 +    return new Object[][]
 +    {
 +        // headless mode input operations
 +        { "CMD [-color zappo] executed successfully!",
 +            "Failed command : -color zappo" },
 +        { "CMD [-props FILE] executed successfully!",
 +            "Failed command : -props File" },
 +        { "CMD [-sortbytree] executed successfully!",
 +            "Failed command : -sortbytree" },
 +        {
 +            "CMD [-jabaws http://www.compbio.dundee.ac.uk/jabaws] executed successfully!",
 +            "Failed command : -jabaws http://www.compbio.dundee.ac.uk/jabaws" },
 +        { "CMD [-open examples/uniref50.fa] executed successfully!",
 +            "Failed command : -open examples/uniref50.fa" },
 +        { "CMD [-nosortbytree] executed successfully!",
 +            "Failed command : -nosortbytree" },
 +        { "CMD [-dasserver nickname=www.test.com] executed successfully!",
 +            "Failed command : -dasserver nickname=www.test.com" },
 +        {
 +            "CMD [-features examples/testdata/plantfdx.features]  executed successfully!",
 +            "Failed command : -features examples/testdata/plantfdx.features" },
 +        {
 +            "CMD [-annotations examples/testdata/plantfdx.annotations] executed successfully!",
 +            "Failed command : -annotations examples/testdata/plantfdx.annotations" },
 +        {
 +            "CMD [-tree examples/testdata/uniref50_test_tree] executed successfully!",
 +            "Failed command : -tree examples/testdata/uniref50_test_tree" },
 +        // non headless mode input operations
 +        { "CMD [-nousagestats] executed successfully!",
 +            "Failed command : -nousagestats" },
 +        { "CMD [-noquestionnaire] executed successfully!",
 +            "Failed command : -noquestionnaire nickname=www.test.com" }
 +    };
 +
 +  }
 +   
 +  @DataProvider(name = "headlessModeOutputOperationsData")
 +  public static Object[][] getHeadlessModeOutputParams()
    {
      return new Object[][]
      {
          { "nodisplay -open examples/uniref50.fa", " -eps",
 -            "test_uniref50_out.eps", true, 4096 },
 +            "test_uniref50_out.eps", true, 4096, 4000 },
          { "nodisplay -open examples/uniref50.fa", " -eps",
 -            "test_uniref50_out.eps", false, 4096 },
 -        { "headless -open examples/uniref50.fa", " -eps",
 -            "test_uniref50_out.eps", true, 4096 },
 -        { "headless -open examples/uniref50.fa", " -eps",
 -            "test_uniref50_out.eps", false, 4096 },
 +            "test_uniref50_out.eps", false, 4096, 4000 },
          { "nogui -open examples/uniref50.fa", " -eps",
 -            "test_uniref50_out.eps", true, 4096 },
 +            "test_uniref50_out.eps", true, 4096, 4000 },
          { "nogui -open examples/uniref50.fa", " -eps",
 -            "test_uniref50_out.eps", false, 4096 },
 -        { "headless -open examples/uniref50.fa", " -svg",
 -            "test_uniref50_out.svg", true, 4096 },
 +            "test_uniref50_out.eps", false, 4096, 4000 },
 +        { "headless -open examples/uniref50.fa", " -eps",
 +            "test_uniref50_out.eps", true, 4096, 4000 },
          { "headless -open examples/uniref50.fa", " -svg",
 -            "test_uniref50_out.svg", false, 4096 },
 +            "test_uniref50_out.svg", false, 4096, 3000 },
          { "headless -open examples/uniref50.fa", " -png",
 -            "test_uniref50_out.png", true, 4096 },
 -        { "headless -open examples/uniref50.fa", " -png",
 -            "test_uniref50_out.png", false, 4096 },
 -        { "headless -open examples/uniref50.fa", " -html",
 -            "test_uniref50_out.html", true, 4096 },
 +            "test_uniref50_out.png", true, 4096, 3000 },
          { "headless -open examples/uniref50.fa", " -html",
 -            "test_uniref50_out.html", false, 4096 },
 +            "test_uniref50_out.html", true, 4096, 3000 },
          { "headless -open examples/uniref50.fa", " -fasta",
 -            "test_uniref50_out.mfa", true, 2096 },
 -        { "headless -open examples/uniref50.fa", " -fasta",
 -            "test_uniref50_out.mfa", false, 2096 },
 -        { "headless -open examples/uniref50.fa", " -clustal",
 -            "test_uniref50_out.aln", true, 2096 },
 +            "test_uniref50_out.mfa", true, 2096, 3000 },
          { "headless -open examples/uniref50.fa", " -clustal",
 -            "test_uniref50_out.aln", false, 2096 },
 -        { "headless -open examples/uniref50.fa", " -msf",
 -            "test_uniref50_out.msf", true, 2096 },
 +            "test_uniref50_out.aln", true, 2096, 3000 },
          { "headless -open examples/uniref50.fa", " -msf",
 -            "test_uniref50_out.msf", false, 2096 },
 +            "test_uniref50_out.msf", true, 2096, 3000 },
          { "headless -open examples/uniref50.fa", " -pileup",
 -            "test_uniref50_out.aln", true, 2096 },
 -        { "headless -open examples/uniref50.fa", " -pileup",
 -            "test_uniref50_out.aln", false, 2096 },
 -        { "headless -open examples/uniref50.fa", " -pir",
 -            "test_uniref50_out.pir", true, 2096 },
 +            "test_uniref50_out.aln", true, 2096, 3000 },
          { "headless -open examples/uniref50.fa", " -pir",
 -            "test_uniref50_out.pir", false, 2096 },
 +            "test_uniref50_out.pir", true, 2096, 3000 },
          { "headless -open examples/uniref50.fa", " -pfam",
 -            "test_uniref50_out.pfam", true, 2096 },
 -        { "headless -open examples/uniref50.fa", " -pfam",
 -            "test_uniref50_out.pfam", false, 2096 },
 -        { "headless -open examples/uniref50.fa", " -blc",
 -            "test_uniref50_out.blc", true, 2096 },
 +            "test_uniref50_out.pfam", true, 2096, 3000 },
          { "headless -open examples/uniref50.fa", " -blc",
 -            "test_uniref50_out.blc", false, 2096 },
 -        { "headless -open examples/uniref50.fa", " -jalview",
 -            "test_uniref50_out.jvp", true, 2096 },
 +            "test_uniref50_out.blc", true, 2096, 3000 },
          { "headless -open examples/uniref50.fa", " -jalview",
 -            "test_uniref50_out.jvp", false, 2096 },
 +            "test_uniref50_out.jvp", true, 2096, 3000 },
      };
    }
 -
 -
  }