inprogress
[jalview.git] / forester / java / src / org / forester / surfacing / DomainCountsDifferenceUtil.java
index 6996ef3..20a25d4 100644 (file)
@@ -23,7 +23,7 @@
 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
 //
 // Contact: phylosoft @ gmail . com
-// WWW: www.phylosoft.org/forester
+// WWW: https://sites.google.com/site/cmzmasek/home/software/forester
 
 package org.forester.surfacing;
 
@@ -44,8 +44,13 @@ import java.util.SortedSet;
 import java.util.TreeMap;
 import java.util.TreeSet;
 
+import org.forester.application.surfacing;
 import org.forester.go.GoId;
 import org.forester.go.GoTerm;
+import org.forester.protein.BinaryDomainCombination;
+import org.forester.protein.DomainId;
+import org.forester.protein.Protein;
+import org.forester.species.Species;
 import org.forester.util.BasicDescriptiveStatistics;
 import org.forester.util.DescriptiveStatistics;
 import org.forester.util.ForesterUtil;
@@ -551,7 +556,7 @@ public final class DomainCountsDifferenceUtil {
         for( final BinaryDomainCombination bdc : all_bdcs ) {
             if ( ( high_copy_base_values.get( bdc ) > 0 ) && ( high_copy_target_values.get( bdc ) > 0 )
                     && ( high_copy_base_values.get( bdc ) >= low_copy_values.get( bdc ) ) ) {
-                if ( high_copy_target_values.get( bdc ) >= min_diff + ( factor * low_copy_values.get( bdc ) ) ) {
+                if ( high_copy_target_values.get( bdc ) >= ( min_diff + ( factor * low_copy_values.get( bdc ) ) ) ) {
                     if ( low_copy_values.get( bdc ) <= 0.0 ) {
                         ++total_absense_counter;
                     }
@@ -675,8 +680,8 @@ public final class DomainCountsDifferenceUtil {
         for( final DomainId domain_id : all_domains ) {
             if ( ( high_copy_base_values.get( domain_id ) > 0 ) && ( high_copy_target_values.get( domain_id ) > 0 )
                     && ( high_copy_base_values.get( domain_id ) >= low_copy_values.get( domain_id ) ) ) {
-                if ( high_copy_target_values.get( domain_id ) >= min_diff
-                        + ( factor * low_copy_values.get( domain_id ) ) ) {
+                if ( high_copy_target_values.get( domain_id ) >= ( min_diff + ( factor * low_copy_values
+                        .get( domain_id ) ) ) ) {
                     if ( low_copy_values.get( domain_id ) <= 0.0 ) {
                         ++total_absense_counter;
                     }
@@ -820,7 +825,12 @@ public final class DomainCountsDifferenceUtil {
                 + domain_id + PLUS_MINUS_PROTEINS_FILE_DOM_SUFFIX );
         SurfacingUtil.checkForOutputFileWriteability( my_proteins_file );
         final Writer proteins_file_writer = new BufferedWriter( new FileWriter( my_proteins_file ) );
-        SurfacingUtil.extractProteinNames( protein_lists_per_species, domain_id, proteins_file_writer, "\t" );
+        SurfacingUtil.extractProteinNames( protein_lists_per_species,
+                                           domain_id,
+                                           proteins_file_writer,
+                                           "\t",
+                                           surfacing.LIMIT_SPEC_FOR_PROT_EX,
+                                           -1 );
         proteins_file_writer.close();
         System.out.println( "Wrote proteins list to \"" + my_proteins_file + "\"" );
     }