2 * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
3 * Copyright (C) $$Year-Rel$$ The Jalview Authors
5 * This file is part of Jalview.
7 * Jalview is free software: you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation, either version 3
10 * of the License, or (at your option) any later version.
12 * Jalview is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty
14 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with Jalview. If not, see <http://www.gnu.org/licenses/>.
19 * The Jalview Authors are detailed in the 'AUTHORS' file.
23 import static org.testng.AssertJUnit.assertEquals;
24 import static org.testng.AssertJUnit.assertFalse;
25 import static org.testng.AssertJUnit.assertNotNull;
26 import static org.testng.AssertJUnit.assertSame;
27 import static org.testng.AssertJUnit.assertTrue;
29 import jalview.api.AlignViewportI;
30 import jalview.api.AlignmentViewPanel;
31 import jalview.api.ViewStyleI;
32 import jalview.datamodel.AlignmentAnnotation;
33 import jalview.datamodel.AlignmentI;
34 import jalview.datamodel.HiddenSequences;
35 import jalview.datamodel.SequenceCollectionI;
36 import jalview.datamodel.SequenceGroup;
37 import jalview.datamodel.SequenceI;
38 import jalview.gui.AlignFrame;
39 import jalview.gui.Desktop;
40 import jalview.gui.Jalview2XML;
41 import jalview.schemes.AnnotationColourGradient;
42 import jalview.schemes.ColourSchemeI;
43 import jalview.structure.StructureImportSettings;
44 import jalview.viewmodel.AlignmentViewport;
47 import java.util.ArrayList;
48 import java.util.HashMap;
49 import java.util.List;
52 import org.testng.Assert;
53 import org.testng.AssertJUnit;
54 import org.testng.annotations.Test;
56 @Test(singleThreaded = true)
57 public class CrossRef2xmlTests extends Jalview2xmlBase
60 @Test(groups = { "Functional" })
61 public void testRNAStructureRecovery() throws Exception
63 String inFile = "examples/RF00031_folded.stk";
64 String tfile = File.createTempFile("JalviewTest", ".jvp")
66 AlignFrame af = new jalview.io.FileLoader().LoadFileWaitTillLoaded(
67 inFile, FormatAdapter.FILE);
68 assertTrue("Didn't read input file " + inFile, af != null);
69 int olddsann = countDsAnn(af.getViewport());
70 assertTrue("Didn't find any dataset annotations", olddsann > 0);
71 af.rnahelicesColour_actionPerformed(null);
73 "Couldn't apply RNA helices colourscheme",
74 af.getViewport().getGlobalColourScheme() instanceof jalview.schemes.RNAHelicesColour);
75 assertTrue("Failed to store as a project.",
76 af.saveAlignment(tfile, "Jalview"));
77 af.closeMenuItem_actionPerformed(true);
79 af = new jalview.io.FileLoader().LoadFileWaitTillLoaded(tfile,
81 assertTrue("Failed to import new project", af != null);
82 int newdsann = countDsAnn(af.getViewport());
84 "Differing numbers of dataset sequence annotation\nOriginally "
85 + olddsann + " and now " + newdsann,
86 olddsann == newdsann);
88 .println("Read in same number of annotations as originally present ("
91 "RNA helices colourscheme was not applied on import.",
92 af.getViewport().getGlobalColourScheme() instanceof jalview.schemes.RNAHelicesColour);
95 @Test(groups = { "Functional" })
96 public void testTCoffeeScores() throws Exception
98 String inFile = "examples/uniref50.fa", inAnnot = "examples/uniref50.score_ascii";
99 String tfile = File.createTempFile("JalviewTest", ".jvp")
101 AlignFrame af = new jalview.io.FileLoader().LoadFileWaitTillLoaded(
102 inFile, FormatAdapter.FILE);
103 assertTrue("Didn't read input file " + inFile, af != null);
104 af.loadJalviewDataFile(inAnnot, FormatAdapter.FILE, null, null);
106 "Didn't set T-coffee colourscheme",
107 af.getViewport().getGlobalColourScheme().getClass()
108 .equals(jalview.schemes.TCoffeeColourScheme.class));
110 "Recognise T-Coffee score from string",
111 jalview.schemes.ColourSchemeProperty.getColour(af.getViewport()
113 jalview.schemes.ColourSchemeProperty.getColourName(af
114 .getViewport().getGlobalColourScheme())) != null);
116 assertTrue("Failed to store as a project.",
117 af.saveAlignment(tfile, "Jalview"));
118 af.closeMenuItem_actionPerformed(true);
120 af = new jalview.io.FileLoader().LoadFileWaitTillLoaded(tfile,
122 assertTrue("Failed to import new project", af != null);
124 "Didn't set T-coffee colourscheme for imported project.",
125 af.getViewport().getGlobalColourScheme().getClass()
126 .equals(jalview.schemes.TCoffeeColourScheme.class));
128 .println("T-Coffee score shading successfully recovered from project.");
131 @Test(groups = { "Functional" })
132 public void testColourByAnnotScores() throws Exception
134 String inFile = "examples/uniref50.fa", inAnnot = "examples/testdata/uniref50_iupred.jva";
135 String tfile = File.createTempFile("JalviewTest", ".jvp")
137 AlignFrame af = new jalview.io.FileLoader().LoadFileWaitTillLoaded(
138 inFile, FormatAdapter.FILE);
139 assertTrue("Didn't read input file " + inFile, af != null);
140 af.loadJalviewDataFile(inAnnot, FormatAdapter.FILE, null, null);
141 AlignmentAnnotation[] aa = af.getViewport().getAlignment()
142 .getSequenceAt(0).getAnnotation("IUPredWS (Short)");
144 "Didn't find any IUPred annotation to use to shade alignment.",
145 aa != null && aa.length > 0);
146 AnnotationColourGradient cs = new jalview.schemes.AnnotationColourGradient(
147 aa[0], null, AnnotationColourGradient.ABOVE_THRESHOLD);
148 AnnotationColourGradient gcs = new jalview.schemes.AnnotationColourGradient(
149 aa[0], null, AnnotationColourGradient.BELOW_THRESHOLD);
150 cs.setSeqAssociated(true);
151 gcs.setSeqAssociated(true);
153 SequenceGroup sg = new SequenceGroup();
157 af.getViewport().getAlignment().addGroup(sg);
158 sg.addSequence(af.getViewport().getAlignment().getSequenceAt(1), false);
159 sg.addSequence(af.getViewport().getAlignment().getSequenceAt(2), true);
160 af.alignPanel.alignmentChanged();
161 assertTrue("Failed to store as a project.",
162 af.saveAlignment(tfile, "Jalview"));
163 af.closeMenuItem_actionPerformed(true);
165 af = new jalview.io.FileLoader().LoadFileWaitTillLoaded(tfile,
167 assertTrue("Failed to import new project", af != null);
169 // check for group and alignment colourschemes
171 ColourSchemeI _rcs = af.getViewport().getGlobalColourScheme();
172 ColourSchemeI _rgcs = af.getViewport().getAlignment().getGroups()
174 assertTrue("Didn't recover global colourscheme", _rcs != null);
175 assertTrue("Didn't recover annotation colour global scheme",
176 _rcs instanceof AnnotationColourGradient);
177 AnnotationColourGradient __rcs = (AnnotationColourGradient) _rcs;
178 assertTrue("Annotation colourscheme wasn't sequence associated",
179 __rcs.isSeqAssociated());
181 boolean diffseqcols = false, diffgseqcols = false;
182 SequenceI[] sqs = af.getViewport().getAlignment().getSequencesArray();
183 for (int p = 0, pSize = af.getViewport().getAlignment().getWidth(); p < pSize
184 && (!diffseqcols || !diffgseqcols); p++)
186 if (_rcs.findColour(sqs[0].getCharAt(p), p, sqs[0]) != _rcs
187 .findColour(sqs[5].getCharAt(p), p, sqs[5]))
192 assertTrue("Got Different sequence colours", diffseqcols);
194 .println("Per sequence colourscheme (Background) successfully applied and recovered.");
196 assertTrue("Didn't recover group colourscheme", _rgcs != null);
197 assertTrue("Didn't recover annotation colour group colourscheme",
198 _rgcs instanceof AnnotationColourGradient);
199 __rcs = (AnnotationColourGradient) _rgcs;
200 assertTrue("Group Annotation colourscheme wasn't sequence associated",
201 __rcs.isSeqAssociated());
203 for (int p = 0, pSize = af.getViewport().getAlignment().getWidth(); p < pSize
204 && (!diffseqcols || !diffgseqcols); p++)
206 if (_rgcs.findColour(sqs[1].getCharAt(p), p, sqs[1]) != _rgcs
207 .findColour(sqs[2].getCharAt(p), p, sqs[2]))
212 assertTrue("Got Different group sequence colours", diffgseqcols);
214 .println("Per sequence (Group) colourscheme successfully applied and recovered.");
217 @Test(groups = { "Functional" })
218 public void gatherViewsHere() throws Exception
220 int origCount = Desktop.getAlignFrames() == null ? 0 : Desktop
221 .getAlignFrames().length;
222 AlignFrame af = new jalview.io.FileLoader().LoadFileWaitTillLoaded(
223 "examples/exampleFile_2_7.jar", FormatAdapter.FILE);
224 assertTrue("Didn't read in the example file correctly.", af != null);
225 assertTrue("Didn't gather the views in the example file.",
226 Desktop.getAlignFrames().length == 1 + origCount);
230 @Test(groups = { "Functional" })
231 public void viewRefPdbAnnotation() throws Exception
233 // TODO: Make this pass without setting StructureParser.JALVIEW_PARSER
234 // StructureImportSettings
235 // .setDefaultPDBFileParser(StructureParser.JALVIEW_PARSER);
236 StructureImportSettings.setProcessSecondaryStructure(true);
237 StructureImportSettings.setVisibleChainAnnotation(true);
238 AlignFrame af = new jalview.io.FileLoader().LoadFileWaitTillLoaded(
239 "examples/exampleFile_2_7.jar", FormatAdapter.FILE);
240 assertTrue("Didn't read in the example file correctly.", af != null);
241 AlignmentViewPanel sps = null;
242 for (AlignmentViewPanel ap : af.alignPanel.alignFrame.getAlignPanels())
244 if ("Spinach Feredoxin Structure".equals(ap.getViewName()))
250 assertTrue("Couldn't find the structure view", sps != null);
251 SequenceI sq = sps.getAlignment().findName("1A70|");
252 AlignmentAnnotation refan = null;
253 for (AlignmentAnnotation ra : sps.getAlignment()
254 .getAlignmentAnnotation())
262 assertTrue("Annotation secondary structure not found.", refan != null);
263 assertTrue("Couldn't find 1a70 null chain", sq != null);
264 // compare the manually added temperature factor annotation
265 // to the track automatically transferred from the pdb structure on load
266 for (AlignmentAnnotation ala : sq.getDatasetSequence().getAnnotation())
268 AlignmentAnnotation alaa;
269 sq.addAlignmentAnnotation(alaa = new AlignmentAnnotation(ala));
270 alaa.adjustForAlignment();
271 if (ala.graph == refan.graph)
273 for (int p = 0; p < ala.annotations.length; p++)
279 "Mismatch at alignment position " + p,
280 (alaa.annotations[p] == null && refan.annotations[p] == null)
281 || alaa.annotations[p].value == refan.annotations[p].value);
282 } catch (NullPointerException q)
284 Assert.fail("Mismatch of alignment annotations at position "
285 + p + " Ref seq ann: " + refan.annotations[p]
286 + " alignment " + alaa.annotations[p]);
294 @Test(groups = { "Functional" })
295 public void testCopyViewSettings() throws Exception
297 AlignFrame af = new jalview.io.FileLoader().LoadFileWaitTillLoaded(
298 "examples/exampleFile_2_7.jar", FormatAdapter.FILE);
299 assertTrue("Didn't read in the example file correctly.", af != null);
300 AlignmentViewPanel sps = null, groups = null;
301 for (AlignmentViewPanel ap : af.alignPanel.alignFrame.getAlignPanels())
303 if ("Spinach Feredoxin Structure".equals(ap.getViewName()))
307 if (ap.getViewName().contains("MAFFT"))
312 assertTrue("Couldn't find the structure view", sps != null);
313 assertTrue("Couldn't find the MAFFT view", groups != null);
315 ViewStyleI structureStyle = sps.getAlignViewport().getViewStyle();
316 ViewStyleI groupStyle = groups.getAlignViewport().getViewStyle();
317 AssertJUnit.assertFalse(structureStyle.sameStyle(groupStyle));
319 groups.getAlignViewport().setViewStyle(structureStyle);
320 AssertJUnit.assertFalse(groupStyle.sameStyle(groups.getAlignViewport()
322 Assert.assertTrue(structureStyle.sameStyle(groups.getAlignViewport()
328 * test store and recovery of expanded views
332 @Test(groups = { "Functional" }, enabled = true)
333 public void testStoreAndRecoverExpandedviews() throws Exception
335 Desktop.instance.closeAll_actionPerformed(null);
337 AlignFrame af = new jalview.io.FileLoader().LoadFileWaitTillLoaded(
338 "examples/exampleFile_2_7.jar", FormatAdapter.FILE);
339 assertTrue("Didn't read in the example file correctly.", af != null);
340 Assert.assertEquals(Desktop.getAlignFrames().length, 1);
341 String afid = af.getViewport().getSequenceSetId();
343 // check FileLoader returned a reference to the one alignFrame that is
344 // actually on the Desktop
346 "Jalview2XML.loadAlignFrame() didn't return correct AlignFrame reference for multiple view window",
347 af == Desktop.getAlignFrameFor(af.getViewport()));
349 Desktop.explodeViews(af);
351 int oldviews = Desktop.getAlignFrames().length;
352 Assert.assertEquals(Desktop.getAlignFrames().length,
353 Desktop.getAlignmentPanels(afid).length);
354 File tfile = File.createTempFile("testStoreAndRecoverExpanded", ".jvp");
357 new Jalview2XML(false).saveState(tfile);
360 Assert.fail("Didn't save the expanded view state", e);
361 } catch (Exception e)
363 Assert.fail("Didn't save the expanded view state", e);
365 Desktop.instance.closeAll_actionPerformed(null);
366 if (Desktop.getAlignFrames() != null)
368 Assert.assertEquals(Desktop.getAlignFrames().length, 0);
370 af = new jalview.io.FileLoader().LoadFileWaitTillLoaded(
371 tfile.getAbsolutePath(), FormatAdapter.FILE);
372 Assert.assertNotNull(af);
374 Desktop.getAlignFrames().length,
375 Desktop.getAlignmentPanels(af.getViewport().getSequenceSetId()).length);
378 Desktop.getAlignmentPanels(af.getViewport().getSequenceSetId()).length);
382 * Test save and reload of a project with a different representative sequence
387 @Test(groups = { "Functional" })
388 public void testStoreAndRecoverReferenceSeqSettings() throws Exception
390 Desktop.instance.closeAll_actionPerformed(null);
391 AlignFrame af = new FileLoader().LoadFileWaitTillLoaded(
392 "examples/exampleFile_2_7.jar", FormatAdapter.FILE);
393 assertTrue("Didn't read in the example file correctly.", af != null);
394 String afid = af.getViewport().getSequenceSetId();
396 // remember reference sequence for each panel
397 Map<String, SequenceI> refseqs = new HashMap<String, SequenceI>();
400 * mark sequence 2, 3, 4.. in panels 1, 2, 3...
401 * as reference sequence for itself and the preceding sequence
404 for (AlignmentViewPanel ap : Desktop.getAlignmentPanels(afid))
406 AlignViewportI av = ap.getAlignViewport();
407 AlignmentI alignment = ap.getAlignment();
408 int repIndex = n % alignment.getHeight();
409 SequenceI rep = alignment.getSequenceAt(repIndex);
410 refseqs.put(ap.getViewName(), rep);
412 // code from mark/unmark sequence as reference in jalview.gui.PopupMenu
413 // todo refactor this to an alignment view controller
414 av.setDisplayReferenceSeq(true);
415 av.setColourByReferenceSeq(true);
416 av.getAlignment().setSeqrep(rep);
420 File tfile = File.createTempFile("testStoreAndRecoverReferenceSeq",
424 new Jalview2XML(false).saveState(tfile);
425 } catch (Throwable e)
427 Assert.fail("Didn't save the expanded view state", e);
429 Desktop.instance.closeAll_actionPerformed(null);
430 if (Desktop.getAlignFrames() != null)
432 Assert.assertEquals(Desktop.getAlignFrames().length, 0);
435 af = new FileLoader().LoadFileWaitTillLoaded(tfile.getAbsolutePath(),
437 afid = af.getViewport().getSequenceSetId();
439 for (AlignmentViewPanel ap : Desktop.getAlignmentPanels(afid))
441 // check representative
442 AlignmentI alignment = ap.getAlignment();
443 SequenceI rep = alignment.getSeqrep();
444 Assert.assertNotNull(rep,
445 "Couldn't restore sequence representative from project");
446 // can't use a strong equals here, because by definition, the sequence IDs
447 // will be different.
448 // could set vamsas session save/restore flag to preserve IDs across
450 Assert.assertEquals(refseqs.get(ap.getViewName()).toString(),
452 "Representative wasn't the same when recovered.");
453 Assert.assertTrue(ap.getAlignViewport().isDisplayReferenceSeq(),
454 "Display reference sequence view setting not set.");
455 Assert.assertTrue(ap.getAlignViewport().isColourByReferenceSeq(),
456 "Colour By Reference Seq view setting not set.");
460 @Test(groups = { "Functional" })
461 public void testIsVersionStringLaterThan()
464 * No version / development / test / autobuild is leniently assumed to be
467 assertTrue(Jalview2XML.isVersionStringLaterThan(null, null));
468 assertTrue(Jalview2XML.isVersionStringLaterThan("2.8.3", null));
469 assertTrue(Jalview2XML.isVersionStringLaterThan(null, "2.8.3"));
470 assertTrue(Jalview2XML.isVersionStringLaterThan(null,
471 "Development Build"));
472 assertTrue(Jalview2XML.isVersionStringLaterThan(null,
473 "DEVELOPMENT BUILD"));
474 assertTrue(Jalview2XML.isVersionStringLaterThan("2.8.3",
475 "Development Build"));
476 assertTrue(Jalview2XML.isVersionStringLaterThan(null, "Test"));
477 assertTrue(Jalview2XML.isVersionStringLaterThan(null, "TEST"));
478 assertTrue(Jalview2XML.isVersionStringLaterThan("2.8.3", "Test"));
479 assertTrue(Jalview2XML
480 .isVersionStringLaterThan(null, "Automated Build"));
481 assertTrue(Jalview2XML.isVersionStringLaterThan("2.8.3",
483 assertTrue(Jalview2XML.isVersionStringLaterThan("2.8.3",
487 * same version returns true i.e. compatible
489 assertTrue(Jalview2XML.isVersionStringLaterThan("2.8", "2.8"));
490 assertTrue(Jalview2XML.isVersionStringLaterThan("2.8.3", "2.8.3"));
491 assertTrue(Jalview2XML.isVersionStringLaterThan("2.8.3b1", "2.8.3b1"));
492 assertTrue(Jalview2XML.isVersionStringLaterThan("2.8.3B1", "2.8.3b1"));
493 assertTrue(Jalview2XML.isVersionStringLaterThan("2.8.3b1", "2.8.3B1"));
496 * later version returns true
498 assertTrue(Jalview2XML.isVersionStringLaterThan("2.8.3", "2.8.4"));
499 assertTrue(Jalview2XML.isVersionStringLaterThan("2.8.3", "2.9"));
500 assertTrue(Jalview2XML.isVersionStringLaterThan("2.8.3", "2.9.2"));
501 assertTrue(Jalview2XML.isVersionStringLaterThan("2.8", "2.8.3"));
502 assertTrue(Jalview2XML.isVersionStringLaterThan("2.8.3", "2.8.3b1"));
505 * earlier version returns false
507 assertFalse(Jalview2XML.isVersionStringLaterThan("2.8.3", "2.8"));
508 assertFalse(Jalview2XML.isVersionStringLaterThan("2.8.4", "2.8.3"));
509 assertFalse(Jalview2XML.isVersionStringLaterThan("2.8.3b1", "2.8.3"));
510 assertFalse(Jalview2XML.isVersionStringLaterThan("2.8.3", "2.8.2b1"));
511 assertFalse(Jalview2XML.isVersionStringLaterThan("2.8.0b2", "2.8.0b1"));
515 * Test save and reload of a project with a different sequence group (and
516 * representative sequence) in each view.
520 @Test(groups = { "Functional" })
521 public void testStoreAndRecoverGroupRepSeqs() throws Exception
523 Desktop.instance.closeAll_actionPerformed(null);
524 AlignFrame af = new FileLoader().LoadFileWaitTillLoaded(
525 "examples/uniref50.fa", FormatAdapter.FILE);
526 assertTrue("Didn't read in the example file correctly.", af != null);
527 String afid = af.getViewport().getSequenceSetId();
528 // make a second view of the alignment
529 af.newView_actionPerformed(null);
532 * remember representative and hidden sequences marked
535 Map<String, SequenceI> repSeqs = new HashMap<String, SequenceI>();
536 Map<String, List<String>> hiddenSeqNames = new HashMap<String, List<String>>();
539 * mark sequence 2, 3, 4.. in panels 1, 2, 3...
540 * as reference sequence for itself and the preceding sequence
543 for (AlignmentViewPanel ap : Desktop.getAlignmentPanels(afid))
545 AlignViewportI av = ap.getAlignViewport();
546 AlignmentI alignment = ap.getAlignment();
547 int repIndex = n % alignment.getHeight();
548 // ensure at least one preceding sequence i.e. index >= 1
549 repIndex = Math.max(repIndex, 1);
550 SequenceI repSeq = alignment.getSequenceAt(repIndex);
551 repSeqs.put(ap.getViewName(), repSeq);
552 List<String> hiddenNames = new ArrayList<String>();
553 hiddenSeqNames.put(ap.getViewName(), hiddenNames);
556 * have rep sequence represent itself and the one before it
557 * this hides the group (except for the rep seq)
559 SequenceGroup sg = new SequenceGroup();
560 sg.addSequence(repSeq, false);
561 SequenceI precedingSeq = alignment.getSequenceAt(repIndex - 1);
562 sg.addSequence(precedingSeq, false);
563 sg.setSeqrep(repSeq);
564 assertTrue(sg.getSequences().contains(repSeq));
565 assertTrue(sg.getSequences().contains(precedingSeq));
566 av.setSelectionGroup(sg);
567 assertSame(repSeq, sg.getSeqrep());
570 * represent group with sequence adds to a map of hidden rep sequences
571 * (it does not create a group on the alignment)
573 ((AlignmentViewport) av).hideSequences(repSeq, true);
574 assertSame(repSeq, sg.getSeqrep());
575 assertTrue(sg.getSequences().contains(repSeq));
576 assertTrue(sg.getSequences().contains(precedingSeq));
577 assertTrue("alignment has groups", alignment.getGroups().isEmpty());
578 Map<SequenceI, SequenceCollectionI> hiddenRepSeqsMap = av
579 .getHiddenRepSequences();
580 assertNotNull(hiddenRepSeqsMap);
581 assertEquals(1, hiddenRepSeqsMap.size());
582 assertSame(sg, hiddenRepSeqsMap.get(repSeq));
583 assertTrue(alignment.getHiddenSequences().isHidden(precedingSeq));
584 assertFalse(alignment.getHiddenSequences().isHidden(repSeq));
585 hiddenNames.add(precedingSeq.getName());
590 .createTempFile("testStoreAndRecoverGroupReps", ".jvp");
593 new Jalview2XML(false).saveState(tfile);
594 } catch (Throwable e)
596 Assert.fail("Didn't save the expanded view state", e);
598 Desktop.instance.closeAll_actionPerformed(null);
599 if (Desktop.getAlignFrames() != null)
601 Assert.assertEquals(Desktop.getAlignFrames().length, 0);
604 af = new FileLoader().LoadFileWaitTillLoaded(tfile.getAbsolutePath(),
606 afid = af.getViewport().getSequenceSetId();
608 for (AlignmentViewPanel ap : Desktop.getAlignmentPanels(afid))
610 String viewName = ap.getViewName();
611 AlignViewportI av = ap.getAlignViewport();
612 AlignmentI alignment = ap.getAlignment();
613 List<SequenceGroup> groups = alignment.getGroups();
614 assertNotNull(groups);
615 assertTrue("Alignment has groups", groups.isEmpty());
616 Map<SequenceI, SequenceCollectionI> hiddenRepSeqsMap = av
617 .getHiddenRepSequences();
618 assertNotNull("No hidden represented sequences", hiddenRepSeqsMap);
619 assertEquals(1, hiddenRepSeqsMap.size());
620 assertEquals(repSeqs.get(viewName).getDisplayId(true),
621 hiddenRepSeqsMap.keySet().iterator().next()
622 .getDisplayId(true));
625 * verify hidden sequences in restored panel
627 List<String> hidden = hiddenSeqNames.get(ap.getViewName());
628 HiddenSequences hs = alignment.getHiddenSequences();
630 "wrong number of restored hidden sequences in "
631 + ap.getViewName(), hidden.size(), hs.getSize());