From: cmzmasek Date: Mon, 21 May 2012 03:17:52 +0000 (+0000) Subject: in progress X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=eb07e696db878b45a4738f95e58eaef347d719c3;p=jalview.git in progress --- diff --git a/forester/java/src/org/forester/archaeopteryx/tools/PhylogeneticInferrer.java b/forester/java/src/org/forester/archaeopteryx/tools/PhylogeneticInferrer.java index 7e0ec77..4f17c69 100644 --- a/forester/java/src/org/forester/archaeopteryx/tools/PhylogeneticInferrer.java +++ b/forester/java/src/org/forester/archaeopteryx/tools/PhylogeneticInferrer.java @@ -64,7 +64,7 @@ public class PhylogeneticInferrer implements Runnable { private final MainFrameApplication _mf; private final PhylogeneticInferenceOptions _options; private final List _seqs; - private final boolean DEBUG = true; + private final boolean DEBUG = true; public final static String MSA_FILE_SUFFIX = ".aln"; public final static String PWD_FILE_SUFFIX = ".pwd"; @@ -89,9 +89,9 @@ public class PhylogeneticInferrer implements Runnable { private Msa inferMsa() throws IOException, InterruptedException { final File temp_seqs_file = File.createTempFile( "__msa__temp__", ".fasta" ); if ( DEBUG ) { - System.out.println(); - System.out.println( "temp file: " + temp_seqs_file ); - System.out.println(); + System.out.println(); + System.out.println( "temp file: " + temp_seqs_file ); + System.out.println(); } //final File temp_seqs_file = new File( _options.getTempDir() + ForesterUtil.FILE_SEPARATOR + "s.fasta" ); final BufferedWriter writer = new BufferedWriter( new FileWriter( temp_seqs_file ) ); @@ -170,7 +170,7 @@ public class PhylogeneticInferrer implements Runnable { "Failed to Calculate MSA", JOptionPane.ERROR_MESSAGE ); if ( DEBUG ) { - e.printStackTrace(); + e.printStackTrace(); } return; } @@ -183,7 +183,7 @@ public class PhylogeneticInferrer implements Runnable { "Unexpected Exception During MSA Calculation", JOptionPane.ERROR_MESSAGE ); if ( DEBUG ) { - e.printStackTrace(); + e.printStackTrace(); } return; } @@ -197,8 +197,8 @@ public class PhylogeneticInferrer implements Runnable { return; } if ( DEBUG ) { - System.out.println( msa.toString() ); - System.out.println( MsaMethods.calcBasicGapinessStatistics( msa ).toString() ); + System.out.println( msa.toString() ); + System.out.println( MsaMethods.calcBasicGapinessStatistics( msa ).toString() ); } final MsaMethods msa_tools = MsaMethods.createInstance(); if ( _options.isExecuteMsaProcessing() ) { @@ -216,9 +216,9 @@ public class PhylogeneticInferrer implements Runnable { } } if ( DEBUG ) { - System.out.println( msa_tools.getIgnoredSequenceIds() ); - System.out.println( msa.toString() ); - System.out.println( MsaMethods.calcBasicGapinessStatistics( msa ).toString() ); + System.out.println( msa_tools.getIgnoredSequenceIds() ); + System.out.println( msa.toString() ); + System.out.println( MsaMethods.calcBasicGapinessStatistics( msa ).toString() ); } _msa = msa; } diff --git a/forester/java/src/org/forester/archaeopteryx/tools/ProcessPool.java b/forester/java/src/org/forester/archaeopteryx/tools/ProcessPool.java index 0c4ed99..0e58ca2 100644 --- a/forester/java/src/org/forester/archaeopteryx/tools/ProcessPool.java +++ b/forester/java/src/org/forester/archaeopteryx/tools/ProcessPool.java @@ -30,6 +30,7 @@ import java.util.List; public class ProcessPool { + private final static boolean DEBUG = true; final static private ArrayList _processes = new ArrayList(); public synchronized ProcessRunning getProcessByIndex( final int i ) { @@ -53,15 +54,22 @@ public class ProcessPool { final ProcessRunning p = ProcessRunning.createInstance( name ); final int id = p.getId(); if ( getProcessById( id ) != null ) { - throw new IllegalStateException( "process with id " + id + "already exists" ); + throw new IllegalStateException( " process with id " + id + "already exists" ); } getProcesses().add( p ); + if ( DEBUG ) { + System.out.println( "added: " + p ); + } return id; } public synchronized boolean removeProcess( final int id ) { final int i = getProcessIndexById( id ); if ( i >= 0 ) { + if ( DEBUG ) { + final ProcessRunning p = getProcessById( id ); + System.out.println( " removing: " + p ); + } getProcesses().remove( i ); return true; }