for (String chimObjName : names)
{
// get or open the corresponding models if they already exist
- List<ChimeraModel> currentModels = chimeraManager.getChimeraModels(
- chimObjName, type);
+ List<ChimeraModel> currentModels = chimeraManager
+ .getChimeraModels(chimObjName, type);
if (currentModels.size() == 0)
{
// open and return models
// Get the corresponding "real" model
if (chimeraManager.hasChimeraModel(modelNumber, subModelNumber))
{
- ChimeraModel dataModel = chimeraManager.getChimeraModel(
- modelNumber, subModelNumber);
- if (dataModel.getResidueCount() == selectedModel
- .getResidueCount()
- || dataModel.getModelType() == StructureManager.ModelType.SMILES)
+ ChimeraModel dataModel = chimeraManager
+ .getChimeraModel(modelNumber, subModelNumber);
+ if (dataModel.getResidueCount() == selectedModel.getResidueCount()
+ || dataModel
+ .getModelType() == StructureManager.ModelType.SMILES)
{
// Select the entire model
addChimSelection(dataModel);
{
for (ChimeraChain selectedChain : selectedModel.getChains())
{
- ChimeraChain dataChain = dataModel.getChain(selectedChain
- .getChainId());
+ ChimeraChain dataChain = dataModel
+ .getChain(selectedChain.getChainId());
if (selectedChain.getResidueCount() == dataChain
.getResidueCount())
{
pathList.add("/usr/local/chimera/bin/chimera");
pathList.add("/usr/local/bin/chimera");
pathList.add("/usr/bin/chimera");
+ pathList.add(System.getProperty("user.home") + "/opt/bin/chimera");
}
else if (os.startsWith("Windows"))
{
* 1GAQ has been reduced to alpha carbons only
* 1QCF is the full PDB file including headers, HETATM etc
*/
- String[] testFile = new String[] { "./examples/1GAQ.txt",
+ String[] testFile = new String[] { "./examples/1gaq.txt",
"./test/jalview/ext/jmol/1xyz.pdb",
- "./test/jalview/ext/jmol/1qcf.pdb" };
+ "./test/jalview/ext/jmol/1QCF.pdb" };
//@formatter:off
// a modified and very cut-down extract of 4UJ4
JmolParser jtest = new JmolParser(pdbStr, DataSourceType.FILE);
Vector<SequenceI> seqs = jtest.getSeqs(), mcseqs = mctest.getSeqs();
- assertTrue(
- "No sequences extracted from testfile\n"
- + (jtest.hasWarningMessage() ? jtest.getWarningMessage()
- : "(No warnings raised)"), seqs != null
- && seqs.size() > 0);
+ assertTrue("No sequences extracted from testfile\n"
+ + (jtest.hasWarningMessage() ? jtest.getWarningMessage()
+ : "(No warnings raised)"),
+ seqs != null && seqs.size() > 0);
for (SequenceI sq : seqs)
{
- assertEquals("JMol didn't process " + pdbStr
- + " to the same sequence as MCView",
- sq.getSequenceAsString(), mcseqs.remove(0)
- .getSequenceAsString());
+ assertEquals(
+ "JMol didn't process " + pdbStr
+ + " to the same sequence as MCView",
+ sq.getSequenceAsString(),
+ mcseqs.remove(0).getSequenceAsString());
AlignmentI al = new Alignment(new SequenceI[] { sq });
validateSecStrRows(al);
}
private void checkFirstAAIsAssoc(SequenceI sq)
{
- assertTrue("No secondary structure assigned for protein sequence for "
- + sq.getName(),
+ assertTrue(
+ "No secondary structure assigned for protein sequence for "
+ + sq.getName(),
sq.getAnnotation() != null && sq.getAnnotation().length >= 1
&& sq.getAnnotation()[0].hasIcons);
assertTrue(
"Secondary structure not associated for sequence "
- + sq.getName(), sq.getAnnotation()[0].sequenceRef == sq);
+ + sq.getName(),
+ sq.getAnnotation()[0].sequenceRef == sq);
}
/**
{
PDBfile mctest = new PDBfile(false, false, false,
pastePDBDataWithChainBreak, DataSourceType.PASTE);
- JmolParser jtest = new JmolParser(pastePDBDataWithChainBreak, DataSourceType.PASTE);
+ JmolParser jtest = new JmolParser(pastePDBDataWithChainBreak,
+ DataSourceType.PASTE);
Vector<SequenceI> seqs = jtest.getSeqs();
Vector<SequenceI> mcseqs = mctest.getSeqs();
{
PDBfile mctest = new PDBfile(false, false, false, pdbWithAltLoc,
DataSourceType.PASTE);
- JmolParser jtest = new JmolParser(pdbWithAltLoc,
- DataSourceType.PASTE);
+ JmolParser jtest = new JmolParser(pdbWithAltLoc, DataSourceType.PASTE);
Vector<SequenceI> seqs = jtest.getSeqs();
Vector<SequenceI> mcseqs = mctest.getSeqs();
@DataProvider(name = "identifyFiles")
public Object[][] IdentifyFileDP()
{
- return new Object[][] {
- { "examples/example.json", FileFormat.Json },
+ return new Object[][] { { "examples/example.json", FileFormat.Json },
{ "examples/plantfdx.fa", FileFormat.Fasta },
{ "examples/dna_interleaved.phy", FileFormat.Phylip },
{ "examples/2GIS.pdb", FileFormat.PDB },
- { "examples/rf00031_folded.stk", FileFormat.Stockholm },
+ { "examples/RF00031_folded.stk", FileFormat.Stockholm },
{ "examples/testdata/test.rnaml", FileFormat.Rnaml },
{ "examples/testdata/test.aln", FileFormat.Clustal },
{ "examples/testdata/test.pfam", FileFormat.Pfam },
{ "examples/testdata/simpleGff3.gff", FileFormat.Features },
{ "examples/testdata/test.jvp", FileFormat.Jalview },
{ "examples/testdata/test.cif", FileFormat.MMCif },
- {
- "examples/testdata/cullpdb_pc25_res3.0_R0.3_d150729_chains9361.fasta.15316",
+ { "examples/testdata/cullpdb_pc25_res3.0_R0.3_d150729_chains9361.fasta.15316",
FileFormat.Fasta },
{ "resources/scoreModel/pam250.scm", FileFormat.ScoreMatrix },
{ "resources/scoreModel/blosum80.scm", FileFormat.ScoreMatrix }
- // { "examples/testdata/test.amsa", "AMSA" },
- // { "examples/test.jnet", "JnetFile" },
+ // { "examples/testdata/test.amsa", "AMSA" },
+ // { "examples/test.jnet", "JnetFile" },
};
}
// too few columns:
assertFalse(id.looksLikeFeatureData("1 \t 2 \t 3 \t 4 \t 5"));
// GFF format:
- assertTrue(id
- .looksLikeFeatureData("Seq1\tlocal\tHelix\t2456\t2462\tss"));
+ assertTrue(
+ id.looksLikeFeatureData("Seq1\tlocal\tHelix\t2456\t2462\tss"));
// Jalview format:
assertTrue(id.looksLikeFeatureData("Helix\tSeq1\t-1\t2456\t2462\tss"));
// non-numeric start column:
assertFalse(Platform.isControlDown(new MouseEvent(b, 0, 0L, mods, 0, 0,
0, 0, clickCount, isPopupTrigger, buttonNo), mac));
- mods = InputEvent.CTRL_DOWN_MASK;
+ mods = InputEvent.CTRL_DOWN_MASK | InputEvent.BUTTON1_DOWN_MASK;
assertFalse(Platform.isControlDown(new MouseEvent(b, 0, 0L, mods, 0, 0,
0, 0, clickCount, isPopupTrigger, buttonNo), mac));
- mods = InputEvent.META_DOWN_MASK;
+ mods = InputEvent.META_DOWN_MASK | InputEvent.BUTTON1_DOWN_MASK;
assertTrue(Platform.isControlDown(new MouseEvent(b, 0, 0L, mods, 0, 0,
0, 0, clickCount, isPopupTrigger, buttonNo), mac));