X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=forester%2Fjava%2Fsrc%2Forg%2Fforester%2Fmsa%2FClustalOmega.java;h=2b7a0669b1a7ab1274ea0600c6b7cf7714155ee1;hb=0b39293d1577083551ba528d0ac7afcacbf69dde;hp=f6d4f6516c923d3eeb0b1be5c3bf627d76fd19a1;hpb=def5f3c9ca461176f1188d0adfd744726a56e6ed;p=jalview.git diff --git a/forester/java/src/org/forester/msa/ClustalOmega.java b/forester/java/src/org/forester/msa/ClustalOmega.java index f6d4f65..2b7a066 100644 --- a/forester/java/src/org/forester/msa/ClustalOmega.java +++ b/forester/java/src/org/forester/msa/ClustalOmega.java @@ -21,7 +21,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.msa; @@ -35,7 +35,7 @@ import java.util.List; import org.forester.io.parsers.FastaParser; import org.forester.io.writers.SequenceWriter; import org.forester.io.writers.SequenceWriter.SEQ_FORMAT; -import org.forester.sequence.Sequence; +import org.forester.sequence.MolecularSequence; import org.forester.util.SystemCommandExecutor; public final class ClustalOmega extends MsaInferrer { @@ -71,8 +71,9 @@ public final class ClustalOmega extends MsaInferrer { return _exit_code; } - - public Msa infer( final List seqs, final List opts ) throws IOException, InterruptedException { + @Override + public Msa infer( final List seqs, final List opts ) throws IOException, + InterruptedException { final File file = File.createTempFile( "__clustalo_input_", ".fasta" ); file.deleteOnExit(); final BufferedWriter writer = new BufferedWriter( new FileWriter( file ) ); @@ -82,8 +83,7 @@ public final class ClustalOmega extends MsaInferrer { file.delete(); return msa; } - - + @Override public Msa infer( final File path_to_input_seqs, final List opts ) throws IOException, InterruptedException { init(); @@ -99,12 +99,12 @@ public final class ClustalOmega extends MsaInferrer { _error = stderr.toString(); if ( _exit_code != 0 ) { throw new IOException( "Clustal Omega program failed, exit code: " + _exit_code + "\nCommand:\n" + my_opts - + "\nError:\n" + stderr ); + + "\nError:\n" + stderr ); } final StringBuilder stdout = command_executor.getStandardOutputFromCommand(); if ( ( stdout == null ) || ( stdout.length() < 2 ) ) { throw new IOException( "Clustal Omega program did not produce any output\nCommand:\n" + my_opts - + "\nError:\n" + stderr ); + + "\nError:\n" + stderr ); } final Msa msa = FastaParser.parseMsa( stdout.toString() ); return msa; @@ -114,6 +114,4 @@ public final class ClustalOmega extends MsaInferrer { _error = null; _exit_code = -100; } - - }