From: kjvdheide Date: Thu, 5 Oct 2017 11:37:16 +0000 (+0100) Subject: Blank interfaces added X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=0e50368033402ab4eb49fb7473fbb232d7b6091b;p=jalview.git Blank interfaces added --- diff --git a/src/jalview/analysis/TreeCalculator.java b/src/jalview/analysis/TreeCalculator.java new file mode 100644 index 0000000..7ccee92 --- /dev/null +++ b/src/jalview/analysis/TreeCalculator.java @@ -0,0 +1,46 @@ +/* + * Jalview - A Sequence Alignment Editor and Viewer ($Version-Rel$) + * Copyright (C) $Year-Rel$ The Jalview Authors + * + * This file is part of Jalview. + * + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 + * of the License, or (at your option) any later version. + * + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Jalview. If not, see . + * The Jalview Authors are detailed in the 'AUTHORS' file. + */ +package jalview.analysis; + +import jalview.api.analysis.SimilarityParamsI; + +/** + * @author kjvanderheide + * + */ +public class TreeCalculator +{ + + /** + * + * @param treeAlgo + * @param substitutionMatrix + * @param params + */ + public TreeCalculator(String treeAlgo, String substitutionMatrix, + SimilarityParamsI calculateParams) + { + // TODO Auto-generated constructor stub + } + + + +} diff --git a/src/jalview/ext/archaeopteryx/AlignmentToTreeViewerI.java b/src/jalview/ext/archaeopteryx/AlignmentToTreeViewerI.java index 54364ae..3b3747c 100644 --- a/src/jalview/ext/archaeopteryx/AlignmentToTreeViewerI.java +++ b/src/jalview/ext/archaeopteryx/AlignmentToTreeViewerI.java @@ -1,24 +1,23 @@ -/******************************************************************************* +/* * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$) - * Copyright (C) 2017 The Jalview Authors - * + * Copyright (C) $$Year-Rel$$ The Jalview Authors + * * This file is part of Jalview. - * + * * Jalview is free software: you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation, either version 3 * of the License, or (at your option) any later version. - * + * * Jalview is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty * of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with Jalview. If not, see . * The Jalview Authors are detailed in the 'AUTHORS' file. - *******************************************************************************/ - + */ package jalview.ext.archaeopteryx; diff --git a/src/jalview/ext/archaeopteryx/ArchaeopteryxInit.java b/src/jalview/ext/archaeopteryx/ArchaeopteryxInit.java index 4381a83..04147ce 100644 --- a/src/jalview/ext/archaeopteryx/ArchaeopteryxInit.java +++ b/src/jalview/ext/archaeopteryx/ArchaeopteryxInit.java @@ -1,24 +1,23 @@ -/******************************************************************************* +/* * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$) - * Copyright (C) 2017 The Jalview Authors - * + * Copyright (C) $$Year-Rel$$ The Jalview Authors + * * This file is part of Jalview. - * + * * Jalview is free software: you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation, either version 3 * of the License, or (at your option) any later version. - * + * * Jalview is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty * of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with Jalview. If not, see . * The Jalview Authors are detailed in the 'AUTHORS' file. - *******************************************************************************/ - + */ package jalview.ext.archaeopteryx; import jalview.analysis.TreeModel; @@ -63,7 +62,6 @@ public class ArchaeopteryxInit writer = new PrintWriter(newickFile); writer.println(newickOutput); - // System.out.println(writer.checkError()); writer.close(); String[] commandLineArgs = { "-open", newickFile.getCanonicalPath() }; @@ -118,11 +116,6 @@ public class ArchaeopteryxInit NewickFile newickTree = new NewickFile(tree.getTopNode(), tree.hasBootstrap(), tree.hasDistances(), tree.hasRootDistance()); - /* System.out.println(newickTree.print(tree.hasBootstrap(), - tree.hasDistances(), tree.hasRootDistance())); - - System.out.println(newickTree.print(newickTree.hasBootstrap(), - newickTree.hasDistances(), newickTree.hasRootDistance()));*/ return newickTree; } diff --git a/src/jalview/ext/archaeopteryx/TreeViewerBindingI.java b/src/jalview/ext/archaeopteryx/TreeViewerBindingI.java index d0c1931..eb35894 100644 --- a/src/jalview/ext/archaeopteryx/TreeViewerBindingI.java +++ b/src/jalview/ext/archaeopteryx/TreeViewerBindingI.java @@ -1,24 +1,23 @@ -/******************************************************************************* +/* * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$) - * Copyright (C) 2017 The Jalview Authors - * + * Copyright (C) $$Year-Rel$$ The Jalview Authors + * * This file is part of Jalview. - * + * * Jalview is free software: you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation, either version 3 * of the License, or (at your option) any later version. - * + * * Jalview is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty * of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with Jalview. If not, see . * The Jalview Authors are detailed in the 'AUTHORS' file. - *******************************************************************************/ - + */ package jalview.ext.archaeopteryx; interface TreeViewerBindingI diff --git a/src/jalview/gui/CalculationChooser.java b/src/jalview/gui/CalculationChooser.java index f2d65e5..58a28c0 100644 --- a/src/jalview/gui/CalculationChooser.java +++ b/src/jalview/gui/CalculationChooser.java @@ -21,6 +21,7 @@ package jalview.gui; import jalview.analysis.TreeBuilder; +import jalview.analysis.TreeCalculator; import jalview.analysis.scoremodels.ScoreModels; import jalview.analysis.scoremodels.SimilarityParams; import jalview.api.analysis.ScoreModelI; @@ -460,26 +461,27 @@ public class CalculationChooser extends JPanel protected void calculate_actionPerformed() { boolean doPCA = pca.isSelected(); - String modelName = modelNames.getSelectedItem().toString(); + String substitutionMatrix = modelNames.getSelectedItem().toString(); SimilarityParamsI params = getSimilarityParameters(doPCA); if (doPCA) { - openPcaPanel(modelName, params); + openPcaPanel(substitutionMatrix, params); } else { - calculateTree(); - openTreePanel(modelName, params); + + String treeAlgo = determineTreeAlgo(); + TreeCalculator calculateTree = new TreeCalculator(treeAlgo, + substitutionMatrix, + params); + + openTreePanel(treeAlgo, substitutionMatrix, params); } // closeFrame(); } - protected void calculateTree() - { - - } protected String determineTreeAlgo() // to be modified & expanded { String treeAlgorithm = neighbourJoining.isSelected() @@ -509,7 +511,8 @@ public class CalculationChooser extends JPanel * Open a new Tree panel on the desktop * */ - protected void openTreePanel(String modelName, SimilarityParamsI params) + protected void openTreePanel(String treeType, String substitutionMatrix, + SimilarityParamsI params) { /* * gui validation shouldn't allow insufficient sequences here, but leave @@ -517,9 +520,9 @@ public class CalculationChooser extends JPanel */ checkEnoughSequences(af.getViewport()); - String treeType = determineTreeAlgo(); - af.newTreePanel(treeType, modelName, params); + + af.newTreePanel(treeType, substitutionMatrix, params); } /** diff --git a/src/jalview/gui/TreePanel.java b/src/jalview/gui/TreePanel.java index a4521cc..366b97f 100755 --- a/src/jalview/gui/TreePanel.java +++ b/src/jalview/gui/TreePanel.java @@ -245,21 +245,21 @@ public class TreePanel extends GTreePanel class TreeLoader extends Thread { - private NewickFile newtree; + private NewickFile newTree; private AlignmentView odata = null; public TreeLoader(NewickFile newickFile, AlignmentView inputData) { - this.newtree = newickFile; + this.newTree = newickFile; this.odata = inputData; - if (newickFile != null) + if (newTree != null) { // Must be outside run(), as Jalview2XML tries to // update distance/bootstrap visibility at the same time - showBootstrap(newickFile.hasBootstrap()); - showDistances(newickFile.hasDistances()); + showBootstrap(newTree.hasBootstrap()); + showDistances(newTree.hasDistances()); } @@ -269,17 +269,16 @@ public class TreePanel extends GTreePanel public void run() { - if (newtree != null) + if (newTree != null) { tree = new TreeModel(av.getAlignment().getSequencesArray(), odata, - newtree); + newTree); if (tree.getOriginalData() == null) { originalSeqData.setVisible(false); } - ArchaeopteryxInit archae = new ArchaeopteryxInit(newtree); - archae.startArchaeopteryx(); + } else @@ -292,10 +291,11 @@ public class TreePanel extends GTreePanel tree = new TreeModel(njtree); showDistances(true); - ArchaeopteryxInit archae = new ArchaeopteryxInit(tree); - archae.startArchaeopteryx(); + } + ArchaeopteryxInit archae = new ArchaeopteryxInit(tree); + archae.startArchaeopteryx(); tree.reCount(tree.getTopNode()); tree.findHeight(tree.getTopNode()); diff --git a/src/jalview/gui/TreeParams.java b/src/jalview/gui/TreeParams.java new file mode 100644 index 0000000..4f481d9 --- /dev/null +++ b/src/jalview/gui/TreeParams.java @@ -0,0 +1,44 @@ +/* + * Jalview - A Sequence Alignment Editor and Viewer ($Version-Rel$) + * Copyright (C) $Year-Rel$ The Jalview Authors + * + * This file is part of Jalview. + * + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 + * of the License, or (at your option) any later version. + * + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Jalview. If not, see . + * The Jalview Authors are detailed in the 'AUTHORS' file. + */ +package jalview.gui; + +/** + * @author kjvanderheide + * + */ +public class TreeParams implements OptsParametersContainerI +{ + + @Override + public void refreshParamLayout() + { + // TODO Auto-generated method stub + + } + + @Override + public void argSetModified(Object modifiedElement, boolean b) + { + // TODO Auto-generated method stub + + } + +}