X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=forester%2Fjava%2Fsrc%2Forg%2Fforester%2Farchaeopteryx%2Ftools%2FPhylogeneticInferrer.java;h=1144fcbf9e90f8d5f23472e135a14fb0f5d166a5;hb=a9cc2cc5c9cda0ab49f26ccfb7a1aa30531e6ecf;hp=66fbdbc843b1d10684902c833d85556413125114;hpb=def5f3c9ca461176f1188d0adfd744726a56e6ed;p=jalview.git diff --git a/forester/java/src/org/forester/archaeopteryx/tools/PhylogeneticInferrer.java b/forester/java/src/org/forester/archaeopteryx/tools/PhylogeneticInferrer.java index 66fbdbc..1144fcb 100644 --- a/forester/java/src/org/forester/archaeopteryx/tools/PhylogeneticInferrer.java +++ b/forester/java/src/org/forester/archaeopteryx/tools/PhylogeneticInferrer.java @@ -21,12 +21,11 @@ // 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.archaeopteryx.tools; import java.io.BufferedWriter; -import java.io.File; import java.io.FileWriter; import java.io.IOException; import java.util.ArrayList; @@ -35,7 +34,6 @@ import java.util.regex.Matcher; import javax.swing.JOptionPane; -import org.forester.archaeopteryx.AptxUtil; import org.forester.archaeopteryx.MainFrameApplication; import org.forester.evoinference.distance.NeighborJoining; import org.forester.evoinference.distance.PairwiseDistanceCalculator; @@ -43,7 +41,6 @@ import org.forester.evoinference.matrix.distance.BasicSymmetricalDistanceMatrix; import org.forester.evoinference.tools.BootstrapResampler; import org.forester.io.parsers.FastaParser; import org.forester.msa.BasicMsa; -import org.forester.msa.ClustalOmega; import org.forester.msa.Mafft; import org.forester.msa.Msa; import org.forester.msa.Msa.MSA_FORMAT; @@ -98,16 +95,11 @@ public class PhylogeneticInferrer extends RunnableProcess { // SequenceWriter.writeSeqs( _seqs, writer, SEQ_FORMAT.FASTA, 100 ); // writer.close(); switch ( msa_prg ) { - case MAFFT: + case MAFFT: return runMAFFT( _seqs, processMafftOptions() ); - - case CLUSTAL_O: - return runClustalOmega( _seqs, processMafftOptions() ); default: return null; } - - } private List processMafftOptions() { @@ -284,20 +276,6 @@ public class PhylogeneticInferrer extends RunnableProcess { return msa; } - private Msa runClustalOmega( final List seqs, final List opts ) throws IOException, - InterruptedException { - Msa msa = null; - final MsaInferrer clustalo = ClustalOmega.createInstance( _mf.getInferenceManager().getPathToLocalClustalo() - .getCanonicalPath() ); - try { - msa = clustalo.infer( seqs, opts ); - } - catch ( final IOException e ) { - System.out.println( clustalo.getErrorDescription() ); - } - return msa; - } - private void writeToFiles( final BasicSymmetricalDistanceMatrix m ) { if ( !ForesterUtil.isEmpty( _options.getIntermediateFilesBase() ) ) { try { @@ -332,23 +310,23 @@ public class PhylogeneticInferrer extends RunnableProcess { final String seq_name = name_m.group( 3 ); final String tax_sn = name_m.group( 4 ); if ( !ForesterUtil.isEmpty( acc_source ) && !ForesterUtil.isEmpty( acc ) ) { - AptxUtil.ensurePresenceOfSequence( node ); + ForesterUtil.ensurePresenceOfSequence( node ); node.getNodeData().getSequence( 0 ).setAccession( new Accession( acc, acc_source ) ); } if ( !ForesterUtil.isEmpty( seq_name ) ) { - AptxUtil.ensurePresenceOfSequence( node ); + ForesterUtil.ensurePresenceOfSequence( node ); node.getNodeData().getSequence( 0 ).setName( seq_name ); } if ( !ForesterUtil.isEmpty( tax_sn ) ) { - AptxUtil.ensurePresenceOfTaxonomy( node ); + ForesterUtil.ensurePresenceOfTaxonomy( node ); node.getNodeData().getTaxonomy( 0 ).setScientificName( tax_sn ); } } } } } - + public enum MSA_PRG { - MAFFT, CLUSTAL_O; + MAFFT; } }