private boolean _use_tabbed_display = false;
private boolean _hide_controls_and_menus = false;
private CLADOGRAM_TYPE _cladogram_type = Constants.CLADOGRAM_TYPE_DEFAULT;
+ private File _mafft = null;
+ private File _clustalo = null;
+ private File _fastme = null;
+
private SortedMap<String, WebLink> _weblinks = null;
private SortedMap<String, Color> _display_colors = null;
private boolean _antialias_screen = true;
_ui = UI.UNKNOWN;
}
}
+ else if ( key.equals( "path_to_mafft" ) ) {
+ setPathToMafft( new File( (String) st.nextElement() ) );
+ }
+ else if ( key.equals( "path_to_clustalo" ) ) {
+ setPathToClustalOmega( new File( (String) st.nextElement() ) );
+ }
+ else if ( key.equals( "path_to_fastme" ) ) {
+ setPathToFastME( new File( (String) st.nextElement() ) );
+ }
+ else if ( key.equals( "path_to_mafft" ) ) {
+ setPathToMafft( new File( (String) st.nextElement() ) );
+ }
else if ( key.equals( VALIDATE_AGAINST_PHYLOXML_XSD_SCHEMA ) ) {
setValidatePhyloXmlAgainstSchema( parseBoolean( ( String ) st.nextElement() ) );
}
return DEFAULT_FONT_FAMILY;
}
+
+ public File getPathToMafft() {
+ return _mafft;
+ }
+
+
+
+ public File getPathToClustalOmega() {
+ return _clustalo;
+ }
+
+
+ public File getPathToFastME() {
+ return _fastme;
+ }
+
+
+ public void setPathToMafft( final File mafft ) {
+ _mafft = mafft;
+ }
+
+
+
+ public void setPathToClustalOmega( final File clustalo ) {
+ _clustalo = clustalo ;
+ }
+
+
+ public void setPathToFastME( final File fastme ) {
+ _fastme = fastme;
+ }
+
static enum TRIPLET {
TRUE, FALSE, UNKNOWN
}
private final MainFrameApplication _mf;
private final PhylogeneticInferenceOptions _options;
private final List<Sequence> _seqs;
+ private final boolean DEBUG = true;
public final static String MSA_FILE_SUFFIX = ".aln";
public final static String PWD_FILE_SUFFIX = ".pwd";
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();
+ }
//final File temp_seqs_file = new File( _options.getTempDir() + ForesterUtil.FILE_SEPARATOR + "s.fasta" );
final BufferedWriter writer = new BufferedWriter( new FileWriter( temp_seqs_file ) );
SequenceWriter.writeSeqs( _seqs, writer, SEQ_FORMAT.FASTA, 100 );
}
catch ( final IOException e ) {
JOptionPane.showMessageDialog( _mf,
- "Could not create multiple sequence alignment with "
- + _options.getMsaPrg() + "\nand the following parameters:\n\""
- + _options.getMsaPrgParameters() + "\"\nError:"
+ "Could not create multiple sequence alignment with \""
+ + _options.getMsaPrg() + "\" and the following parameters:\n\""
+ + _options.getMsaPrgParameters() + "\"\nError: "
+ e.getLocalizedMessage(),
"Failed to Calculate MSA",
JOptionPane.ERROR_MESSAGE );
+ if ( DEBUG ) {
+ e.printStackTrace();
+ }
+ return;
+ }
+ catch ( final Exception e ) {
+ JOptionPane.showMessageDialog( _mf,
+ "Could not create multiple sequence alignment with \""
+ + _options.getMsaPrg() + "\" and the following parameters:\n\""
+ + _options.getMsaPrgParameters() + "\"\nError: "
+ + e.getLocalizedMessage(),
+ "Unexpected Exception During MSA Calculation",
+ JOptionPane.ERROR_MESSAGE );
+ if ( DEBUG ) {
+ e.printStackTrace();
+ }
return;
}
if ( msa == null ) {
JOptionPane.ERROR_MESSAGE );
return;
}
+ if ( DEBUG ) {
System.out.println( msa.toString() );
System.out.println( MsaMethods.calcBasicGapinessStatistics( msa ).toString() );
+ }
final MsaMethods msa_tools = MsaMethods.createInstance();
if ( _options.isExecuteMsaProcessing() ) {
msa = msa_tools.removeGapColumns( _options.getMsaProcessingMaxAllowedGapRatio(),
return;
}
}
+ if ( DEBUG ) {
System.out.println( msa_tools.getIgnoredSequenceIds() );
System.out.println( msa.toString() );
System.out.println( MsaMethods.calcBasicGapinessStatistics( msa ).toString() );
+ }
_msa = msa;
}
final int n = _options.getBootstrapSamples();
private int _exit_code;
private final String _path_to_prg;
- public static MsaInferrer createInstance() {
+ public static MsaInferrer createInstance() throws IOException {
return createInstance( getPathToCmd() );
}
- public static MsaInferrer createInstance( final String path_to_prg ) {
+ public static MsaInferrer createInstance( final String path_to_prg ) throws IOException {
return new Mafft( path_to_prg );
}
return SystemCommandExecutor.isExecuteableFile( new File( getPathToCmd() ) );
}
- private Mafft( final String path_to_prg ) {
+ private Mafft( final String path_to_prg ) throws IOException {
if ( !SystemCommandExecutor.isExecuteableFile( new File( path_to_prg ) ) ) {
- throw new IllegalArgumentException( "cannot execute MAFFT via [" + path_to_prg + "]" );
+ throw new IOException( "cannot execute MAFFT with \"" + path_to_prg + "\"" );
}
_path_to_prg = new String( path_to_prg );
init();