final static String clickto_options[][] = {
{ "Display Node Data", "display" }, { "Collapse/Uncollapse", "display" }, { "Root/Reroot", "display" },
- { "Sub/Super Tree", "display" }, { "Swap Descendants", "display" }, { "Colorize Subtree(s)", "display" },
- { "Colorize Node Font", "display" }, { "Open Sequence DB", "display" }, { "Open PDB", "display" },
- { "Open Taxonomy DB", "display" }, { "Blast", "display" }, { "Cut Subtree", "display" },
+ { "Go to Sub-/Super-Tree", "display" }, { "Swap Descendants", "display" },
+ { "Colorize Node(s)", "display" }, { "Change Node Font(s)", "display" },
+ { "Colorize Subtree(s)", "display" }, { "Open Sequence DB", "display" }, { "Open PDB", "display" },
+ { "Open Taxonomy DB", "display" }, { "Launch BLAST", "display" }, { "Cut Subtree", "display" },
{ "Copy Subtree", "display" }, { "Paste Subtree", "display" }, { "Delete Subtree/Node", "display" },
{ "Add New Node", "display" }, { "Edit Node Data", "display" }, { "Sort Descendants", "display" },
{ "Return", "display" }, { "Select Node(s)", "display" } };
final static int reroot = 2;
final static int subtree = 3;
final static int swap = 4;
- final static int color_subtree = 5;
- final static int color_node_font = 6;
- final static int open_seq_web = 7;
- final static int open_pdb_web = 8;
- final static int open_tax_web = 9;
- final static int blast = 10;
- final static int cut_subtree = 11;
- final static int copy_subtree = 12;
- final static int paste_subtree = 13;
- final static int delete_subtree_or_node = 14;
- final static int add_new_node = 15;
- final static int edit_node_data = 16;
- final static int sort_descendents = 17;
- final static int get_ext_desc_data = 18;
- final static int select_nodes = 19;
+ final static int color_node_font = 5;
+ final static int change_node_font = 6;
+ final static int color_subtree = 7;
+ final static int open_seq_web = 8;
+ final static int open_pdb_web = 9;
+ final static int open_tax_web = 10;
+ final static int blast = 11;
+ final static int cut_subtree = 12;
+ final static int copy_subtree = 13;
+ final static int paste_subtree = 14;
+ final static int delete_subtree_or_node = 15;
+ final static int add_new_node = 16;
+ final static int edit_node_data = 17;
+ final static int sort_descendents = 18;
+ final static int get_ext_desc_data = 19;
+ final static int select_nodes = 20;
// ------------------
// Click-to options
// ------------------
final static String display_options[][] = {
{ "Phylogram", "display", "?" }, { "Node Name", "display", "yes" }, { "Taxonomy Code", "display", "yes" },
- { "Seq Annotations", "nodisplay", "no" }, { "Confidence Values", "display", "?" },
+ { "Seq Annotations", "display", "no" }, { "Confidence Values", "display", "?" },
{ "Node Events", "display", "?" }, { "Colorize by Taxonomy", "display", "no" },
- { "Use Branch Colors", "display", "no" }, { "Use Branch Widths", "display", "no" },
- { "Show Custom Nodes", "display", "yes" }, { "Protein Domains", "nodisplay", "no" },
+ { "Colorize by Sequence", "display", "no" }, { "Visual Styles/Branch Colors", "display", "no" },
+ { "Branch Widths", "display", "no" }, { "Protein Domains", "display", "no" },
{ "Binary Characters", "nodisplay", "no" }, { "Binary Char Counts", "nodisplay", "no" },
{ "Seq Name", "display", "yes" }, { "Seq Accession", "display", "no" },
{ "Show Internal Data", "display", "yes" }, { "Dyna Hide", "display", "yes" },
{ "Taxonomy Scientific", "display", "yes" }, { "Taxonomy Common", "display", "no" },
- { "Colorize by Annotation", "nodisplay", "no" }, { "Seq Symbol", "display", "yes" },
+ { "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", "nodisplay", "no" }, { "Gene Name", "display", "yes" } };
+ { "Properties", "display", "no" }, { "Gene Name", "display", "yes" } };
final static int display_as_phylogram = 0;
final static int show_node_names = 1;
final static int show_tax_code = 2;
final static int write_confidence_values = 4;
final static int write_events = 5;
final static int color_according_to_species = 6;
- final static int color_branches = 7;
- final static int width_branches = 8;
- final static int show_custom_node_shapes = 9;
+ final static int color_according_to_sequence = 7;
+ final static int use_style = 8;
+ final static int width_branches = 9;
final static int show_domain_architectures = 10;
final static int show_binary_characters = 11;
final static int show_binary_character_counts = 12;
final static int show_properties = 25;
final static int show_gene_names = 26;
static final String VALIDATE_AGAINST_PHYLOXML_XSD_SCHEMA = "validate_against_phyloxml_xsd_schema";
- // ----------------
- // Function colors
- // ----------------
+ private static Hashtable<String, Color> _sequence_colors;
private static Hashtable<String, Color> _annotation_colors;
- // ----------------
- // Domain colors
- // ----------------
private static Hashtable<String, Color> _domain_colors;
- // ----------------
- // Species colors
- // ----------------
private static Hashtable<String, Color> _species_colors;
private static String DEFAULT_FONT_FAMILY = "";
private static final int DEPRECATED = -2;
private UI _ui = UI.UNKNOWN;
private boolean _use_tabbed_display = false;
private boolean _validate_against_phyloxml_xsd_schema = Constants.VALIDATE_AGAINST_PHYLOXML_XSD_SCJEMA_DEFAULT;
+ private Color _vector_data_min_color = Color.BLUE;
+ private Color _vector_data_max_color = Color.YELLOW;
+ private Color _vector_data_mean_color = Color.WHITE;
+ private double _vector_data_height = 12;
+ private int _vector_data_width = 120;
static {
for( final String font_name : Constants.DEFAULT_FONT_CHOICES ) {
if ( Arrays.binarySearch( AptxUtil.getAvailableFontFamiliesSorted(), font_name ) >= 0 ) {
return _path_to_local_fastme;
}
- public File getpathToLocalMafft() {
+ public File getPathToLocalMafft() {
return _path_to_local_mafft;
}
getDisplayColors().put( key, color );
}
+ public void setAddTaxonomyImagesCB( final boolean b ) {
+ display_options[ show_taxonomy_images ][ 1 ] = b ? "yes" : "no";
+ }
+
public void setAbbreviateScientificTaxonNames( final boolean abbreviate_scientific_names ) {
_abbreviate_scientific_names = abbreviate_scientific_names;
}
}
public void setColorizeBranches( final boolean b ) {
- display_options[ color_branches ][ 2 ] = b ? "yes" : "no";
+ display_options[ use_style ][ 2 ] = b ? "yes" : "no";
}
public void setColorLabelsSameAsParentBranch( final boolean color_labels_same_as_parent_branch ) {
display_options[ display_as_phylogram ][ 2 ] = b ? "yes" : "no";
}
+ public void setUseStyle( final boolean b ) {
+ display_options[ use_style ][ 2 ] = b ? "yes" : "no";
+ }
+
public void setDisplayColors( final SortedMap<String, Color> display_colors ) {
_display_colors = display_colors;
}
display_options[ show_seq_names ][ 2 ] = b ? "yes" : "no";
}
+ public void setDisplayGeneNames( final boolean b ) {
+ display_options[ show_gene_names ][ 2 ] = b ? "yes" : "no";
+ }
+
public void setDisplaySequenceRelations( final boolean display_sequence_relations ) {
_display_sequence_relations = display_sequence_relations;
}
_show_scale = show_scale;
}
- public void setTaxonomyColorize( final boolean b ) {
- display_options[ color_according_to_species ][ 2 ] = b ? "yes" : "no";
- }
-
- public void setUseBranchesWidths( final boolean b ) {
- display_options[ width_branches ][ 2 ] = b ? "yes" : "no";
- }
-
boolean displaySequenceRelations() {
return _display_sequence_relations;
}
return _species_colors;
}
+ Hashtable<String, Color> getSequenceColors() {
+ if ( _sequence_colors == null ) {
+ _sequence_colors = new Hashtable<String, Color>();
+ }
+ return _sequence_colors;
+ }
+
final TAXONOMY_EXTRACTION getTaxonomyExtraction() {
return _taxonomy_extraction;
}
else if ( name.equals( "color_subtree" ) ) {
index = Configuration.color_subtree;
}
+ else if ( name.equals( "change_node_font" ) ) {
+ index = Configuration.change_node_font;
+ }
+ else if ( name.equals( "color_node_font" ) ) {
+ index = Configuration.color_node_font;
+ }
+ else if ( name.equals( "color_subtree" ) ) {
+ index = Configuration.color_subtree;
+ }
return index;
}
+ "] 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_max_color" ) ) {
+ _vector_data_max_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_width = 120;
+ }
+ }
+ else if ( key.equals( "vector_data_height" ) ) {
+ _vector_data_height = parseShort( ( String ) st.nextElement() );
+ if ( _vector_data_height < 1 ) {
+ _vector_data_height = 12;
+ }
+ }
+ //
else if ( st.countTokens() >= 2 ) { // counts the tokens that are not
// yet retrieved!
int key_index = -1;
else if ( key.equals( "color_according_to_species" ) ) {
key_index = Configuration.color_according_to_species;
}
+ else if ( key.equals( "color_according_to_sequence" ) ) {
+ key_index = Configuration.color_according_to_sequence;
+ }
else if ( key.equals( "show_node_names" ) ) {
key_index = Configuration.show_node_names;
}
else if ( key.equals( "write_events" ) ) {
key_index = Configuration.write_events;
}
+ else if ( key.equals( "use_visual_styles" ) ) {
+ key_index = Configuration.use_style;
+ }
else if ( key.equals( "color_branches" ) ) {
- key_index = Configuration.color_branches;
+ key_index = Configuration.use_style;
+ ForesterUtil
+ .printWarningMessage( Constants.PRG_NAME,
+ "configuration key [color_branches] is deprecated, use [use_visual_styles] instead" );
}
else if ( key.equals( "width_branches" ) ) {
key_index = Configuration.width_branches;
else if ( key.equals( "show_relation_confidence" ) ) {
key_index = Configuration.show_relation_confidence;
}
- else if ( key.equals( "show_custom_node_shapes" ) ) {
- key_index = Configuration.show_custom_node_shapes;
- }
// If we've found the key, set the values
if ( key_index >= 0 ) {
display_options[ key_index ][ 1 ] = ( String ) st.nextElement();
getSpeciesColors().put( ( ( String ) st.nextElement() ).replace( '_', ' ' ),
Color.decode( ( String ) st.nextElement() ) );
}
+ else if ( key.equals( "sequence_color" ) ) {
+ getSequenceColors().put( ( ( String ) st.nextElement() ).replace( '_', ' ' ),
+ Color.decode( ( String ) st.nextElement() ) );
+ }
else if ( key.equals( "domain_color" ) ) {
getDomainColors().put( ( String ) st.nextElement(), Color.decode( ( String ) st.nextElement() ) );
}
static enum TRIPLET {
FALSE, TRUE, UNKNOWN
}
+
+ public Color getVectorDataMinColor() {
+ return _vector_data_min_color;
+ }
+
+ public Color getVectorDataMaxColor() {
+ return _vector_data_max_color;
+ }
+
+ public Color getVectorDataMeanColor() {
+ return _vector_data_mean_color;
+ }
+
+ public double getVectorDataHeight() {
+ return _vector_data_height;
+ }
+
+ public int getVectorDataWidth() {
+ return _vector_data_width;
+ }
}