import jalview.analysis.AlignmentUtils;
import jalview.api.structures.JalviewStructureDisplayI;
+import jalview.bin.Cache;
import jalview.datamodel.AlignedCodonFrame;
import jalview.datamodel.AlignmentAnnotation;
import jalview.datamodel.AlignmentI;
import jalview.io.Jalview2xmlBase;
import jalview.io.StructureFile;
import jalview.util.MapList;
+import jalview.ws.DBRefFetcher;
import jalview.ws.sifts.SiftsSettings;
import java.util.ArrayList;
public void setUp()
{
StructureImportSettings.setShowSeqFeatures(true);
- ssm = new StructureSelectionManager();
+ ssm = StructureSelectionManager.getStructureSelectionManager(null);
+ ssm.resetAll();
}
@Test(groups = { "Functional" })
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));
}
/**
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 },
{
// 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";
- StructureSelectionManager sm = new StructureSelectionManager();
+ StructureSelectionManager sm = StructureSelectionManager.getStructureSelectionManager(null);
sm.setProcessSecondaryStructure(true);
sm.setAddTempFacAnnot(true);
StructureFile pmap = sm.setMapping(true, new SequenceI[] { seq },
public void testAssociatedMappingToSubSeq() throws Exception
{
+ // currently this test fails if trimming is enabled
+ Cache.setProperty(DBRefFetcher.TRIM_RETRIEVED_SEQUENCES,
+ Boolean.FALSE.toString());
String TEMP_FACTOR_AA="Temperature Factor";
String PDBID = "4IM2";
String FullLengthSeq = ">TBK1_HUMAN Serine/threonine-protein kinase TBK1\n" +
PDBID);
AlignmentAnnotation subseq_tf=null;
- assertTrue(seq.getDBRefs() != null && seq.getDBRefs().length > 0);
+ assertTrue(seq.getDBRefs() != null && seq.getDBRefs().size() > 0);
if (!al.findAnnotations(seq, null, TEMP_FACTOR_AA).iterator().hasNext())
{