in progress
authorcmzmasek@gmail.com <cmzmasek@gmail.com@ca865154-3058-d1c3-3e42-d8f55a55bdbd>
Sat, 14 Jul 2012 02:29:05 +0000 (02:29 +0000)
committercmzmasek@gmail.com <cmzmasek@gmail.com@ca865154-3058-d1c3-3e42-d8f55a55bdbd>
Sat, 14 Jul 2012 02:29:05 +0000 (02:29 +0000)
forester/java/src/org/forester/application/msa_compactor.java
forester/java/src/org/forester/application/surfacing.java
forester/java/src/org/forester/msa/MsaCompactor.java
forester/java/src/org/forester/surfacing/SurfacingUtil.java

index 7457b3e..5f01408 100644 (file)
@@ -26,7 +26,7 @@ public class msa_compactor {
     final static private String PRG_NAME                      = "msa_compactor";
     final static private String PRG_DESC                      = "multiple sequnce aligment compactor";
     final static private String PRG_VERSION                   = "0.90";
-    final static private String PRG_DATE                      = "2012.07.11";
+    final static private String PRG_DATE                      = "2012.07.13";
     final static private String E_MAIL                        = "phylosoft@gmail.com";
     final static private String WWW                           = "www.phylosoft.org/forester/";
 
index 692b699..f89d248 100644 (file)
@@ -235,8 +235,8 @@ public class surfacing {
     final static private String                               INPUT_SPECIES_TREE_OPTION                                                     = "species_tree";
     final static private String                               SEQ_EXTRACT_OPTION                                                            = "prot_extract";
     final static private char                                 SEPARATOR_FOR_INPUT_VALUES                                                    = '#';
-    final static private String                               PRG_VERSION                                                                   = "2.250";
-    final static private String                               PRG_DATE                                                                      = "2012.05.07";
+    final static private String                               PRG_VERSION                                                                   = "2.251";
+    final static private String                               PRG_DATE                                                                      = "2012.07.13";
     final static private String                               E_MAIL                                                                        = "czmasek@burnham.org";
     final static private String                               WWW                                                                           = "www.phylosoft.org/forester/applications/surfacing";
     final static private boolean                              IGNORE_DUFS_DEFAULT                                                           = true;
index 469fa31..90b2ccc 100644 (file)
@@ -140,12 +140,13 @@ public class MsaCompactor {
     }
 
     final private void write( final File outfile, final double gr ) throws IOException {
-        writeMsa( outfile + "_" + _msa.getNumberOfSequences() + "_" + _msa.getLength() + "_" + gr + ".aln" );
+        writeMsa( outfile + "_" + _msa.getNumberOfSequences() + "_" + _msa.getLength() + "_"
+                + ForesterUtil.roundToInt( gr * 100 ) + ".aln" );
     }
 
     final private void writeMsa( final String outfile ) throws IOException {
         final Writer w = ForesterUtil.createBufferedWriter( outfile );
-        _msa.write( w, MSA_FORMAT.PHYLIP );
+        _msa.write( w, MSA_FORMAT.FASTA );
         w.close();
     }
 
index a457f2c..1a0a07d 100644 (file)
@@ -1192,16 +1192,30 @@ public final class SurfacingUtil {
                         || protein.getSpecies().getSpeciesId().equalsIgnoreCase( limit_to_species ) ) {
                     final List<Domain> domains = protein.getProteinDomains( domain_id );
                     if ( domains.size() > 0 ) {
-                        final DescriptiveStatistics stats = new BasicDescriptiveStatistics();
-                        for( final Domain domain : domains ) {
-                            stats.addValue( domain.getPerSequenceEvalue() );
-                        }
                         out.write( protein.getSpecies().getSpeciesId() );
                         out.write( separator );
                         out.write( protein.getProteinId().getId() );
                         out.write( separator );
-                        out.write( "[" + FORMATTER.format( stats.median() ) + "]" );
+                        out.write( domain_id.toString() );
+                        out.write( separator );
+                        for( final Domain domain : domains ) {
+                            out.write( "/" );
+                            out.write( domain.getFrom() + "-" + domain.getTo() );
+                        }
+                        out.write( "/" );
                         out.write( separator );
+                        out.write( "{" );
+                        boolean first = true;
+                        for( final Domain domain : protein.getProteinDomains() ) {
+                            if ( first ) {
+                                first = false;
+                            }
+                            else {
+                                out.write( "," );
+                            }
+                            out.write( domain.getDomainId().toString() );
+                        }
+                        out.write( "}" );
                         if ( !( ForesterUtil.isEmpty( protein.getDescription() ) || protein.getDescription()
                                 .equals( SurfacingConstants.NONE ) ) ) {
                             out.write( protein.getDescription() );