import org.forester.archaeopteryx.Options.NODE_LABEL_DIRECTION;
import org.forester.archaeopteryx.Options.PHYLOGENY_GRAPHICS_TYPE;
import org.forester.archaeopteryx.tools.AncestralTaxonomyInferrer;
-import org.forester.archaeopteryx.tools.GoAnnotation;
import org.forester.archaeopteryx.tools.InferenceManager;
import org.forester.archaeopteryx.tools.PhyloInferenceDialog;
import org.forester.archaeopteryx.tools.PhylogeneticInferenceOptions;
}
executeLineageInference();
}
- else if ( o == _function_analysis ) {
- executeFunctionAnalysis();
- }
else if ( o == _obtain_detailed_taxonomic_information_jmi ) {
if ( isSubtreeDisplayed() ) {
return;
}
collapseBelowThreshold();
}
- else if ( ( o == _extract_taxonomy_pfam_rbmi ) || ( o == _extract_taxonomy_yes_rbmi ) ) {
+ else if ( ( o == _extract_taxonomy_pfam_strict_rbmi ) || ( o == _extract_taxonomy_pfam_relaxed_rbmi )
+ || ( o == _extract_taxonomy_agressive_rbmi ) ) {
if ( _replace_underscores_cbmi != null ) {
_replace_underscores_cbmi.setSelected( false );
}
updateOptions( getOptions() );
}
+ else if ( o == _extract_taxonomy_no_rbmi ) {
+ updateOptions( getOptions() );
+ }
else if ( o == _inference_from_msa_item ) {
executePhyleneticInference( false );
}
if ( getConfiguration().doDisplayOption( Configuration.show_domain_architectures ) ) {
_options_jmenu.add( _show_domain_labels = new JCheckBoxMenuItem( SHOW_DOMAIN_LABELS_LABEL ) );
}
+ _options_jmenu.add( _show_annotation_ref_source = new JCheckBoxMenuItem( SHOW_ANN_REF_SOURCE_LABEL ) );
_options_jmenu.add( _choose_minimal_confidence_mi = new JMenuItem( "" ) );
_options_jmenu.add( _overview_placment_mi = new JMenuItem( "" ) );
_options_jmenu.add( _switch_colors_mi = new JMenuItem( "" ) );
//
_options_jmenu.add( _extract_taxonomy_no_rbmi = new JRadioButtonMenuItem( "No Taxonomy Extraction" ) );
_options_jmenu
- .add( _extract_taxonomy_pfam_rbmi = new JRadioButtonMenuItem( "Extract Taxonomy Codes from Pfam-style Node Names" ) );
- _extract_taxonomy_pfam_rbmi
- .setToolTipText( "To extract 5-letter taxonomy codes from node names in the form of \"BCL2_MOUSE/134-298\"" );
+ .add( _extract_taxonomy_pfam_strict_rbmi = new JRadioButtonMenuItem( "Extract Taxonomy Codes/Ids from Pfam-style Node Names" ) );
_options_jmenu
- .add( _extract_taxonomy_yes_rbmi = new JRadioButtonMenuItem( "Extract Taxonomy Codes from Node Names" ) );
- _extract_taxonomy_yes_rbmi
- .setToolTipText( "To extract 5-letter taxonomy codes from node names in the form of \"BCL2_MOUSE\" or \"BCL2_MOUSE B-cell lymphoma 2...\"" );
+ .add( _extract_taxonomy_pfam_relaxed_rbmi = new JRadioButtonMenuItem( "Extract Taxonomy Codes/Ids from Pfam-style like Node Names" ) );
+ _options_jmenu
+ .add( _extract_taxonomy_agressive_rbmi = new JRadioButtonMenuItem( "Extract Taxonomy Codes/Ids/Scientific Names from Node Names" ) );
+ _extract_taxonomy_pfam_strict_rbmi
+ .setToolTipText( "To extract taxonomy codes/ids from node names in the form of e.g. \"BCL2_MOUSE/123-304\" or \"BCL2_10090/123-304\"" );
+ _extract_taxonomy_pfam_relaxed_rbmi
+ .setToolTipText( "To extract taxonomy codes/ids from node names in the form of e.g. \"bax_MOUSE\" or \"bax_10090\"" );
+ _extract_taxonomy_agressive_rbmi
+ .setToolTipText( "To extract taxonomy codes/ids or scientific names from node names in the form of e.g. \"MOUSE\" or \"10090\" or \"xyz_Nematostella_vectensis\"" );
_radio_group_2 = new ButtonGroup();
_radio_group_2.add( _extract_taxonomy_no_rbmi );
- _radio_group_2.add( _extract_taxonomy_pfam_rbmi );
- _radio_group_2.add( _extract_taxonomy_yes_rbmi );
+ _radio_group_2.add( _extract_taxonomy_pfam_strict_rbmi );
+ _radio_group_2.add( _extract_taxonomy_pfam_relaxed_rbmi );
+ _radio_group_2.add( _extract_taxonomy_agressive_rbmi );
//
_options_jmenu.add( customizeMenuItemAsLabel( new JMenuItem( "Newick/Nexus Output:" ), getConfiguration() ) );
_options_jmenu
customizeCheckBoxMenuItem( _screen_antialias_cbmi, getOptions().isAntialiasScreen() );
customizeCheckBoxMenuItem( _background_gradient_cbmi, getOptions().isBackgroundColorGradient() );
customizeCheckBoxMenuItem( _show_domain_labels, getOptions().isShowDomainLabels() );
+ customizeCheckBoxMenuItem( _show_annotation_ref_source, getOptions().isShowAnnotationRefSource() );
customizeCheckBoxMenuItem( _abbreviate_scientific_names, getOptions().isAbbreviateScientificTaxonNames() );
customizeCheckBoxMenuItem( _search_case_senstive_cbmi, getOptions().isSearchCaseSensitive() );
customizeCheckBoxMenuItem( _show_scale_cbmi, getOptions().isShowScale() );
.isInternalNumberAreConfidenceForNhParsing() );
customizeRadioButtonMenuItem( _extract_taxonomy_no_rbmi,
getOptions().getTaxonomyExtraction() == TAXONOMY_EXTRACTION.NO );
- customizeRadioButtonMenuItem( _extract_taxonomy_yes_rbmi,
- getOptions().getTaxonomyExtraction() == TAXONOMY_EXTRACTION.PFAM_STYLE_RELAXED );
- customizeRadioButtonMenuItem( _extract_taxonomy_pfam_rbmi,
+ customizeRadioButtonMenuItem( _extract_taxonomy_pfam_strict_rbmi,
getOptions().getTaxonomyExtraction() == TAXONOMY_EXTRACTION.PFAM_STYLE_STRICT );
+ customizeRadioButtonMenuItem( _extract_taxonomy_pfam_relaxed_rbmi,
+ getOptions().getTaxonomyExtraction() == TAXONOMY_EXTRACTION.PFAM_STYLE_RELAXED );
+ customizeRadioButtonMenuItem( _extract_taxonomy_agressive_rbmi,
+ getOptions().getTaxonomyExtraction() == TAXONOMY_EXTRACTION.AGGRESSIVE );
customizeCheckBoxMenuItem( _replace_underscores_cbmi, getOptions().isReplaceUnderscoresInNhParsing() );
customizeCheckBoxMenuItem( _search_whole_words_only_cbmi, getOptions().isMatchWholeTermsOnly() );
customizeCheckBoxMenuItem( _inverse_search_result_cbmi, getOptions().isInverseSearchResult() );
customizeJMenuItem( _move_node_names_to_seq_names_jmi );
_move_node_names_to_seq_names_jmi.setToolTipText( "To interpret node names as sequence (protein, gene) names" );
_tools_menu.addSeparator();
+ _tools_menu.add( _obtain_seq_information_jmi = new JMenuItem( "Obtain Sequence Information" ) );
+ customizeJMenuItem( _obtain_seq_information_jmi );
+ _obtain_seq_information_jmi.setToolTipText( "To add additional sequence information" );
_tools_menu
.add( _obtain_detailed_taxonomic_information_jmi = new JMenuItem( OBTAIN_DETAILED_TAXONOMIC_INFORMATION ) );
customizeJMenuItem( _obtain_detailed_taxonomic_information_jmi );
customizeJMenuItem( _obtain_detailed_taxonomic_information_deleting_jmi );
_obtain_detailed_taxonomic_information_deleting_jmi
.setToolTipText( "To add additional taxonomic information, deletes nodes for which taxonomy cannot found (from UniProt Taxonomy)" );
- _tools_menu.add( _obtain_seq_information_jmi = new JMenuItem( "Obtain Sequence Information" ) );
- customizeJMenuItem( _obtain_seq_information_jmi );
- _obtain_seq_information_jmi.setToolTipText( "To add additional sequence information" );
_tools_menu.addSeparator();
- if ( !Constants.__RELEASE ) {
- _tools_menu.add( _function_analysis = new JMenuItem( "Add UniProtKB Annotations" ) );
- customizeJMenuItem( _function_analysis );
- _function_analysis
- .setToolTipText( "To add UniProtKB annotations for sequences with appropriate identifiers" );
- _tools_menu.addSeparator();
- }
_tools_menu.add( _read_values_jmi = new JMenuItem( "Attach Vector/Expression Values" ) );
customizeJMenuItem( _read_values_jmi );
_read_values_jmi.setToolTipText( "To attach vector (e.g. gene expression) values to tree nodes (beta)" );
exit();
}
- void executeFunctionAnalysis() {
- if ( ( _mainpanel.getCurrentPhylogeny() == null ) || ( _mainpanel.getCurrentPhylogeny().isEmpty() ) ) {
- return;
- }
- final GoAnnotation a = new GoAnnotation( this,
- _mainpanel.getCurrentTreePanel(),
- _mainpanel.getCurrentPhylogeny() );
- new Thread( a ).start();
- }
-
void executeLineageInference() {
if ( ( _mainpanel.getCurrentPhylogeny() == null ) || ( _mainpanel.getCurrentPhylogeny().isEmpty() ) ) {
return;
nodes = phy.getNodesViaSequenceSymbol( seq_name );
}
if ( nodes.isEmpty() ) {
+ nodes = phy.getNodesViaGeneName( seq_name );
+ }
+ if ( nodes.isEmpty() ) {
nodes = phy.getNodes( seq_name );
}
if ( nodes.size() > 1 ) {
final PhylogenyNode n = it.next();
final String name = n.getName().trim();
if ( !ForesterUtil.isEmpty( name ) ) {
- final String nt = ParserUtils
- .extractTaxonomyDataFromNodeName( n, TAXONOMY_EXTRACTION.PFAM_STYLE_RELAXED );
+ final String nt = ParserUtils.extractTaxonomyDataFromNodeName( n,
+ TAXONOMY_EXTRACTION.AGGRESSIVE );
if ( !ForesterUtil.isEmpty( nt ) ) {
if ( counter < 15 ) {
sb.append( name + ": " + nt + "\n" );