private JCheckBoxMenuItem _inverse_search_result_cbmi;
private JCheckBoxMenuItem _show_overview_cbmi;
private JMenuItem _choose_minimal_confidence_mi;
- private JCheckBoxMenuItem _show_branch_length_values_cbmi;
private JMenuItem _collapse_species_specific_subtrees;
private JMenuItem _overview_placment_mi;
private ButtonGroup _radio_group_1;
else if ( o == _show_scale_cbmi ) {
updateOptions( getOptions() );
}
- else if ( o == _show_branch_length_values_cbmi ) {
- updateOptions( getOptions() );
- }
else if ( o == _show_confidence_stddev_cbmi ) {
updateOptions( getOptions() );
}
_options_jmenu.add( _show_overview_cbmi = new JCheckBoxMenuItem( MainFrame.SHOW_OVERVIEW_LABEL ) );
_options_jmenu.add( _show_scale_cbmi = new JCheckBoxMenuItem( MainFrame.DISPLAY_SCALE_LABEL ) );
_options_jmenu
- .add( _show_branch_length_values_cbmi = new JCheckBoxMenuItem( MainFrame.DISPLAY_BRANCH_LENGTH_VALUES_LABEL ) );
- _options_jmenu
.add( _show_default_node_shapes_internal_cbmi = new JCheckBoxMenuItem( MainFrame.DISPLAY_NODE_BOXES_LABEL_INT ) );
_options_jmenu
.add( _show_default_node_shapes_external_cbmi = new JCheckBoxMenuItem( MainFrame.DISPLAY_NODE_BOXES_LABEL_EXT ) );
getOptions().getCladogramType() == CLADOGRAM_TYPE.TOTAL_NODE_SUM_DEP );
customizeRadioButtonMenuItem( _ext_node_dependent_cladogram_rbmi,
getOptions().getCladogramType() == CLADOGRAM_TYPE.EXT_NODE_SUM_DEP );
- customizeCheckBoxMenuItem( _show_branch_length_values_cbmi, getOptions().isShowBranchLengthValues() );
customizeCheckBoxMenuItem( _show_overview_cbmi, getOptions().isShowOverview() );
customizeCheckBoxMenuItem( _search_whole_words_only_cbmi, getOptions().isMatchWholeTermsOnly() );
customizeCheckBoxMenuItem( _inverse_search_result_cbmi, getOptions().isInverseSearchResult() );
options.setShowOverview( ( _show_overview_cbmi != null ) && _show_overview_cbmi.isSelected() );
options.setShowConfidenceStddev( ( _show_confidence_stddev_cbmi != null )
&& _show_confidence_stddev_cbmi.isSelected() );
- if ( ( _show_branch_length_values_cbmi != null ) && _show_branch_length_values_cbmi.isEnabled() ) {
- options.setShowBranchLengthValues( _show_branch_length_values_cbmi.isSelected() );
- }
options.setMatchWholeTermsOnly( ( _search_whole_words_only_cbmi != null )
&& _search_whole_words_only_cbmi.isSelected() );
options.setInverseSearchResult( ( _inverse_search_result_cbmi != null )
{ "Colorize by Annotation", "display", "no" }, { "Seq Symbol", "display", "yes" },
{ "Rollover", "display", "yes" }, { "Relation Confidence", "nodisplay", "no" },
{ "Vector Data", "nodisplay", "no" }, { "Taxonomy Images", "display", "no" },
- { "Properties", "display", "no" }, { "Gene Name", "display", "yes" } };
+ { "Properties", "display", "no" }, { "Gene Name", "display", "yes" },
+ { "Multiple Seq Alignment", "display", "no" }, { "Branch Length Values", "display", "no" } };
final static int display_as_phylogram = 0;
final static int show_node_names = 1;
final static int show_tax_code = 2;
final static int show_taxonomy_images = 24;
final static int show_properties = 25;
final static int show_gene_names = 26;
+ final static int show_mol_seqs = 27;
+ final static int write_branch_length_values = 28;
static final String VALIDATE_AGAINST_PHYLOXML_XSD_SCHEMA = "validate_against_phyloxml_xsd_schema";
private static Hashtable<String, Color> _sequence_colors;
private static Hashtable<String, Color> _annotation_colors;
private PHYLOGENY_GRAPHICS_TYPE _phylogeny_graphics_type = PHYLOGENY_GRAPHICS_TYPE.RECTANGULAR;
private float _print_line_width = Constants.PDF_LINE_WIDTH_DEFAULT;
private boolean _show_annotation_ref_source = true;
- private boolean _show_branch_length_values = false;
private boolean _show_default_node_shapes_external = false;
private boolean _show_default_node_shapes_internal = false;
private boolean _show_domain_labels = true;
_nh_parsing_replace_underscores = nh_parsing_replace_underscores;
}
- public void setShowBranchLengthValues( final boolean show_branch_length_values ) {
- _show_branch_length_values = show_branch_length_values;
- }
-
public void setShowDefaultNodeShapesExternal( final boolean show_default_node_shapes_external ) {
_show_default_node_shapes_external = show_default_node_shapes_external;
}
return _nh_parsing_replace_underscores;
}
- boolean isShowBranchLengthValues() {
- return _show_branch_length_values;
- }
-
boolean isShowOverview() {
return _show_overview;
}
else if ( key.equals( "show_overview" ) ) {
setShowOverview( parseBoolean( ( String ) st.nextElement() ) );
}
- else if ( key.equals( "show_branch_length_values" ) ) {
- setShowBranchLengthValues( parseBoolean( ( String ) st.nextElement() ) );
- }
else if ( key.equals( "background_gradient" ) ) {
setBackgroundColorGradient( parseBoolean( ( String ) st.nextElement() ) );
}
else if ( key.equals( "write_confidence_values" ) ) {
key_index = Configuration.write_confidence_values;
}
+ else if ( key.equals( "write_branch_length_values" ) ) {
+ key_index = Configuration.write_branch_length_values;
+ }
else if ( key.equals( "write_events" ) ) {
key_index = Configuration.write_events;
}
else if ( key.equals( "show_domain_architectures" ) ) {
key_index = Configuration.show_domain_architectures;
}
+ else if ( key.equals( "show_msa" ) ) {
+ key_index = Configuration.show_mol_seqs;
+ }
else if ( key.equals( "show_annotations" ) ) {
key_index = Configuration.show_annotation;
}
// Indices for the click-to options in the combo box
private int _show_data_item;
private JCheckBox _show_domain_architectures;
+ private JCheckBox _show_mol_seqs;
+ private JCheckBox _write_branch_length_values;
private JCheckBox _show_events;
private JCheckBox _show_gene_names;
private JCheckBox _show_node_names;
addJCheckBox( _width_branches, ch_panel );
add( ch_panel );
break;
+ case Configuration.write_branch_length_values:
+ _write_branch_length_values = new JCheckBox( title );
+ addJCheckBox( _write_branch_length_values, ch_panel );
+ add( ch_panel );
+ break;
case Configuration.show_domain_architectures:
_show_domain_architectures = new JCheckBox( title );
addJCheckBox( _show_domain_architectures, ch_panel );
add( ch_panel );
break;
+ case Configuration.show_mol_seqs:
+ _show_mol_seqs = new JCheckBox( title );
+ addJCheckBox( _show_mol_seqs, ch_panel );
+ add( ch_panel );
+ break;
case Configuration.show_seq_names:
_show_seq_names = new JCheckBox( title );
addJCheckBox( _show_seq_names, ch_panel );
return ( ( getWriteConfidenceCb() != null ) && getWriteConfidenceCb().isSelected() );
}
+ boolean isWriteBranchLengthValues() {
+ return ( ( _write_branch_length_values != null ) && _write_branch_length_values.isSelected() );
+ }
+
boolean isShowDomainArchitectures() {
return ( ( _show_domain_architectures != null ) && _show_domain_architectures.isSelected() );
}
+ public boolean isShowMolSequences() {
+ return ( ( _show_mol_seqs != null ) && _show_mol_seqs.isSelected() );
+ }
+
boolean isShowGeneNames() {
return ( ( _show_gene_names != null ) && _show_gene_names.isSelected() );
}
_show_domain_architectures.setSelected( state );
}
break;
+ case Configuration.write_branch_length_values:
+ if ( _write_branch_length_values != null ) {
+ _write_branch_length_values.setSelected( state );
+ }
+ break;
+ case Configuration.show_mol_seqs:
+ if ( _show_mol_seqs != null ) {
+ _show_mol_seqs.setSelected( state );
+ }
+ break;
case Configuration.show_seq_names:
if ( _show_seq_names != null ) {
_show_seq_names.setSelected( state );
addCheckbox( Configuration.show_annotation, _configuration.getDisplayTitle( Configuration.show_annotation ) );
setCheckbox( Configuration.show_annotation, _configuration.doCheckOption( Configuration.show_annotation ) );
}
+ if ( _configuration.doDisplayOption( Configuration.write_confidence_values ) ) {
+ addCheckbox( Configuration.write_confidence_values,
+ _configuration.getDisplayTitle( Configuration.write_confidence_values ) );
+ setCheckbox( Configuration.write_confidence_values,
+ _configuration.doCheckOption( Configuration.write_confidence_values ) );
+ }
+ if ( _configuration.doDisplayOption( Configuration.write_branch_length_values ) ) {
+ addCheckbox( Configuration.write_branch_length_values,
+ _configuration.getDisplayTitle( Configuration.write_branch_length_values ) );
+ setCheckbox( Configuration.write_branch_length_values,
+ _configuration.doCheckOption( Configuration.write_branch_length_values ) );
+ }
if ( _configuration.doDisplayOption( Configuration.show_binary_characters ) ) {
addCheckbox( Configuration.show_binary_characters,
_configuration.getDisplayTitle( Configuration.show_binary_characters ) );
setCheckbox( Configuration.show_domain_architectures,
_configuration.doCheckOption( Configuration.show_domain_architectures ) );
}
- if ( _configuration.doDisplayOption( Configuration.write_confidence_values ) ) {
- addCheckbox( Configuration.write_confidence_values,
- _configuration.getDisplayTitle( Configuration.write_confidence_values ) );
- setCheckbox( Configuration.write_confidence_values,
- _configuration.doCheckOption( Configuration.write_confidence_values ) );
+ if ( _configuration.doDisplayOption( Configuration.show_mol_seqs ) ) {
+ addCheckbox( Configuration.show_mol_seqs, _configuration.getDisplayTitle( Configuration.show_mol_seqs ) );
+ setCheckbox( Configuration.show_mol_seqs, _configuration.doCheckOption( Configuration.show_mol_seqs ) );
}
if ( _configuration.doDisplayOption( Configuration.write_events ) ) {
addCheckbox( Configuration.write_events, _configuration.getDisplayTitle( Configuration.write_events ) );
if ( getMainPanel().getMainFrame()._label_direction_cbmi != null ) {
getMainPanel().getMainFrame()._label_direction_cbmi.setVisible( true );
}
- if ( getMainPanel().getMainFrame()._show_branch_length_values_cbmi != null ) {
- getMainPanel().getMainFrame()._show_branch_length_values_cbmi.setVisible( false );
- }
}
else {
if ( getMainPanel().getMainFrame()._label_direction_cbmi != null ) {
getMainPanel().getMainFrame()._label_direction_cbmi.setVisible( false );
}
- if ( getMainPanel().getMainFrame()._show_branch_length_values_cbmi != null ) {
- getMainPanel().getMainFrame()._show_branch_length_values_cbmi.setVisible( true );
- }
}
}
}
CHANGE_NODE_FONT,
COLOR_NODE_FONT;
}
-
- public boolean isShowMolSequences() {
- // TODO Auto-generated method stub
- return true;
- }
}
static final String SEARCH_TERMS_ONLY_LABEL = "Match Complete Terms Only";\r
static final String SEARCH_CASE_SENSITIVE_LABEL = "Case Sensitive";\r
static final String INVERSE_SEARCH_RESULT_LABEL = "Negate Result";\r
- static final String DISPLAY_BRANCH_LENGTH_VALUES_LABEL = "Branch Length Values";\r
static final String COLOR_BY_TAXONOMIC_GROUP = "Colorize by Taxonomic Group";\r
static final String DISPLAY_SCALE_LABEL = "Scale";\r
static final String NON_LINED_UP_CLADOGRAMS_LABEL = "Non-Lined Up Cladograms";\r
JRadioButtonMenuItem _non_lined_up_cladograms_rbmi;\r
JRadioButtonMenuItem _uniform_cladograms_rbmi;\r
JRadioButtonMenuItem _ext_node_dependent_cladogram_rbmi;\r
- JCheckBoxMenuItem _show_branch_length_values_cbmi;\r
JCheckBoxMenuItem _color_by_taxonomic_group_cbmi;\r
JCheckBoxMenuItem _show_scale_cbmi; //TODO fix me\r
JCheckBoxMenuItem _show_overview_cbmi;\r
else if ( o == _show_scale_cbmi ) {\r
updateOptions( getOptions() );\r
}\r
- else if ( o == _show_branch_length_values_cbmi ) {\r
- updateOptions( getOptions() );\r
- }\r
else if ( o == _color_by_taxonomic_group_cbmi ) {\r
updateOptions( getOptions() );\r
}\r
options.setShowOverview( ( _show_overview_cbmi != null ) && _show_overview_cbmi.isSelected() );\r
options.setShowConfidenceStddev( ( _show_confidence_stddev_cbmi != null )\r
&& _show_confidence_stddev_cbmi.isSelected() );\r
- if ( ( _show_branch_length_values_cbmi != null ) && _show_branch_length_values_cbmi.isEnabled() ) {\r
- options.setShowBranchLengthValues( _show_branch_length_values_cbmi.isSelected() );\r
- }\r
if ( ( _color_by_taxonomic_group_cbmi != null ) && _color_by_taxonomic_group_cbmi.isEnabled() ) {\r
options.setColorByTaxonomicGroup( _color_by_taxonomic_group_cbmi.isSelected() );\r
}\r
_options_jmenu.add( _show_overview_cbmi = new JCheckBoxMenuItem( MainFrame.SHOW_OVERVIEW_LABEL ) );
_options_jmenu.add( _show_scale_cbmi = new JCheckBoxMenuItem( MainFrame.DISPLAY_SCALE_LABEL ) );
_options_jmenu
- .add( _show_branch_length_values_cbmi = new JCheckBoxMenuItem( MainFrame.DISPLAY_BRANCH_LENGTH_VALUES_LABEL ) );
- _options_jmenu
.add( _show_default_node_shapes_internal_cbmi = new JCheckBoxMenuItem( MainFrame.DISPLAY_NODE_BOXES_LABEL_INT ) );
_options_jmenu
.add( _show_default_node_shapes_external_cbmi = new JCheckBoxMenuItem( MainFrame.DISPLAY_NODE_BOXES_LABEL_EXT ) );
getOptions().getCladogramType() == CLADOGRAM_TYPE.TOTAL_NODE_SUM_DEP );
customizeRadioButtonMenuItem( _ext_node_dependent_cladogram_rbmi,
getOptions().getCladogramType() == CLADOGRAM_TYPE.EXT_NODE_SUM_DEP );
- customizeCheckBoxMenuItem( _show_branch_length_values_cbmi, getOptions().isShowBranchLengthValues() );
customizeCheckBoxMenuItem( _show_overview_cbmi, getOptions().isShowOverview() );
customizeCheckBoxMenuItem( _label_direction_cbmi,
getOptions().getNodeLabelDirection() == NODE_LABEL_DIRECTION.RADIAL );
_options_jmenu.add( _show_overview_cbmi = new JCheckBoxMenuItem( SHOW_OVERVIEW_LABEL ) );\r
_options_jmenu.add( _show_scale_cbmi = new JCheckBoxMenuItem( DISPLAY_SCALE_LABEL ) );\r
_options_jmenu\r
- .add( _show_branch_length_values_cbmi = new JCheckBoxMenuItem( DISPLAY_BRANCH_LENGTH_VALUES_LABEL ) );\r
- _options_jmenu\r
.add( _show_default_node_shapes_internal_cbmi = new JCheckBoxMenuItem( DISPLAY_NODE_BOXES_LABEL_INT ) );\r
_options_jmenu\r
.add( _show_default_node_shapes_external_cbmi = new JCheckBoxMenuItem( DISPLAY_NODE_BOXES_LABEL_EXT ) );\r
getOptions().getCladogramType() == CLADOGRAM_TYPE.TOTAL_NODE_SUM_DEP );\r
customizeRadioButtonMenuItem( _ext_node_dependent_cladogram_rbmi,\r
getOptions().getCladogramType() == CLADOGRAM_TYPE.EXT_NODE_SUM_DEP );\r
- customizeCheckBoxMenuItem( _show_branch_length_values_cbmi, getOptions().isShowBranchLengthValues() );\r
customizeCheckBoxMenuItem( _show_overview_cbmi, getOptions().isShowOverview() );\r
customizeCheckBoxMenuItem( _label_direction_cbmi,\r
getOptions().getNodeLabelDirection() == NODE_LABEL_DIRECTION.RADIAL );\r
private double _scale_bar_length;
private boolean _search_case_sensitive;
private boolean _show_annotation_ref_source;
- private boolean _show_branch_length_values;
private boolean _show_confidence_stddev;
private boolean _show_default_node_shapes_external;
private boolean _show_default_node_shapes_internal;
return _search_case_sensitive;
}
- final boolean isShowBranchLengthValues() {
- return _show_branch_length_values;
- }
-
boolean isShowConfidenceStddev() {
return _show_confidence_stddev;
}
_search_case_sensitive = search_case_sensitive;
}
- final void setShowBranchLengthValues( final boolean show_branch_length_values ) {
- _show_branch_length_values = show_branch_length_values;
- }
-
void setShowConfidenceStddev( final boolean show_confidence_stddev ) {
_show_confidence_stddev = show_confidence_stddev;
}
_default_node_shape = NodeShape.CIRCLE;
_default_node_fill = NodeFill.GRADIENT;
_default_node_shape_size = Constants.DEFAULT_NODE_SHAPE_SIZE_DEFAULT;
- _show_branch_length_values = false;
_internal_number_are_confidence_for_nh_parsing = false;
_show_scale = false;
_antialias_screen = true;
if ( configuration != null ) {
instance.setAntialiasScreen( configuration.isAntialiasScreen() );
instance.setShowScale( configuration.isShowScale() );
- instance.setShowBranchLengthValues( configuration.isShowBranchLengthValues() );
instance.setShowOverview( configuration.isShowOverview() );
instance.setColorByTaxonomicGroup( configuration.isColorByTaxonomicGroup() );
instance.setCladogramType( configuration.getCladogramType() );
if ( isNodeDataInvisible( node ) && !to_graphics_file && !to_pdf ) {
return 0;
}
- if ( getOptions().isShowBranchLengthValues()
+ if ( getControlPanel().isWriteBranchLengthValues()
&& ( ( getPhylogenyGraphicsType() == PHYLOGENY_GRAPHICS_TYPE.RECTANGULAR )
|| ( getPhylogenyGraphicsType() == PHYLOGENY_GRAPHICS_TYPE.ROUNDED ) || ( getPhylogenyGraphicsType() == PHYLOGENY_GRAPHICS_TYPE.EURO_STYLE ) )
&& ( !node.isRoot() ) && ( node.getDistanceToParent() != PhylogenyDataUtil.BRANCH_LENGTH_DEFAULT ) ) {
final int h = y < default_height ? ForesterUtil.roundToInt( y ) : default_height;
rs.setRenderingHeight( h > 1 ? h : 2 );
if ( getControlPanel().isDrawPhylogram() ) {
-
- rs.render( ( float ) ( ( getMaxDistanceToRoot() * getXcorrectionFactor() ) + _length_of_longest_text ),
- node.getYcoord() - ( h / 2 ),
- g,
- this,
- to_pdf );
-
-
+ rs.render( ( float ) ( ( getMaxDistanceToRoot() * getXcorrectionFactor() ) + _length_of_longest_text ),
+ node.getYcoord() - ( h / 2 ),
+ g,
+ this,
+ to_pdf );
}
else {
rs.render( getPhylogeny().getFirstExternalNode().getXcoord() + _length_of_longest_text,
import org.forester.archaeopteryx.TreePanel;
import org.forester.phylogeny.data.DomainArchitecture;
import org.forester.phylogeny.data.PhylogenyData;
-import org.forester.phylogeny.data.PhylogenyDataUtil;
import org.forester.phylogeny.data.ProteinDomain;
import org.forester.util.ForesterUtil;
private final DomainArchitecture _domain_structure;
private int _e_value_threshold_exp = E_VALUE_THRESHOLD_EXP_DEFAULT;
private final Rectangle2D _rectangle = new Rectangle2D.Float();
- private float _rendering_factor_width = 1;
- private float _rendering_height = 0;
+ private float _rendering_factor_width = 1;
+ private float _rendering_height = 0;
public RenderableDomainArchitecture( final DomainArchitecture domain_structure ) {
_domain_structure = domain_structure;
else {
g.setColor( Constants.DOMAIN_LABEL_COLOR_FOR_PDF );
}
- g.drawString( d.getName(),
- xa,
- y1
- + tree_panel.getMainPanel().getTreeFontSet().getFontMetricsSmall().getAscent()
- + _rendering_height );
-
-
+ g.drawString( d.getName(), xa, y1
+ + tree_panel.getMainPanel().getTreeFontSet().getFontMetricsSmall().getAscent()
+ + _rendering_height );
}
drawDomain( xa, y1, xb - xa, _rendering_height, d.getName(), g, to_pdf );
}
final Phylogeny phy = nj.execute( m );
PhylogenyMethods.addMolecularSeqsToTree( phy, msa );
PhylogenyMethods.extractFastaInformation( phy );
-
return phy;
}
org.forester.util.ForesterUtil.roundToInt( y2 ) );
}
-
-
public static String replaceIllegalXmlCharacters( final String value ) {
String v = value.replaceAll( "&", "&" );
v = v.replaceAll( "<", "<" );