From 680c2b0355ceaf9c5557874fb97330dfc3f92519 Mon Sep 17 00:00:00 2001 From: "cmzmasek@gmail.com" Date: Mon, 16 Sep 2013 19:48:34 +0000 Subject: [PATCH] inprogress --- .../src/org/forester/application/simple_node_processor.java | 4 ++-- forester/java/src/org/forester/archaeopteryx/AptxUtil.java | 7 +++++++ .../java/src/org/forester/archaeopteryx/Configuration.java | 3 +++ forester/java/src/org/forester/archaeopteryx/Constants.java | 2 +- forester/java/src/org/forester/archaeopteryx/ControlPanel.java | 3 +++ forester/java/src/org/forester/archaeopteryx/TreePanel.java | 8 ++++++++ forester/java/src/org/forester/phylogeny/data/NodeData.java | 1 + 7 files changed, 25 insertions(+), 3 deletions(-) diff --git a/forester/java/src/org/forester/application/simple_node_processor.java b/forester/java/src/org/forester/application/simple_node_processor.java index 3dac018..7420bc2 100644 --- a/forester/java/src/org/forester/application/simple_node_processor.java +++ b/forester/java/src/org/forester/application/simple_node_processor.java @@ -58,7 +58,7 @@ public class simple_node_processor { // } // } // } - private static void processNode( final PhylogenyNode node, final int i, String label ) { + private static void processNode( final PhylogenyNode node, final int i, final String label ) { //if ( node.isExternal() ) { // final String c = "" + node.getNodeData().getBinaryCharacters().getPresentCount(); // final String s = node.getNodeData().getTaxonomy().getScientificName(); @@ -87,7 +87,7 @@ public class simple_node_processor { // } //} // node.setName( "" ); - Taxonomy t = node.getNodeData().getTaxonomy(); + final Taxonomy t = node.getNodeData().getTaxonomy(); System.out.println( t.getTaxonomyCode() + "\t" + t.getScientificName() + "\t" + t.getCommonName() + "\t" + label ); } diff --git a/forester/java/src/org/forester/archaeopteryx/AptxUtil.java b/forester/java/src/org/forester/archaeopteryx/AptxUtil.java index b874665..3ba5102 100644 --- a/forester/java/src/org/forester/archaeopteryx/AptxUtil.java +++ b/forester/java/src/org/forester/archaeopteryx/AptxUtil.java @@ -344,6 +344,10 @@ public final class AptxUtil { && !ForesterUtil.isEmpty( node.getNodeData().getTaxonomy().getScientificName() ) ) { showExtDescNodeDataUserSelectedHelperHelper( node.getNodeData().getTaxonomy().getScientificName(), sb ); } + if ( cp.isShowTaxonomyCommonNames() && node.getNodeData().isHasTaxonomy() + && !ForesterUtil.isEmpty( node.getNodeData().getTaxonomy().getCommonName() ) ) { + showExtDescNodeDataUserSelectedHelperHelper( node.getNodeData().getTaxonomy().getCommonName(), sb ); + } if ( ( cp.isShowGeneNames() || cp.isShowGeneSymbols() || cp.isShowSequenceAcc() ) && node.getNodeData().isHasSequence() && !ForesterUtil.isEmpty( node.getNodeData().getSequence().getMolecularSequence() ) ) { @@ -785,6 +789,9 @@ public final class AptxUtil { desc.append( "Distinct external taxonomies: " ); desc.append( taxs.size() ); } + for( final Taxonomy t : taxs ) { + System.out.println( t.toString() ); + } desc.append( "\n" ); final DescriptiveStatistics bs = PhylogenyMethods.calculatBranchLengthStatistics( phy ); if ( bs.getN() > 3 ) { diff --git a/forester/java/src/org/forester/archaeopteryx/Configuration.java b/forester/java/src/org/forester/archaeopteryx/Configuration.java index 4aa85f2..1398c25 100644 --- a/forester/java/src/org/forester/archaeopteryx/Configuration.java +++ b/forester/java/src/org/forester/archaeopteryx/Configuration.java @@ -1441,6 +1441,9 @@ public final class Configuration { else if ( s.equalsIgnoreCase( "taxonomy_code" ) ) { setExtDescNodeDataToReturn( NODE_DATA.TAXONOMY_CODE ); } + else if ( s.equalsIgnoreCase( "taxonomy_common_name" ) ) { + setExtDescNodeDataToReturn( NODE_DATA.TAXONOMY_COMM0N_NAME ); + } else if ( s.equalsIgnoreCase( "user_selected" ) ) { setExtDescNodeDataToReturn( NODE_DATA.UNKNOWN ); } diff --git a/forester/java/src/org/forester/archaeopteryx/Constants.java b/forester/java/src/org/forester/archaeopteryx/Constants.java index d1148d0..697f232 100644 --- a/forester/java/src/org/forester/archaeopteryx/Constants.java +++ b/forester/java/src/org/forester/archaeopteryx/Constants.java @@ -43,7 +43,7 @@ public final class Constants { public final static boolean ALLOW_DDBJ_BLAST = false; public final static String PRG_NAME = "Archaeopteryx"; final static String VERSION = "0.9813 A1ST"; - final static String PRG_DATE = "130528"; + final static String PRG_DATE = "130913"; final static String DEFAULT_CONFIGURATION_FILE_NAME = "_aptx_configuration_file"; final static String[] DEFAULT_FONT_CHOICES = { "Arial", "Helvetica", "Verdana", "Tahoma", "Dialog", "Lucida Sans", "SansSerif", "Sans-serif", "Sans" }; diff --git a/forester/java/src/org/forester/archaeopteryx/ControlPanel.java b/forester/java/src/org/forester/archaeopteryx/ControlPanel.java index 95a53b4..6df3e33 100644 --- a/forester/java/src/org/forester/archaeopteryx/ControlPanel.java +++ b/forester/java/src/org/forester/archaeopteryx/ControlPanel.java @@ -1758,6 +1758,9 @@ final class ControlPanel extends JPanel implements ActionListener { case TAXONOMY_CODE: s = "Taxonomy Codes"; break; + case TAXONOMY_COMM0N_NAME: + s = "Taxonomy Common Names"; + break; case TAXONOMY_SCIENTIFIC_NAME: s = "Scientific Names"; break; diff --git a/forester/java/src/org/forester/archaeopteryx/TreePanel.java b/forester/java/src/org/forester/archaeopteryx/TreePanel.java index 559d120..7fc9ac0 100644 --- a/forester/java/src/org/forester/archaeopteryx/TreePanel.java +++ b/forester/java/src/org/forester/archaeopteryx/TreePanel.java @@ -3243,6 +3243,8 @@ public final class TreePanel extends JPanel implements ActionListener, MouseWhee return "Scientific Names"; case TAXONOMY_CODE: return "Taxonomy Codes"; + case TAXONOMY_COMM0N_NAME: + return "Taxonomy Common Names"; case UNKNOWN: return "User Selected Data"; default: @@ -5119,6 +5121,12 @@ public final class TreePanel extends JPanel implements ActionListener, MouseWhee data.add( n.getNodeData().getTaxonomy().getScientificName() ); } break; + case TAXONOMY_COMM0N_NAME: + if ( n.getNodeData().isHasTaxonomy() + && !ForesterUtil.isEmpty( n.getNodeData().getTaxonomy().getCommonName() ) ) { + data.add( n.getNodeData().getTaxonomy().getCommonName() ); + } + break; case TAXONOMY_CODE: if ( n.getNodeData().isHasTaxonomy() && !ForesterUtil.isEmpty( n.getNodeData().getTaxonomy().getTaxonomyCode() ) ) { diff --git a/forester/java/src/org/forester/phylogeny/data/NodeData.java b/forester/java/src/org/forester/phylogeny/data/NodeData.java index a40cc74..4591155 100644 --- a/forester/java/src/org/forester/phylogeny/data/NodeData.java +++ b/forester/java/src/org/forester/phylogeny/data/NodeData.java @@ -47,6 +47,7 @@ public class NodeData implements PhylogenyData { SEQUENCE_MOL_SEQ_FASTA, SEQUENCE_ACC, TAXONOMY_SCIENTIFIC_NAME, + TAXONOMY_COMM0N_NAME, TAXONOMY_CODE, UNKNOWN; } -- 1.7.10.2