|| !ForesterUtil.isEmpty( desc.getNodeData().getTaxonomy().getScientificName() )
|| !ForesterUtil.isEmpty( desc.getNodeData().getTaxonomy().getLineage() )
|| !ForesterUtil.isEmpty( desc.getNodeData().getTaxonomy().getTaxonomyCode() ) || !ForesterUtil
- .isEmpty( desc.getNodeData().getTaxonomy().getCommonName() ) ) ) {
+ .isEmpty( desc.getNodeData().getTaxonomy().getCommonName() ) ) ) {
final UniProtTaxonomy up_tax = TaxonomyDataManager.obtainUniProtTaxonomy( desc.getNodeData()
.getTaxonomy(), null, null );
if ( ( up_tax == null ) && ForesterUtil.isEmpty( desc.getNodeData().getTaxonomy().getLineage() ) ) {
if ( ( ( tax != null ) && ( isHasAppropriateId( tax )
|| !ForesterUtil.isEmpty( tax.getScientificName() )
|| !ForesterUtil.isEmpty( tax.getTaxonomyCode() ) || !ForesterUtil
- .isEmpty( tax.getCommonName() ) ) ) ) {
+ .isEmpty( tax.getCommonName() ) ) ) ) {
uniprot_tax = obtainUniProtTaxonomy( tax, null, qt );
}
else {
}
if ( cla.isOptionSet( REMOVE_WORST_OFFENDERS_OPTION ) ) {
worst_remove = cla.getOptionValueAsInt( REMOVE_WORST_OFFENDERS_OPTION );
- if ( ( worst_remove < 1 ) || ( worst_remove >= msa.getNumberOfSequences() - 1 ) ) {
+ if ( ( worst_remove < 1 ) || ( worst_remove >= ( msa.getNumberOfSequences() - 1 ) ) ) {
ForesterUtil.fatalError( PRG_NAME, "number of worst offender sequences to remove is out of range: "
+ worst_remove );
}
final java.text.DecimalFormat df = new java.text.DecimalFormat( "0.#" );
System.out.println( "Mean number of duplications : " + df.format( stats.arithmeticMean() ) + " (sd: "
+ df.format( stats.sampleStandardDeviation() ) + ") ("
- + df.format( 100.0 * stats.arithmeticMean() / rio.getIntNodesOfAnalyzedGeneTrees() ) + "%)" );
+ + df.format( ( 100.0 * stats.arithmeticMean() ) / rio.getIntNodesOfAnalyzedGeneTrees() ) + "%)" );
if ( stats.getN() > 3 ) {
System.out.println( "Median number of duplications: " + df.format( stats.median() ) + " ("
- + df.format( 100.0 * stats.median() / rio.getIntNodesOfAnalyzedGeneTrees() ) + "%)" );
+ + df.format( ( 100.0 * stats.median() ) / rio.getIntNodesOfAnalyzedGeneTrees() ) + "%)" );
}
System.out.println( "Minimum duplications : " + ( int ) stats.getMin() + " ("
- + df.format( 100.0 * stats.getMin() / rio.getIntNodesOfAnalyzedGeneTrees() ) + "%)" );
+ + df.format( ( 100.0 * stats.getMin() ) / rio.getIntNodesOfAnalyzedGeneTrees() ) + "%)" );
System.out.println( "Maximum duplications : " + ( int ) stats.getMax() + " ("
- + df.format( 100.0 * stats.getMax() / rio.getIntNodesOfAnalyzedGeneTrees() ) + "%)" );
+ + df.format( ( 100.0 * stats.getMax() ) / rio.getIntNodesOfAnalyzedGeneTrees() ) + "%)" );
System.out.println( "Gene tree internal nodes : " + rio.getIntNodesOfAnalyzedGeneTrees() );
System.out.println( "Gene tree external nodes : " + rio.getExtNodesOfAnalyzedGeneTrees() );
}
System.out.println();
System.out
.println( "Example 1: surfacing -p2g=pfam2go.txt -obo=go.obo -species_tree=tol_156.xml -no_eo -ie=0.01 -dufs -genomes=genomes_all.txt -pos_filter=tf_1.txt -out_dir=_tf1 -o=tf1" );
-System.out.println();
+ System.out.println();
System.out
.println( "Example 2: surfacing -p2g=pfam2go.txt -obo=go.obo -species_tree=tol_156.xml -last -ignore_viral_ids -no_eo -ie=0.1 -dufs -genomes=genomes_all.txt -pos_filter=tf_1.txt -all_prot -all_prot_e=0.1 -out_dir=_tf1_e01_ape01 -o=tf1_e01_ape01" );
System.out.println();
}
}
-
public static enum GraphicsExportType {
BMP( "bmp" ), GIF( "gif" ), JPG( "jpg" ), PDF( "pdf" ), PNG( "png" ), TIFF( "tif" );
private JMenuItem _gsdi_item;
private JMenuItem _gsdir_item;
private Phylogeny _species_tree;
-
- private JCheckBoxMenuItem _right_line_up_domains_cbmi;
- private JCheckBoxMenuItem _line_up_renderable_data_cbmi;
-
+ private JCheckBoxMenuItem _right_line_up_domains_cbmi;
+ private JCheckBoxMenuItem _line_up_renderable_data_cbmi;
@Override
public void actionPerformed( final ActionEvent e ) {
else if ( o == _color_by_taxonomic_group_cbmi ) {
updateOptions( getOptions() );
}
-
-
-
else if ( o == _line_up_renderable_data_cbmi ) {
if ( !_line_up_renderable_data_cbmi.isSelected() ) {
_right_line_up_domains_cbmi.setSelected( false );
}
updateOptions( getOptions() );
}
-
repaint();
}
return _options;
}
-
-
void initializeTypeMenu( final Options options ) {
setTypeMenuToAllUnselected();
try {
if ( ( _color_by_taxonomic_group_cbmi != null ) && _color_by_taxonomic_group_cbmi.isEnabled() ) {
options.setColorByTaxonomicGroup( _color_by_taxonomic_group_cbmi.isSelected() );
}
-
-
if ( ( _right_line_up_domains_cbmi != null ) && _right_line_up_domains_cbmi.isEnabled() ) {
options.setRightLineUpDomains( _right_line_up_domains_cbmi.isSelected() );
}
-
-
if ( ( _line_up_renderable_data_cbmi != null ) && _line_up_renderable_data_cbmi.isEnabled() ) {
options.setLineUpRendarableNodeData( _line_up_renderable_data_cbmi.isSelected() );
}
-
}
void updateTypeCheckboxes( final Options options, final Object o ) {
private Color _vector_data_mean_color = Color.WHITE;
private double _vector_data_height = 12;
private int _vector_data_width = 120;
- private boolean _line_up_renderable_node_data;
- private boolean _right_align_domains;
-
+ private boolean _line_up_renderable_node_data;
+ private boolean _right_align_domains;
static {
for( final String font_name : Constants.DEFAULT_FONT_CHOICES ) {
if ( Arrays.binarySearch( AptxUtil.getAvailableFontFamiliesSorted(), font_name ) >= 0 ) {
else if ( key.equals( "gui_button_border_color" ) ) {
_gui_button_border_color = Color.decode( ( String ) st.nextElement() );
}
-
else if ( key.equals( "show_default_node_shapes" ) ) {
ForesterUtil
.printWarningMessage( Constants.PRG_NAME,
+ "] for [ext_descendents_data_to_return_on]" );
}
}
-
else if ( key.equals( "vector_data_min_color" ) ) {
_vector_data_min_color = Color.decode( ( String ) st.nextElement() );
}
else if ( key.equals( "vector_data_mean_color" ) ) {
_vector_data_mean_color = Color.decode( ( String ) st.nextElement() );
}
-
else if ( key.equals( "vector_data_width" ) ) {
_vector_data_width = parseShort( ( String ) st.nextElement() );
if ( _vector_data_width < 1 ) {
_vector_data_height = 12;
}
}
-
else if ( key.equals( "line_up_renderable_data" ) ) {
setLineUpRendarableNodeData( parseBoolean( ( String ) st.nextElement() ) );
}
-
else if ( key.equals( "right_align_domain_architectures" ) ) {
setRightLineUpDomains( parseBoolean( ( String ) st.nextElement() ) );
}
-
-
else if ( st.countTokens() >= 2 ) { // counts the tokens that are not
// yet retrieved!
int key_index = -1;
public int getVectorDataWidth() {
return _vector_data_width;
}
-
+
final public boolean isLineUpRendarableNodeData() {
-
return _line_up_renderable_node_data;
}
-
+
final public boolean isRightLineUpDomains() {
-
return _right_align_domains;
}
-
- final public void setLineUpRendarableNodeData( final boolean line_up_renderable_node_data) {
-
- _line_up_renderable_node_data = line_up_renderable_node_data;
+
+ final public void setLineUpRendarableNodeData( final boolean line_up_renderable_node_data ) {
+ _line_up_renderable_node_data = line_up_renderable_node_data;
}
-
+
final public void setRightLineUpDomains( final boolean right_align_domains ) {
-
_right_align_domains = right_align_domains;
}
-
-
}
public final class Constants {
final static boolean __ALLOW_PHYLOGENETIC_INFERENCE = true;
- public final static boolean __RELEASE = false; // TODO remove me
- public final static boolean __SNAPSHOT_RELEASE = false; // TODO remove me
- public final static boolean __SYNTH_LF = false; // TODO remove me
+ public final static boolean __RELEASE = false; // TODO remove me
+ public final static boolean __SNAPSHOT_RELEASE = false; // TODO remove me
+ public final static boolean __SYNTH_LF = false; // TODO remove me
public final static boolean ALLOW_DDBJ_BLAST = false;
public final static String PRG_NAME = "Archaeopteryx";
final static String VERSION = "0.9894 beta";
final static float WHEEL_ZOOM_OUT_FACTOR = 1 / Constants.WHEEL_ZOOM_IN_FACTOR;
final static float WHEEL_ZOOM_IN_X_CORRECTION_FACTOR = 1.085f;
final static float WHEEL_ZOOM_OUT_X_CORRECTION_FACTOR = 1 / Constants.WHEEL_ZOOM_IN_X_CORRECTION_FACTOR;
- static final boolean SPECIAL_CUSTOM = false; //TODO remove me
+ static final boolean SPECIAL_CUSTOM = false; //TODO remove me
static final double EXT_NODE_INFO_LENGTH_MAX_RATIO = 0.95;
static final Dimension NODE_PANEL_SPLIT_MINIMUM_SIZE = new Dimension( 100, 50 );
static final Dimension NODE_PANEL_SIZE = new Dimension( 500, 600 );
final static float PDF_LINE_WIDTH_DEFAULT = 0.5f;
final static String APTX_WEB_SITE = "https://sites.google.com/site/cmzmasek/home/software/archaeopteryx";
final static String APTX_DOC_SITE = "https://sites.google.com/site/cmzmasek/home/software/archaeopteryx/documentation";
-
final static String PHYLOXML_WEB_SITE = ForesterConstants.PHYLO_XML_LOCATION;
final static String PHYLOXML_REFERENCE_URL = "http://www.biomedcentral.com/1471-2105/10/356/";
final static String APTX_REFERENCE_URL = "http://www.biomedcentral.com/bmcbioinformatics/";
- final static String APTX_REFERENCE = "Zmasek..."; //TODO
+ final static String APTX_REFERENCE = "Zmasek..."; //TODO
final static String PHYLOXML_REFERENCE = ForesterConstants.PHYLO_XML_REFERENCE;
final static String PHYLOXML_REFERENCE_SHORT = "Han MV and Zmasek CM (2009), BMC Bioinformatics, 10:356";
final static short NUMBER_OF_DIGITS_AFTER_COMMA_FOR_BRANCH_LENGTH_VALUES_DEFAULT = 3;
final class ControlPanel extends JPanel implements ActionListener {
- final static Font jcb_bold_font = new Font( Configuration.getDefaultFontFamilyName(),
- Font.BOLD,
- 9 );
- final static Font jcb_font = new Font( Configuration.getDefaultFontFamilyName(),
- Font.PLAIN,
- 9 );
- final static Font js_font = new Font( Configuration.getDefaultFontFamilyName(),
- Font.PLAIN,
- 9 );
- private static final String RETURN_TO_SUPER_TREE_TEXT = "Back to Super Tree";
- private static final long serialVersionUID = -8463483932821545633L;
- private NodeClickAction _action_when_node_clicked;
- private int _add_new_node_item;
- private Map<Integer, String> _all_click_to_names;
- private Map<String, Color> _annotation_colors;
- private int _blast_item;
- private JComboBox<String> _click_to_combobox;
- private JLabel _click_to_label;
- private List<String> _click_to_names;
- private int _collapse_cb_item;
- private JCheckBox _color_acc_species;
- private JCheckBox _color_acc_sequence;
- private JCheckBox _color_according_to_annotation;
- private boolean _color_branches;
- private JCheckBox _use_visual_styles_cb;
- private int _color_subtree_cb_item;
- private int _change_node_font_item;
+ final static Font jcb_bold_font = new Font( Configuration.getDefaultFontFamilyName(),
+ Font.BOLD,
+ 9 );
+ final static Font jcb_font = new Font( Configuration.getDefaultFontFamilyName(),
+ Font.PLAIN,
+ 9 );
+ final static Font js_font = new Font( Configuration.getDefaultFontFamilyName(),
+ Font.PLAIN,
+ 9 );
+ private static final String RETURN_TO_SUPER_TREE_TEXT = "Back to Super Tree";
+ private static final long serialVersionUID = -8463483932821545633L;
+ private NodeClickAction _action_when_node_clicked;
+ private int _add_new_node_item;
+ private Map<Integer, String> _all_click_to_names;
+ private Map<String, Color> _annotation_colors;
+ private int _blast_item;
+ private JComboBox<String> _click_to_combobox;
+ private JLabel _click_to_label;
+ private List<String> _click_to_names;
+ private int _collapse_cb_item;
+ private JCheckBox _color_acc_species;
+ private JCheckBox _color_acc_sequence;
+ private JCheckBox _color_according_to_annotation;
+ private boolean _color_branches;
+ private JCheckBox _use_visual_styles_cb;
+ private int _color_subtree_cb_item;
+ private int _change_node_font_item;
// The settings from the conf file
- private final Configuration _configuration;
- private int _copy_subtree_item;
- private int _cut_subtree_item;
- private JButton _decr_domain_structure_evalue_thr;
- private int _delete_node_or_subtree_item;
- private JCheckBox _display_as_phylogram_cb;
+ private final Configuration _configuration;
+ private int _copy_subtree_item;
+ private int _cut_subtree_item;
+ private JButton _decr_domain_structure_evalue_thr;
+ private int _delete_node_or_subtree_item;
+ private JCheckBox _display_as_phylogram_cb;
// Tree checkboxes
- private JCheckBox _display_internal_data;
- private JLabel _domain_display_label;
- private JTextField _domain_structure_evalue_thr_tf;
- private List<Boolean> _draw_phylogram;
- private JCheckBox _dynamically_hide_data;
- private int _edit_node_data_item;
- private int _get_ext_desc_data;
- private JButton _incr_domain_structure_evalue_thr;
- private final MainPanel _mainpanel;
- private JCheckBox _node_desc_popup_cb;
- private int _open_pdb_item;
- private int _open_seq_web_item;
- private int _open_tax_web_item;
- private int _color_node_font_item;
- private JButton _order;
- private boolean _order_of_appearance;
- private int _paste_subtree_item;
- private int _reroot_cb_item;
- private JButton _return_to_super_tree;
+ private JCheckBox _display_internal_data;
+ private JLabel _domain_display_label;
+ private JTextField _domain_structure_evalue_thr_tf;
+ private List<Boolean> _draw_phylogram;
+ private JCheckBox _dynamically_hide_data;
+ private int _edit_node_data_item;
+ private int _get_ext_desc_data;
+ private JButton _incr_domain_structure_evalue_thr;
+ private final MainPanel _mainpanel;
+ private JCheckBox _node_desc_popup_cb;
+ private int _open_pdb_item;
+ private int _open_seq_web_item;
+ private int _open_tax_web_item;
+ private int _color_node_font_item;
+ private JButton _order;
+ private boolean _order_of_appearance;
+ private int _paste_subtree_item;
+ private int _reroot_cb_item;
+ private JButton _return_to_super_tree;
// Search
- private JLabel _search_found_label_0;
- private JLabel _search_found_label_1;
- private JButton _search_reset_button_0;
- private JButton _search_reset_button_1;
- private JTextField _search_tf_0;
- private JTextField _search_tf_1;
- private int _select_nodes_item;
- private Sequence _selected_query_seq;
- private JCheckBox _seq_relation_confidence_switch;
- private JComboBox<SEQUENCE_RELATION_TYPE> _sequence_relation_type_box;
- private JCheckBox _show_annotation;
- private JCheckBox _show_binary_character_counts;
- private JCheckBox _show_binary_characters;
+ private JLabel _search_found_label_0;
+ private JLabel _search_found_label_1;
+ private JButton _search_reset_button_0;
+ private JButton _search_reset_button_1;
+ private JTextField _search_tf_0;
+ private JTextField _search_tf_1;
+ private int _select_nodes_item;
+ private Sequence _selected_query_seq;
+ private JCheckBox _seq_relation_confidence_switch;
+ private JComboBox<SEQUENCE_RELATION_TYPE> _sequence_relation_type_box;
+ private JCheckBox _show_annotation;
+ private JCheckBox _show_binary_character_counts;
+ private JCheckBox _show_binary_characters;
// Indices for the click-to options in the combo box
- private int _show_data_item;
- private JCheckBox _show_domain_architectures;
- private JCheckBox _show_events;
- private JCheckBox _show_gene_names;
- private JCheckBox _show_node_names;
- private JCheckBox _show_properties_cb;
- private JCheckBox _show_seq_names;
- private JCheckBox _show_seq_symbols;
- private JCheckBox _show_sequence_acc;
- private JComboBox<String> _show_sequence_relations;
- private JCheckBox _show_taxo_code;
- private JCheckBox _show_taxo_common_names;
- private JCheckBox _show_taxo_images_cb;
- private JCheckBox _show_taxo_scientific_names;
- private JCheckBox _show_vector_data_cb;
- private JButton _show_whole;
- private int _sort_descendents_item;
- private Map<String, Color> _species_colors;
- private Map<String, Color> _sequence_colors;
- private int _subtree_cb_item;
- private int _swap_cb_item;
- private JButton _uncollapse_all;
- private JCheckBox _width_branches;
- private JCheckBox _write_confidence;
- private JButton _zoom_in_domain_structure;
+ private int _show_data_item;
+ private JCheckBox _show_domain_architectures;
+ private JCheckBox _show_events;
+ private JCheckBox _show_gene_names;
+ private JCheckBox _show_node_names;
+ private JCheckBox _show_properties_cb;
+ private JCheckBox _show_seq_names;
+ private JCheckBox _show_seq_symbols;
+ private JCheckBox _show_sequence_acc;
+ private JComboBox<String> _show_sequence_relations;
+ private JCheckBox _show_taxo_code;
+ private JCheckBox _show_taxo_common_names;
+ private JCheckBox _show_taxo_images_cb;
+ private JCheckBox _show_taxo_scientific_names;
+ private JCheckBox _show_vector_data_cb;
+ private JButton _show_whole;
+ private int _sort_descendents_item;
+ private Map<String, Color> _species_colors;
+ private Map<String, Color> _sequence_colors;
+ private int _subtree_cb_item;
+ private int _swap_cb_item;
+ private JButton _uncollapse_all;
+ private JCheckBox _width_branches;
+ private JCheckBox _write_confidence;
+ private JButton _zoom_in_domain_structure;
// zooming and quick tree manipulation buttons:
- private JButton _zoom_in_x;
- private JButton _zoom_in_y;
- private JLabel _zoom_label;
- private JButton _zoom_out_domain_structure;
- private JButton _zoom_out_x;
- private JButton _zoom_out_y;
+ private JButton _zoom_in_x;
+ private JButton _zoom_in_y;
+ private JLabel _zoom_label;
+ private JButton _zoom_out_domain_structure;
+ private JButton _zoom_out_x;
+ private JButton _zoom_out_y;
ControlPanel( final MainPanel ap, final Configuration configuration ) {
init();
public void actionPerformed( final ActionEvent e ) {
try {
if ( e.getSource() == _color_acc_sequence ) {
- if ( _color_acc_species != null ) {
+ if ( _color_acc_species != null ) {
_color_acc_species.setSelected( false );
}
- }
+ }
else if ( e.getSource() == _color_acc_species ) {
- if ( _color_acc_sequence != null ) {
+ if ( _color_acc_sequence != null ) {
_color_acc_sequence.setSelected( false );
}
-
}
-
-
final TreePanel tp = getMainPanel().getCurrentTreePanel();
if ( tp == null ) {
return;
search1();
displayedPhylogenyMightHaveChanged( true );
}
- else if ( _dynamically_hide_data != null && e.getSource() == _dynamically_hide_data && !_dynamically_hide_data.isSelected() ) {
+ else if ( ( _dynamically_hide_data != null ) && ( e.getSource() == _dynamically_hide_data )
+ && !_dynamically_hide_data.isSelected() ) {
setDynamicHidingIsOn( false );
displayedPhylogenyMightHaveChanged( true );
}
public JCheckBox getColorAccSpeciesCb() {
return _color_acc_species;
}
-
+
public JCheckBox getColorAccSequenceCb() {
return _color_acc_sequence;
}
break;
case Configuration.color_according_to_species:
_color_acc_species = new JCheckBox( title );
- _color_acc_species
- .setToolTipText( "To colorize node labels as a function of taxonomy" );
+ _color_acc_species.setToolTipText( "To colorize node labels as a function of taxonomy" );
addJCheckBox( _color_acc_species, ch_panel );
add( ch_panel );
break;
case Configuration.color_according_to_sequence:
_color_acc_sequence = new JCheckBox( title );
- _color_acc_sequence
- .setToolTipText( "To colorize node labels as a function of sequence name" );
+ _color_acc_sequence.setToolTipText( "To colorize node labels as a function of sequence name" );
addJCheckBox( _color_acc_sequence, ch_panel );
add( ch_panel );
break;
Map<String, Color> getSpeciesColors() {
return _species_colors;
}
-
+
Map<String, Color> getSequenceColors() {
return _sequence_colors;
}
boolean isColorAccordingToTaxonomy() {
return ( ( _color_acc_species != null ) && _color_acc_species.isSelected() );
}
-
+
boolean isColorAccordingToSequence() {
return ( ( _color_acc_sequence != null ) && _color_acc_sequence.isSelected() );
}
void setSpeciesColors( final Map<String, Color> species_colors ) {
_species_colors = species_colors;
}
-
+
void setSequenceColors( final Map<String, Color> sequence_colors ) {
_sequence_colors = sequence_colors;
}
s = "User Selected Data";
break;
default:
- throw new IllegalStateException( "dont know how to deal with " + getConfiguration().getExtDescNodeDataToReturn() );
-
+ throw new IllegalStateException( "dont know how to deal with "
+ + getConfiguration().getExtDescNodeDataToReturn() );
}
final String label = _configuration.getClickToTitle( Configuration.get_ext_desc_data ) + " " + s;
addClickToOption( Configuration.get_ext_desc_data, label );
setCheckbox( Configuration.display_internal_data,
_configuration.doCheckOption( Configuration.display_internal_data ) );
}
-
-
if ( _configuration.doDisplayOption( Configuration.color_according_to_sequence ) ) {
addCheckbox( Configuration.color_according_to_sequence,
_configuration.getDisplayTitle( Configuration.color_according_to_sequence ) );
setCheckbox( Configuration.color_according_to_sequence,
_configuration.doCheckOption( Configuration.color_according_to_sequence ) );
}
-
-
-
-
if ( _configuration.doDisplayOption( Configuration.color_according_to_species ) ) {
addCheckbox( Configuration.color_according_to_species,
_configuration.getDisplayTitle( Configuration.color_according_to_species ) );
static final String USE_BRACKETS_FOR_CONF_IN_NH_LABEL = "Use Brackets for Confidence Values";\r
static final String USE_INTERNAL_NAMES_FOR_CONF_IN_NH_LABEL = "Use Internal Node Names for Confidence Values";\r
static final String SHOW_BASIC_TREE_INFORMATION_LABEL = "Basic Tree Information";\r
- static final String RIGHT_LINE_UP_DOMAINS = "Right-align Domain Architectures";\r
- static final String LINE_UP_RENDERABLE_DATA = "Line Up Node Diagrams";\r
+ static final String RIGHT_LINE_UP_DOMAINS = "Right-align Domain Architectures";\r
+ static final String LINE_UP_RENDERABLE_DATA = "Line Up Node Diagrams";\r
JMenuBar _jmenubar;\r
JMenu _file_jmenu;\r
JMenu _tools_menu;\r
JMenuItem _cycle_node_fill_mi;\r
JMenuItem _choose_node_size_mi;\r
JCheckBoxMenuItem _show_confidence_stddev_cbmi;\r
- JCheckBoxMenuItem _right_line_up_domains_cbmi;\r
- JCheckBoxMenuItem _line_up_renderable_data_cbmi;\r
+ JCheckBoxMenuItem _right_line_up_domains_cbmi;\r
+ JCheckBoxMenuItem _line_up_renderable_data_cbmi;\r
// _ print\r
JCheckBoxMenuItem _graphics_export_visible_only_cbmi;\r
JCheckBoxMenuItem _antialias_print_cbmi;\r
}\r
updateOptions( getOptions() );\r
}\r
- \r
- \r
else if ( ( o == _rectangular_type_cbmi ) || ( o == _triangular_type_cbmi ) || ( o == _curved_type_cbmi )\r
|| ( o == _convex_type_cbmi ) || ( o == _euro_type_cbmi ) || ( o == _rounded_type_cbmi )\r
|| ( o == _unrooted_type_cbmi ) || ( o == _circular_type_cbmi ) ) {\r
typeChanged( o );\r
}\r
- \r
else if ( o == _about_item ) {\r
about();\r
}\r
ForesterUtil.printErrorMessage( Constants.PRG_NAME, e1.toString() );\r
}\r
}\r
- \r
else {\r
if ( _load_phylogeny_from_webservice_menu_items != null ) {\r
for( int i = 0; i < _load_phylogeny_from_webservice_menu_items.length; ++i ) {\r
_contentpane.repaint();\r
}\r
\r
- private void deleteSelectedNodes( boolean delete ) {\r
+ private void deleteSelectedNodes( final boolean delete ) {\r
final Phylogeny phy = getMainPanel().getCurrentPhylogeny();\r
- if ( phy == null || phy.getNumberOfExternalNodes() < 2 ) {\r
+ if ( ( phy == null ) || ( phy.getNumberOfExternalNodes() < 2 ) ) {\r
return;\r
}\r
- List<PhylogenyNode> nodes = new ArrayList<PhylogenyNode>();\r
+ final List<PhylogenyNode> nodes = new ArrayList<PhylogenyNode>();\r
if ( ( getCurrentTreePanel().getFoundNodes0() != null ) || ( getCurrentTreePanel().getFoundNodes1() != null ) ) {\r
- final List<PhylogenyNode> all_selected_nodes = getCurrentTreePanel().getFoundNodesAsListOfPhylogenyNodes();\r
+ final List<PhylogenyNode> all_selected_nodes = getCurrentTreePanel().getFoundNodesAsListOfPhylogenyNodes();\r
for( final PhylogenyNode n : all_selected_nodes ) {\r
if ( n.isExternal() ) {\r
nodes.add( n );\r
}\r
}\r
}\r
- \r
String function = "Retain";\r
if ( delete ) {\r
function = "Delete";\r
return _species_tree;\r
}\r
\r
- \r
-\r
void initializeTypeMenu( final Options options ) {\r
setTypeMenuToAllUnselected();\r
switch ( options.getPhylogenyGraphicsType() ) {\r
}\r
if ( ( _right_line_up_domains_cbmi != null ) && _right_line_up_domains_cbmi.isEnabled() ) {\r
options.setRightLineUpDomains( _right_line_up_domains_cbmi.isSelected() );\r
- \r
}\r
if ( ( _line_up_renderable_data_cbmi != null ) && _line_up_renderable_data_cbmi.isEnabled() ) {\r
options.setLineUpRendarableNodeData( _line_up_renderable_data_cbmi.isSelected() );\r
_options_jmenu.add( _right_line_up_domains_cbmi = new JCheckBoxMenuItem( MainFrame.RIGHT_LINE_UP_DOMAINS ) );
}
_options_jmenu.add( _line_up_renderable_data_cbmi = new JCheckBoxMenuItem( MainFrame.LINE_UP_RENDERABLE_DATA ) );
-
_options_jmenu.add( _show_annotation_ref_source = new JCheckBoxMenuItem( MainFrame.SHOW_ANN_REF_SOURCE_LABEL ) );
_options_jmenu.add( _show_confidence_stddev_cbmi = new JCheckBoxMenuItem( MainFrame.SHOW_CONF_STDDEV_LABEL ) );
_options_jmenu
private File _seqs_file = null;\r
JMenuItem _read_values_jmi;\r
JMenuItem _read_seqs_jmi;\r
- \r
\r
private MainFrameApplication( final Phylogeny[] phys, final Configuration config ) {\r
_configuration = config;\r
if ( getConfiguration().doDisplayOption( Configuration.show_domain_architectures ) ) {\r
_options_jmenu.add( _show_domain_labels = new JCheckBoxMenuItem( SHOW_DOMAIN_LABELS_LABEL ) );\r
_options_jmenu.add( _right_line_up_domains_cbmi = new JCheckBoxMenuItem( MainFrame.RIGHT_LINE_UP_DOMAINS ) );\r
- }\r
+ }\r
_options_jmenu.add( _line_up_renderable_data_cbmi = new JCheckBoxMenuItem( MainFrame.LINE_UP_RENDERABLE_DATA ) );\r
- \r
_options_jmenu.add( _show_annotation_ref_source = new JCheckBoxMenuItem( SHOW_ANN_REF_SOURCE_LABEL ) );\r
_options_jmenu.add( _show_confidence_stddev_cbmi = new JCheckBoxMenuItem( SHOW_CONF_STDDEV_LABEL ) );\r
_options_jmenu.add( _color_by_taxonomic_group_cbmi = new JCheckBoxMenuItem( COLOR_BY_TAXONOMIC_GROUP ) );\r
.getNhConversionSupportValueStyle() == NH_CONVERSION_SUPPORT_VALUE_STYLE.IN_SQUARE_BRACKETS );\r
customizeCheckBoxMenuItem( _use_internal_names_for_conf_in_nh_export_cbmi, getOptions()\r
.getNhConversionSupportValueStyle() == NH_CONVERSION_SUPPORT_VALUE_STYLE.AS_INTERNAL_NODE_NAMES );\r
- \r
- \r
- customizeCheckBoxMenuItem( _line_up_renderable_data_cbmi, getOptions().isLineUpRendarableNodeData()\r
- );\r
- \r
+ customizeCheckBoxMenuItem( _line_up_renderable_data_cbmi, getOptions().isLineUpRendarableNodeData() );\r
customizeCheckBoxMenuItem( _right_line_up_domains_cbmi, getOptions().isRightLineUpDomains() );\r
_jmenubar.add( _options_jmenu );\r
}\r
customizeJMenuItem( _delete_selected_nodes_item );\r
_tools_menu.add( _delete_not_selected_nodes_item = new JMenuItem( "Retain Selected Nodes" ) );\r
_delete_not_selected_nodes_item.setToolTipText( "To delete all not selected external nodes" );\r
- \r
customizeJMenuItem( _delete_not_selected_nodes_item );\r
_tools_menu.addSeparator();\r
_tools_menu.add( _collapse_species_specific_subtrees = new JMenuItem( "Collapse Species-Specific Subtrees" ) );\r
if ( ( phys != null ) && ( phys.length > 0 ) ) {\r
if ( nhx_or_nexus && getOptions().isInternalNumberAreConfidenceForNhParsing() ) {\r
for( final Phylogeny phy : phys ) {\r
- \r
PhylogenyMethods.transferInternalNodeNamesToConfidence( phy, "" );\r
}\r
}\r
import org.forester.phylogeny.data.NodeVisualData.NodeFill;
import org.forester.phylogeny.data.NodeVisualData.NodeShape;
import org.forester.util.ForesterUtil;
-import org.omg.stub.java.rmi._Remote_Stub;
/*
* This is to hold changeable options.
private boolean _show_overview;
private boolean _show_scale;
private TAXONOMY_EXTRACTION _taxonomy_extraction;
- private boolean _line_up_renderable_node_data;
- private boolean _right_align_domains;
+ private boolean _line_up_renderable_node_data;
+ private boolean _right_align_domains;
private Options() {
init();
if ( configuration.getExtDescNodeDataToReturn() != null ) {
instance.setExtDescNodeDataToReturn( configuration.getExtDescNodeDataToReturn() );
}
-
- instance.setRightLineUpDomains( configuration.isRightLineUpDomains() );
- instance.setLineUpRendarableNodeData( configuration.isLineUpRendarableNodeData() );
+ instance.setRightLineUpDomains( configuration.isRightLineUpDomains() );
+ instance.setLineUpRendarableNodeData( configuration.isLineUpRendarableNodeData() );
instance.setAllowErrorsInDistanceToParent( false );
}
return instance;
}
final public boolean isLineUpRendarableNodeData() {
-
return _line_up_renderable_node_data;
}
-
+
final public boolean isRightLineUpDomains() {
-
return _right_align_domains;
}
-
- final public void setLineUpRendarableNodeData( final boolean line_up_renderable_node_data) {
-
- _line_up_renderable_node_data = line_up_renderable_node_data;
+
+ final public void setLineUpRendarableNodeData( final boolean line_up_renderable_node_data ) {
+ _line_up_renderable_node_data = line_up_renderable_node_data;
}
-
+
final public void setRightLineUpDomains( final boolean right_align_domains ) {
-
_right_align_domains = right_align_domains;
}
-
}
import org.forester.util.ForesterUtil;
-
public final class TreeColorSet {
public static final String ANNOTATION = "Annotation";
BINARY_DOMAIN_COMBINATIONS, ANNOTATION, OVERVIEW };
static final String[] SCHEME_NAMES = { "Default", "Black", "Black & White", "Silver", "Green",
"White & Blue", "Cyan", "Orange", "Blue", "Blue & White", "Neon" };
-
private int _color_scheme;
-
private final Color[][] _color_schemes = { { new Color( 0, 0, 0 ), // background_color
new Color( 0, 100, 100 ), // background_color_gradient_bottom
new Color( 230, 230, 230 ), // sequence __ Default (same as Black)
new Color( 255, 0, 0 ), // duplication_box_color
new Color( 0, 255, 0 ), // speciation_box_color
new Color( 255, 255, 0 ), // duplication_speciation_color
- new Color( 255, 200, 0 ), // domain_label
- new Color( 255, 200, 0 ), // domains_base
+ new Color( 255, 200, 0 ), // domain_label
+ new Color( 255, 200, 0 ), // domains_base
new Color( 150, 150, 150 ), // binary_domain_combinations_color
new Color( 150, 150, 150 ) // annotation
, new Color( 150, 150, 150 ) // ov
new Color( 255, 0, 0 ), // duplication_box_color
new Color( 0, 255, 0 ), // speciation_box_color
new Color( 255, 255, 0 ), // duplication_speciation_color
- new Color(255, 255, 255 ), // domain_label
+ new Color( 255, 255, 255 ), // domain_label
new Color( 100, 100, 100 ), // domains_base
new Color( 255, 255, 255 ), // binary_domain_combinations_color
new Color( 255, 255, 255 ) // annotation
new Color( 0, 255, 0 ), // speciation_box_color
new Color( 255, 255, 0 ), // duplication_speciation_color
new Color( 127, 255, 0 ), // domain_label
- new Color( 234, 173, 234 ), // domains_base
+ new Color( 234, 173, 234 ), // domains_base
new Color( 27, 255, 0 ), // binary_domain_combinations_color
new Color( 27, 255, 0 ) // annotation
, new Color( 77, 77, 255 ) // ov
public Color getDomainBaseColor() {
return domain_base_color;
}
-
+
public Color getDomainLabelColor() {
return domain_label_color;
}
if ( getControlPanel().isDrawPhylogram() ) {
if ( getOptions().isLineUpRendarableNodeData() ) {
if ( getOptions().isRightLineUpDomains() ) {
- rds.render( getMaxDistanceToRoot() * getXcorrectionFactor() + _length_of_longest_text
- + ( _longest_domain - rds.getTotalLength() )
- * rds.getRenderingFactorWidth(),
+ rds.render( ( getMaxDistanceToRoot() * getXcorrectionFactor() )
+ + _length_of_longest_text
+ + ( ( _longest_domain - rds.getTotalLength() ) * rds
+ .getRenderingFactorWidth() ),
node.getYcoord() - ( h / 2 ),
g,
this,
to_pdf );
}
else {
- rds.render( getMaxDistanceToRoot() * getXcorrectionFactor() + _length_of_longest_text,
+ rds.render( ( getMaxDistanceToRoot() * getXcorrectionFactor() ) + _length_of_longest_text,
node.getYcoord() - ( h / 2 ),
g,
this,
}
else {
if ( getOptions().isRightLineUpDomains() ) {
- rds.render( getPhylogeny().getFirstExternalNode().getXcoord() + _length_of_longest_text
- - 20 + ( _longest_domain - rds.getTotalLength() )
- * rds.getRenderingFactorWidth(),
+ rds.render( ( ( getPhylogeny().getFirstExternalNode().getXcoord() + _length_of_longest_text ) - 20 )
+ + ( ( _longest_domain - rds.getTotalLength() ) * rds
+ .getRenderingFactorWidth() ),
node.getYcoord() - ( h / 2 ),
g,
this,
if ( n.getNodeData().isHasTaxonomy()
&& ( !ForesterUtil.isEmpty( n.getNodeData().getTaxonomy().getScientificName() )
|| !ForesterUtil.isEmpty( n.getNodeData().getTaxonomy().getCommonName() ) || !ForesterUtil
- .isEmpty( n.getNodeData().getTaxonomy().getTaxonomyCode() ) ) ) {
+ .isEmpty( n.getNodeData().getTaxonomy().getTaxonomyCode() ) ) ) {
if ( !ForesterUtil.isEmpty( n.getNodeData().getTaxonomy().getRank() )
&& n.getNodeData().getTaxonomy().getRank().equalsIgnoreCase( rank ) ) {
final BranchColor c = new BranchColor( tree_panel.calculateTaxonomyBasedColor( n.getNodeData()
if ( sb.charAt( sb.length() - 1 ) == ' ' ) {
sb.deleteCharAt( sb.length() - 1 );
}
- if ( i < ans.size() - 1 ) {
+ if ( i < ( ans.size() - 1 ) ) {
sb.append( ", " );
}
}
* @param g
* the Graphics to render to
*/
- public void render( final double x, final double y, final Graphics2D g, final TreePanel tree_panel, boolean to_pdf );
+ public void render( final double x, final double y, final Graphics2D g, final TreePanel tree_panel, boolean to_pdf );
public void setParameter( final double parameter );
public final class RenderableVector implements RenderablePhylogenyData {
- final static int VECTOR_DEFAULT_HEIGHT = 12;
- public final static int VECTOR_DEFAULT_WIDTH = 120;
+ final static int VECTOR_DEFAULT_HEIGHT = 12;
+ public final static int VECTOR_DEFAULT_WIDTH = 120;
private double _rendering_factor_width = 1.0;
private List<Double> _values;
private final Rectangle2D _rectangle = new Rectangle2D.Float();
-
- private double _height = VECTOR_DEFAULT_HEIGHT;
+ private double _height = VECTOR_DEFAULT_HEIGHT;
private double _min;
private double _max;
private double _mean;
- private Color _min_color = Color.BLUE;
- private Color _max_color = Color.YELLOW;
- private Color _mean_color = Color.WHITE;
- private int _width = VECTOR_DEFAULT_WIDTH;
-
-
+ private Color _min_color = Color.BLUE;
+ private Color _max_color = Color.YELLOW;
+ private Color _mean_color = Color.WHITE;
+ private int _width = VECTOR_DEFAULT_WIDTH;
private static RenderableVector _instance = null;
private RenderableVector() {
if ( _instance == null ) {
_instance = new RenderableVector();
}
-
_instance._values = values;
-
if ( configuration != null ) {
- _instance._min_color =configuration.getVectorDataMinColor();
+ _instance._min_color = configuration.getVectorDataMinColor();
_instance._max_color = configuration.getVectorDataMaxColor();
_instance._mean_color = configuration.getVectorDataMeanColor();
_instance._width = configuration.getVectorDataWidth();
_instance._height = configuration.getVectorDataHeight();
}
-
-
if ( stats.getN() > 0 ) {
_instance._min = stats.getMin();
_instance._max = stats.getMax();
final int m_i = _mappings[ i ];
if ( otu1 < i ) {
if ( otu2 > i ) {
- _d_values[ m_otu1 ][ m_i ] = ( _d_values[ m_otu1 ][ m_i ] + _d_values[ m_i ][ m_otu2 ] - d ) / 2;
+ _d_values[ m_otu1 ][ m_i ] = ( ( _d_values[ m_otu1 ][ m_i ] + _d_values[ m_i ][ m_otu2 ] ) - d ) / 2;
//System.out.print( DF.format( _d_values[ m_otu1 ][ m_i ] ) );
}
else {
- _d_values[ m_otu1 ][ m_i ] = ( _d_values[ m_otu1 ][ m_i ] + _d_values[ m_otu2 ][ m_i ] - d ) / 2;
+ _d_values[ m_otu1 ][ m_i ] = ( ( _d_values[ m_otu1 ][ m_i ] + _d_values[ m_otu2 ][ m_i ] ) - d ) / 2;
//System.out.print( DF.format( _d_values[ m_otu1 ][ m_i ] ) );
}
}
else {
if ( otu2 > i ) {
- _d_values[ m_i ][ m_otu1 ] = ( _d_values[ m_i ][ m_otu1 ] + _d_values[ m_i ][ m_otu2 ] - d ) / 2;
+ _d_values[ m_i ][ m_otu1 ] = ( ( _d_values[ m_i ][ m_otu1 ] + _d_values[ m_i ][ m_otu2 ] ) - d ) / 2;
//System.out.print( DF.format( _d_values[ m_i ][ m_otu1 ] ) );
}
else {
- _d_values[ m_i ][ m_otu1 ] = ( _d_values[ m_i ][ m_otu1 ] + _d_values[ m_otu2 ][ m_i ] - d ) / 2;
+ _d_values[ m_i ][ m_otu1 ] = ( ( _d_values[ m_i ][ m_otu1 ] + _d_values[ m_otu2 ][ m_i ] ) - d ) / 2;
// System.out.print( DF.format( _d_values[ m_otu1 ][ m_i ] ) );
}
}
final int m_i = _mappings[ i ];
if ( otu1 < i ) {
if ( otu2 > i ) {
- _d_values[ m_otu1 ][ m_i ] = ( _d_values[ m_otu1 ][ m_i ] + _d_values[ m_i ][ m_otu2 ] - d ) / 2;
+ _d_values[ m_otu1 ][ m_i ] = ( ( _d_values[ m_otu1 ][ m_i ] + _d_values[ m_i ][ m_otu2 ] ) - d ) / 2;
}
else {
- _d_values[ m_otu1 ][ m_i ] = ( _d_values[ m_otu1 ][ m_i ] + _d_values[ m_otu2 ][ m_i ] - d ) / 2;
+ _d_values[ m_otu1 ][ m_i ] = ( ( _d_values[ m_otu1 ][ m_i ] + _d_values[ m_otu2 ][ m_i ] ) - d ) / 2;
}
}
else {
if ( otu2 > i ) {
- _d_values[ m_i ][ m_otu1 ] = ( _d_values[ m_i ][ m_otu1 ] + _d_values[ m_i ][ m_otu2 ] - d ) / 2;
+ _d_values[ m_i ][ m_otu1 ] = ( ( _d_values[ m_i ][ m_otu1 ] + _d_values[ m_i ][ m_otu2 ] ) - d ) / 2;
}
else {
- _d_values[ m_i ][ m_otu1 ] = ( _d_values[ m_i ][ m_otu1 ] + _d_values[ m_otu2 ][ m_i ] - d ) / 2;
+ _d_values[ m_i ][ m_otu1 ] = ( ( _d_values[ m_i ][ m_otu1 ] + _d_values[ m_otu2 ][ m_i ] ) - d ) / 2;
}
}
}
}
double new_d;
if ( otu1 < mj ) {
- new_d = ( _d_values[ otu1 ][ mj ] + getDvalue( j, otu2 ) - d ) / 2;
+ new_d = ( ( _d_values[ otu1 ][ mj ] + getDvalue( j, otu2 ) ) - d ) / 2;
_s.addPairing( new_d, otu1, mj );
_d_values[ otu1 ][ mj ] = new_d;
}
else {
- new_d = ( _d_values[ mj ][ otu1 ] + getDvalue( j, otu2 ) - d ) / 2;
+ new_d = ( ( _d_values[ mj ][ otu1 ] + getDvalue( j, otu2 ) ) - d ) / 2;
_s.addPairing( new_d, mj, otu1 );
_d_values[ mj ][ otu1 ] = new_d;
}
}
else {
final int[] x = new int[ m.get( key ).length + 1 ];
- for( int i = 0; i < x.length - 1; i++ ) {
+ for( int i = 0; i < ( x.length - 1 ); i++ ) {
x[ i ] = m.get( key )[ i ];
}
x[ x.length - 1 ] = value;
case HAS_PART:
sb.append( HAS_PART_STR );
break;
- case OCCURS_IN:
+ case OCCURS_IN:
sb.append( OCCURS_IN_STR );
break;
default:
public static final String NEGATIVELY_REGULATES_STR = "negatively_regulates";
public static final String POSITIVELY_REGULATES_STR = "positively_regulates";
public static final String HAS_PART_STR = "has_part";
- public static final String OCCURS_IN_STR ="occurs_in";
+ public static final String OCCURS_IN_STR = "occurs_in";
public GoId getGoId();
s = getSequence( row );
final char[] x = s.getMolecularSequence();
sb = new StringBuilder( x.length );
- for( int i = 0; i < x.length; ++i ) {
- if ( x[ i ] != Sequence.GAP ) {
- sb.append( x[ i ] );
+ for( final char element : x ) {
+ if ( element != Sequence.GAP ) {
+ sb.append( element );
}
}
}
final private void deleteColumn( final int col ) {
checkColumn( col );
- for( int c = col; c < _length - 1; ++c ) {
+ for( int c = col; c < ( _length - 1 ); ++c ) {
_mapped_col_positions[ c ] = _mapped_col_positions[ c + 1 ];
}
--_length;
final private void deleteRow( final int row ) {
checkRow( row );
- for( int r = row; r < _seqs - 1; ++r ) {
+ for( int r = row; r < ( _seqs - 1 ); ++r ) {
_mapped_row_positions[ r ] = _mapped_row_positions[ r + 1 ];
}
--_seqs;
}\r
return max;\r
}\r
- \r
+\r
public static PhylogenyNode calculateNodeWithMaxDistanceToRoot( final Phylogeny phy ) {\r
double max = 0.0;\r
PhylogenyNode max_node = phy.getFirstExternalNode();\r
return ( getDate() != null )
&& ( !ForesterUtil.isEmpty( getDate().getDesc() ) || !ForesterUtil.isNull( getDate().getMax() )
|| !ForesterUtil.isNull( getDate().getMin() ) || !ForesterUtil.isNull( getDate().getValue() ) || !ForesterUtil
- .isEmpty( getDate().getUnit() ) );
+ .isEmpty( getDate().getUnit() ) );
}
public boolean isHasDistribution() {
public boolean isEmpty() {
return ( ( getIdentifier() == null ) && ForesterUtil.isEmpty( getTaxonomyCode() )
&& ForesterUtil.isEmpty( getCommonName() ) && ForesterUtil.isEmpty( getScientificName() ) && ForesterUtil
- .isEmpty( _lineage ) );
+ .isEmpty( _lineage ) );
}
/**
first = 0;
}
if ( log() ) {
- postLog( species_tree, first, first + counter - 1 );
+ postLog( species_tree, first, ( first + counter ) - 1 );
}
if ( _verbose ) {
System.out.println();
final AdjactantDirectedBinaryDomainCombination dc = new AdjactantDirectedBinaryDomainCombination( n_terminal,
c_terminal );
ADDC_POOL.put( code, dc );
- if ( VERBOSE && ( ADDC_POOL.size() % 100 == 0 ) ) {
+ if ( VERBOSE && ( ( ADDC_POOL.size() % 100 ) == 0 ) ) {
System.out.println( " addc pool size: " + ADDC_POOL.size() );
}
return dc;
else {
final BasicBinaryDomainCombination dc = new BasicBinaryDomainCombination( id0, id1 );
DC_POOL.put( code, dc );
- if ( VERBOSE && ( DC_POOL.size() % 100 == 0 ) ) {
+ if ( VERBOSE && ( ( DC_POOL.size() % 100 ) == 0 ) ) {
System.out.println( " dc pool size: " + DC_POOL.size() );
}
return dc;
else {
final DirectedBinaryDomainCombination dc = new DirectedBinaryDomainCombination( n_terminal, c_terminal );
DDC_POOL.put( code, dc );
- if ( VERBOSE && ( DDC_POOL.size() % 100 == 0 ) ) {
+ if ( VERBOSE && ( ( DDC_POOL.size() % 100 ) == 0 ) ) {
System.out.println( " ddc pool size: " + DDC_POOL.size() );
}
return dc;
}
}
+ @Override
public int compareTo( final DomainSimilarity domain_similarity ) {
if ( this == domain_similarity ) {
return EQUAL;
_base = base;
}
+ @Override
public int compare( final String a, final String b ) {
if ( _base.get( a ) >= _base.get( b ) ) {
return -1;