import org.forester.util.DescriptiveStatistics;
import org.forester.util.ForesterUtil;
-public class msa_quality {
+public class mcc {
final static private String HELP_OPTION_1 = "help";
final static private String HELP_OPTION_2 = "h";
final static private String TO_OPTION = "t";
final static private String STEP_OPTION = "s";
final static private String WINDOW_OPTION = "w";
- final static private String PRG_NAME = "msa_quality";
+ final static private String PRG_NAME = "mcc";
+ final static private String PRG_DESC = "msa consensus conservation";
final static private String PRG_VERSION = "1.00";
final static private String PRG_DATE = "2012.05.18";
final static private String E_MAIL = "phylosoft@gmail.com";
}
private static void printHelp() {
- ForesterUtil.printProgramInformation( PRG_NAME, PRG_VERSION, PRG_DATE, E_MAIL, WWW );
+ ForesterUtil.printProgramInformation( PRG_NAME, PRG_DESC, PRG_VERSION, PRG_DATE, E_MAIL, WWW );
System.out.println( "Usage:" );
System.out.println();
System.out.println( PRG_NAME + " <options> <msa input file>" );
import org.forester.tools.ConfidenceAssessor;
import org.forester.util.ForesterUtil;
-public class PhylogeneticInferrer implements Runnable {
+public class PhylogeneticInferrer extends RunnableProcess {
private Msa _msa;
private final MainFrameApplication _mf;
if ( ( _msa == null ) && ( _seqs == null ) ) {
throw new IllegalArgumentException( "cannot run phylogenetic analysis with null msa and seq array" );
}
+ start( _mf, "phylogenetic inference" );
if ( _msa == null ) {
Msa msa = null;
try {
msa = inferMsa();
}
catch ( final IOException e ) {
+ end( _mf );
JOptionPane.showMessageDialog( _mf,
"Could not create multiple sequence alignment with \""
+ _options.getMsaPrg() + "\" and the following parameters:\n\""
return;
}
catch ( final Exception e ) {
+ end( _mf );
JOptionPane.showMessageDialog( _mf,
"Could not create multiple sequence alignment with \""
+ _options.getMsaPrg() + "\" and the following parameters:\n\""
return;
}
if ( msa == null ) {
+ end( _mf );
JOptionPane.showMessageDialog( _mf,
"Could not create multiple sequence alignment with "
+ _options.getMsaPrg() + "\nand the following parameters:\n\""
_options.getMsaProcessingMinAllowedLength(),
msa );
if ( msa == null ) {
+ end( _mf );
JOptionPane.showMessageDialog( _mf,
"Less than two sequences longer than "
+ _options.getMsaProcessingMinAllowedLength()
ConfidenceAssessor.evaluate( "bootstrap", eval_phys, master_phy, true, 1 );
}
_mf.getMainPanel().addPhylogenyInNewTab( master_phy, _mf.getConfiguration(), "nj", "njpath" );
- _mf.getMainPanel().getCurrentTreePanel().setArrowCursor();
+ // _mf.getMainPanel().getCurrentTreePanel().setArrowCursor();
+ end( _mf );
JOptionPane.showMessageDialog( _mf,
"Inference successfully completed",
"Inference Completed",
}
void start( final MainFrame mf, final String name ) {
- mf.getMainPanel().getCurrentTreePanel().setWaitCursor();
+ //mf.getMainPanel().getCurrentTreePanel().setWaitCursor();
setProcessId( mf.getProcessPool().addProcess( name ) );
mf.updateProcessMenu();
}
ForesterUtil.printWarningMessage( Constants.PRG_NAME, "could not remove process " + getProcessId()
+ " from process pool" );
}
- mf.getMainPanel().getCurrentTreePanel().setArrowCursor();
+ //mf.getMainPanel().getCurrentTreePanel().setArrowCursor();
mf.updateProcessMenu();
}
}
import org.forester.ws.uniprot.SequenceDatabaseEntry;
import org.forester.ws.uniprot.UniProtWsTools;
-public final class SequenceDataRetriver implements Runnable {
+public final class SequenceDataRetriver extends RunnableProcess {
private final Phylogeny _phy;
private final MainFrameApplication _mf;
}
private void execute() {
- _mf.getMainPanel().getCurrentTreePanel().setWaitCursor();
+ start( _mf, "sequence data" );
SortedSet<String> not_found = null;
try {
not_found = obtainSeqInformation( _phy );
}
catch ( final UnknownHostException e ) {
- _mf.getMainPanel().getCurrentTreePanel().setArrowCursor();
JOptionPane.showMessageDialog( _mf,
"Could not connect to \"" + getBaseUrl() + "\"",
"Network error during taxonomic information gathering",
return;
}
catch ( final IOException e ) {
- _mf.getMainPanel().getCurrentTreePanel().setArrowCursor();
e.printStackTrace();
JOptionPane.showMessageDialog( _mf,
e.toString(),
return;
}
finally {
- _mf.getMainPanel().getCurrentTreePanel().setArrowCursor();
+ end( _mf );
}
_treepanel.setTree( _phy );
_mf.showWhole();
import org.forester.phylogeny.Phylogeny;
import org.forester.ws.uniprot.UniProtWsTools;
-public class TaxonomyDataObtainer implements Runnable {
+public class TaxonomyDataObtainer extends RunnableProcess {
private final Phylogeny _phy;
private final MainFrameApplication _mf;
}
private void execute() {
- _mf.getMainPanel().getCurrentTreePanel().setWaitCursor();
+ start( _mf, "taxonomy data" );
SortedSet<String> not_found = null;
try {
not_found = AncestralTaxonomyInference.obtainDetailedTaxonomicInformation( _phy, _delete );
return;
}
finally {
- _mf.getMainPanel().getCurrentTreePanel().setArrowCursor();
+ end( _mf );
}
_treepanel.setTree( _phy );
_mf.showWhole();
}
final public static void printProgramInformation( final String prg_name,
+ final String desc,
final String prg_version,
final String date,
final String email,
final String www ) {
- final int l = prg_name.length() + prg_version.length() + date.length() + 4;
+ String my_prg_name = new String( prg_name );
+ if ( !ForesterUtil.isEmpty( desc ) ) {
+ my_prg_name += ( " - " + desc );
+ }
+ final int l = my_prg_name.length() + prg_version.length() + date.length() + 4;
System.out.println();
- System.out.println( prg_name + " " + prg_version + " (" + date + ")" );
+ System.out.println( my_prg_name + " " + prg_version + " (" + date + ")" );
for( int i = 0; i < l; ++i ) {
System.out.print( "_" );
}
System.out.println();
}
+ final public static void printProgramInformation( final String prg_name,
+ final String prg_version,
+ final String date,
+ final String email,
+ final String www ) {
+ printProgramInformation( prg_name, null, prg_version, date, email, www );
+ }
+
final public static void printWarningMessage( final String prg_name, final String message ) {
System.out.println( "[" + prg_name + "] > warning: " + message );
}