inprogress
authorcmzmasek@gmail.com <cmzmasek@gmail.com@ca865154-3058-d1c3-3e42-d8f55a55bdbd>
Fri, 25 Jan 2013 19:41:39 +0000 (19:41 +0000)
committercmzmasek@gmail.com <cmzmasek@gmail.com@ca865154-3058-d1c3-3e42-d8f55a55bdbd>
Fri, 25 Jan 2013 19:41:39 +0000 (19:41 +0000)
forester/java/src/org/forester/archaeopteryx/Configuration.java
forester/java/src/org/forester/archaeopteryx/Constants.java
forester/java/src/org/forester/archaeopteryx/ControlPanel.java
forester/java/src/org/forester/archaeopteryx/TreePanel.java
forester/java/src/org/forester/io/writers/SequenceWriter.java

index 5d354cc..c563795 100644 (file)
@@ -1448,6 +1448,9 @@ public final class Configuration {
             else if ( s.equalsIgnoreCase( "sequence_acc" ) ) {
                 setExtDescNodeDataToReturn( NODE_DATA.SEQUENCE_ACC );
             }
+            else if ( s.equalsIgnoreCase( "sequence_mol_seq_fasta" ) ) {
+                setExtDescNodeDataToReturn( NODE_DATA.SEQUENCE_MOL_SEQ_FASTA );
+            }
             else if ( s.equalsIgnoreCase( "sequence_mol_seq" ) ) {
                 setExtDescNodeDataToReturn( NODE_DATA.SEQUENCE_MOL_SEQ );
             }
index 258e926..874cf3d 100644 (file)
@@ -42,8 +42,8 @@ public final class Constants {
     public final static boolean __SYNTH_LF                                                    = false;                                                               // TODO remove me
     public final static boolean ALLOW_DDBJ_BLAST                                              = false;
     public final static String  PRG_NAME                                                      = "Archaeopteryx";
-    final static String         VERSION                                                       = "0.9800";
-    final static String         PRG_DATE                                                      = "130108";
+    final static String         VERSION                                                       = "0.9801";
+    final static String         PRG_DATE                                                      = "130125";
     final static String         DEFAULT_CONFIGURATION_FILE_NAME                               = "_aptx_configuration_file";
     final static String[]       DEFAULT_FONT_CHOICES                                          = { "Verdana", "Tahoma",
             "Arial", "Helvetica", "Dialog", "Lucida Sans", "SansSerif", "Sans-serif", "Sans" };
index 0703f63..8c80f0c 100644 (file)
@@ -1746,6 +1746,9 @@ final class ControlPanel extends JPanel implements ActionListener {
                     case SEQUENCE_MOL_SEQ:
                         s = "Molecular Sequence";
                         break;
+                    case SEQUENCE_MOL_SEQ_FASTA:
+                        s = "Molecular Sequence (Fasta)";
+                        break;
                     case SEQUENCE_NAME:
                         s = "Sequence Names";
                         break;
index 18128a0..8f8baa4 100644 (file)
@@ -3228,6 +3228,8 @@ public final class TreePanel extends JPanel implements ActionListener, MouseWhee
                 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:
@@ -5062,17 +5064,18 @@ public final class TreePanel extends JPanel implements ActionListener, MouseWhee
                     }
                     break;
                 case SEQUENCE_MOL_SEQ_FASTA:
-                    StringBuilder sb = new StringBuilder();
+                    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 )  );
+                            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 )  );
-                             
+                            sb.append( SequenceWriter.toFasta( n.getName(), n.getNodeData().getSequence()
+                                    .getMolecularSequence(), 60 ) );
                         }
-                        data.add( sb.toString() + "\n" );
+                        data.add( sb.toString() );
                     }
                     break;
                 case SEQUENCE_ACC:
index 0477cd2..b8e80d2 100644 (file)
@@ -38,7 +38,7 @@ public class SequenceWriter {
         }
         return sb;
     }
-    
+
     public static StringBuilder toFasta( final String name, final String mol_seq, final int width ) {
         final StringBuilder sb = new StringBuilder();
         sb.append( ">" );
@@ -49,7 +49,7 @@ public class SequenceWriter {
         }
         else {
             final int lines = mol_seq.length() / width;
-            final int rest =mol_seq.length() - ( lines * width );
+            final int rest = mol_seq.length() - ( lines * width );
             for( int i = 0; i < lines; ++i ) {
                 sb.append( mol_seq, i * width, width );
                 if ( i < ( lines - 1 ) ) {