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;
}
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;
}
package org.forester.msa_compactor;
+import java.awt.Color;
import java.io.File;
import java.io.IOException;
import java.io.Writer;
import org.forester.msa.ResampleableMsa;
import org.forester.phylogeny.Phylogeny;
import org.forester.phylogeny.PhylogenyMethods;
+import org.forester.phylogeny.PhylogenyMethods.DESCENDANT_SORT_PRIORITY;
import org.forester.phylogeny.PhylogenyNode;
+import org.forester.phylogeny.data.NodeVisualData;
+import org.forester.phylogeny.data.NodeVisualData.NodeFill;
+import org.forester.phylogeny.data.NodeVisualData.NodeShape;
import org.forester.phylogeny.iterators.PhylogenyNodeIterator;
import org.forester.sequence.Sequence;
import org.forester.tools.ConfidenceAssessor;
for( final GapContribution gap_gontribution : stats ) {
to_remove_ids.add( gap_gontribution.getId() );
}
- if ( _phylogentic_inference ) {
- System.out.println( "calculating phylegentic tree..." );
- System.out.println();
- pi();
- }
if ( !_realign ) {
_step = -1;
}
- printTableHeader();
int x = ForesterUtil.roundToInt( _msa.getNumberOfSequences() / 20.0 );
if ( x < 1 ) {
x = 1;
}
MsaProperties msa_prop = new MsaProperties( _msa, _report_aln_mean_identity );
msa_props.add( msa_prop );
+ if ( _phylogentic_inference ) {
+ System.out.println( "calculating phylogentic tree..." );
+ System.out.println();
+ pi( to_remove_ids );
+ }
+ printTableHeader();
printMsaProperties( "", msa_prop );
System.out.println();
int i = 0;
return master_phy;
}
- private final Phylogeny pi() {
+ private final Phylogeny pi( final List<String> to_remove_ids ) {
final Phylogeny phy = inferNJphylogeny( PWD_DISTANCE_METHOD.KIMURA_DISTANCE, _msa, false, "" );
+ for( int i = 0; i < to_remove_ids.size(); ++i ) {
+ final String id = to_remove_ids.get( i );
+ final PhylogenyNode n = phy.getNode( id );
+ n.setName( n.getName() + " [" + ( i + 1 ) + "]" );
+ final NodeVisualData vis = new NodeVisualData();
+ vis.setFillType( NodeFill.SOLID );
+ vis.setShape( NodeShape.RECTANGLE );
+ vis.setSize( 6 );
+ vis.setNodeColor( new Color( i > 255 ? 0 : 255 - i, 0, 0 ) );
+ n.getNodeData().setNodeVisualData( vis );
+ }
PhylogenyMethods.midpointRoot( phy );
+ PhylogenyMethods.orderAppearance( phy.getRoot(), true, true, DESCENDANT_SORT_PRIORITY.NODE_NAME );
final boolean x = PhylogenyMethods.extractFastaInformation( phy );
if ( !x ) {
final PhylogenyNodeIterator it = phy.iteratorExternalForward();
}
final Configuration config = new Configuration();
config.setDisplayAsPhylogram( true );
+ config.setUseStyle( true );
+ config.setDisplayTaxonomyCode( false );
+ config.setDisplayTaxonomyCommonNames( false );
+ config.setDisplayTaxonomyScientificNames( false );
+ config.setDisplaySequenceNames( false );
+ config.setDisplaySequenceSymbols( false );
+ config.setDisplayGeneNames( false );
+ config.setShowScale( true );
+ config.setAddTaxonomyImagesCB( false );
+ config.setBaseFontSize( 9 );
+ config.setBaseFontFamilyName( "Arial" );
Archaeopteryx.createApplication( phy, config, _infile_name );
return phy;
}