git://source.jalview.org
/
jalview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'alpha/origin_2022_JAL-3066_Jalview_212_slivka-integration' into spike...
[jalview.git]
/
test
/
jalview
/
structure
/
StructureSelectionManagerTest.java
diff --git
a/test/jalview/structure/StructureSelectionManagerTest.java
b/test/jalview/structure/StructureSelectionManagerTest.java
index
e59648f
..
5ca2cb1
100644
(file)
--- a/
test/jalview/structure/StructureSelectionManagerTest.java
+++ b/
test/jalview/structure/StructureSelectionManagerTest.java
@@
-80,7
+80,8
@@
public class StructureSelectionManagerTest extends Jalview2xmlBase
public void setUp()
{
StructureImportSettings.setShowSeqFeatures(true);
public void setUp()
{
StructureImportSettings.setShowSeqFeatures(true);
- ssm = new StructureSelectionManager();
+ ssm = StructureSelectionManager.getStructureSelectionManager(null);
+ ssm.resetAll();
}
@Test(groups = { "Functional" })
}
@Test(groups = { "Functional" })
@@
-124,10
+125,10
@@
public class StructureSelectionManagerTest extends Jalview2xmlBase
acf3.addMap(new Sequence("s3", "ttt"), new Sequence("p3", "p"),
new MapList(new int[] { 1, 3 }, new int[] { 1, 1 }, 1, 1));
acf3.addMap(new Sequence("s3", "ttt"), new Sequence("p3", "p"),
new MapList(new int[] { 1, 3 }, new int[] { 1, 1 }, 1, 1));
- List<AlignedCodonFrame> set1 = new ArrayList<AlignedCodonFrame>();
+ List<AlignedCodonFrame> set1 = new ArrayList<>();
set1.add(acf1);
set1.add(acf2);
set1.add(acf1);
set1.add(acf2);
- List<AlignedCodonFrame> set2 = new ArrayList<AlignedCodonFrame>();
+ List<AlignedCodonFrame> set2 = new ArrayList<>();
set2.add(acf2);
set2.add(acf3);
set2.add(acf2);
set2.add(acf3);
@@
-139,10
+140,11
@@
public class StructureSelectionManagerTest extends Jalview2xmlBase
ssm.registerMappings(set2);
ssm.registerMappings(set2);
ssm.registerMappings(set2);
ssm.registerMappings(set2);
- assertEquals(3, ssm.getSequenceMappings().size());
- assertTrue(ssm.getSequenceMappings().contains(acf1));
- assertTrue(ssm.getSequenceMappings().contains(acf2));
- assertTrue(ssm.getSequenceMappings().contains(acf3));
+ List<AlignedCodonFrame> mappings = ssm.getSequenceMappings();
+ assertEquals(3, mappings.size());
+ assertTrue(mappings.contains(acf1));
+ assertTrue(mappings.contains(acf2));
+ assertTrue(mappings.contains(acf3));
}
/**
}
/**
@@
-155,7
+157,7
@@
public class StructureSelectionManagerTest extends Jalview2xmlBase
SequenceI seq = new Sequence(
"1GAQ|B",
"ATYNVKLITPEGEVELQVPDDVYILDQAEEDGIDLPYSCRAGSCSSCAGKVVSGSVDQSDQSYLDDGQIADGWVLTCHAYPTSDVVIETHKEEELTGA");
SequenceI seq = new Sequence(
"1GAQ|B",
"ATYNVKLITPEGEVELQVPDDVYILDQAEEDGIDLPYSCRAGSCSSCAGKVVSGSVDQSDQSYLDDGQIADGWVLTCHAYPTSDVVIETHKEEELTGA");
- StructureSelectionManager sm = new StructureSelectionManager();
+ StructureSelectionManager sm = StructureSelectionManager.getStructureSelectionManager(null);
sm.setProcessSecondaryStructure(true);
sm.setAddTempFacAnnot(true);
StructureFile pmap = sm.setMapping(true, new SequenceI[] { seq },
sm.setProcessSecondaryStructure(true);
sm.setAddTempFacAnnot(true);
StructureFile pmap = sm.setMapping(true, new SequenceI[] { seq },
@@
-199,14
+201,14
@@
public class StructureSelectionManagerTest extends Jalview2xmlBase
{
// for some reason 'BeforeMethod' (which should be inherited from
// Jalview2XmlBase isn't always called)...
{
// for some reason 'BeforeMethod' (which should be inherited from
// Jalview2XmlBase isn't always called)...
- Desktop.instance.closeAll_actionPerformed(null);
+ Desktop.getInstance().closeAll_actionPerformed(null);
try {
Thread.sleep(200);
} catch (Exception foo) {};
SequenceI seq = new Sequence("4IM2|A",
"LDFCIRNIEKTVMGEISDIHTKLLRLSSSQGTIE");
String P4IM2_MISSING = "examples/testdata/4IM2_missing.pdb";
try {
Thread.sleep(200);
} catch (Exception foo) {};
SequenceI seq = new Sequence("4IM2|A",
"LDFCIRNIEKTVMGEISDIHTKLLRLSSSQGTIE");
String P4IM2_MISSING = "examples/testdata/4IM2_missing.pdb";
- StructureSelectionManager sm = new StructureSelectionManager();
+ StructureSelectionManager sm = StructureSelectionManager.getStructureSelectionManager(null);
sm.setProcessSecondaryStructure(true);
sm.setAddTempFacAnnot(true);
StructureFile pmap = sm.setMapping(true, new SequenceI[] { seq },
sm.setProcessSecondaryStructure(true);
sm.setAddTempFacAnnot(true);
StructureFile pmap = sm.setMapping(true, new SequenceI[] { seq },
@@
-218,7
+220,7
@@
public class StructureSelectionManagerTest extends Jalview2xmlBase
assertEquals(1, pmap.getSeqs().size());
assertEquals("4IM2|A", pmap.getSeqs().get(0).getName());
assertEquals(1, pmap.getSeqs().size());
assertEquals("4IM2|A", pmap.getSeqs().get(0).getName());
- List<int[]> structuremap1 = new ArrayList(
+ List<int[]> structuremap1 = new ArrayList<>(
sm.getMapping(P4IM2_MISSING)[0]
.getPDBResNumRanges(seq.getStart(), seq.getEnd()));
sm.getMapping(P4IM2_MISSING)[0]
.getPDBResNumRanges(seq.getStart(), seq.getEnd()));
@@
-313,8
+315,7
@@
public class StructureSelectionManagerTest extends Jalview2xmlBase
// positional mapping to atoms for color by structure is still wrong, even
// though panel looks correct.
// positional mapping to atoms for color by structure is still wrong, even
// though panel looks correct.
- StructureMappingcommandSet smcr[] = JmolCommands
- .getColourBySequenceCommand(apssm,
+ String[] smcr = new JmolCommands().colourBySequence(apssm,
new String[]
{ pdbe.getFile() },
new SequenceI[][]
new String[]
{ pdbe.getFile() },
new SequenceI[][]
@@
-322,12
+323,10
@@
public class StructureSelectionManagerTest extends Jalview2xmlBase
new SequenceRenderer(alf.alignPanel.getAlignViewport()),
alf.alignPanel);
// Expected - all residues are white
new SequenceRenderer(alf.alignPanel.getAlignViewport()),
alf.alignPanel);
// Expected - all residues are white
- for (StructureMappingcommandSet smm : smcr)
+ for (String c : smcr)
{
{
- for (String c : smm.commands)
- {
- System.out.println(c);
- }
+ assertTrue(c.contains("color[255,255,255]"));
+ System.out.println(c);
}
}
}
}