import org.forester.archaeopteryx.tools.Blast;
import org.forester.archaeopteryx.tools.ImageLoader;
import org.forester.io.parsers.phyloxml.PhyloXmlUtil;
+import org.forester.io.writers.SequenceWriter;
import org.forester.phylogeny.Phylogeny;
import org.forester.phylogeny.PhylogenyMethods;
import org.forester.phylogeny.PhylogenyMethods.DESCENDANT_SORT_PRIORITY;
/**
* Set parameters for printing the displayed tree
*
- * @param x
- * @param y
*/
final void calcParametersForPainting( final int x, final int y, final boolean recalc_longest_ext_node_info ) {
// updateStyle(); not needed?
if ( getOptions().isAllowFontSizeChange() ) {
if ( ( getLongestExtNodeInfo() > ( x * 0.6 ) )
&& ( getTreeFontSet().getLargeFont().getSize() > 2 + TreeFontSet.FONT_SIZE_CHANGE_STEP ) ) {
- while ( ( getLongestExtNodeInfo() > ( x * 0.6 ) )
+ while ( ( getLongestExtNodeInfo() > ( x * 0.7 ) )
&& ( getTreeFontSet().getLargeFont().getSize() > 2 ) ) {
getMainPanel().getTreeFontSet().decreaseFontSize( getConfiguration().getMinBaseFontSize(),
true );
}
}
else {
- while ( ( getLongestExtNodeInfo() < ( x * 0.5 ) )
+ while ( ( getLongestExtNodeInfo() < ( x * 0.6 ) )
&& ( getTreeFontSet().getLargeFont().getSize() <= getTreeFontSet().getLargeFontMemory()
.getSize() - TreeFontSet.FONT_SIZE_CHANGE_STEP ) ) {
getMainPanel().getTreeFontSet().increaseFontSize();
return "Sequence Symbols";
case SEQUENCE_MOL_SEQ:
return "Molecular Sequences";
+ case SEQUENCE_MOL_SEQ_FASTA:
+ return "Molecular Sequences (Fasta)";
case SEQUENCE_ACC:
return "Sequence Accessors";
case TAXONOMY_SCIENTIFIC_NAME:
data.add( n.getNodeData().getSequence().getMolecularSequence() );
}
break;
+ case SEQUENCE_MOL_SEQ_FASTA:
+ final StringBuilder sb = new StringBuilder();
+ if ( n.getNodeData().isHasSequence()
+ && !ForesterUtil.isEmpty( n.getNodeData().getSequence().getMolecularSequence() ) ) {
+ if ( !ForesterUtil.isEmpty( n.getNodeData().getSequence().getName() ) ) {
+ sb.append( SequenceWriter.toFasta( n.getNodeData().getSequence().getName(), n.getNodeData()
+ .getSequence().getMolecularSequence(), 60 ) );
+ }
+ else {
+ sb.append( SequenceWriter.toFasta( n.getName(), n.getNodeData().getSequence()
+ .getMolecularSequence(), 60 ) );
+ }
+ data.add( sb.toString() );
+ }
+ break;
case SEQUENCE_ACC:
if ( n.getNodeData().isHasSequence() && ( n.getNodeData().getSequence().getAccession() != null )
&& !ForesterUtil.isEmpty( n.getNodeData().getSequence().getAccession().toString() ) ) {