libMems/ClustalInterface.h

Go to the documentation of this file.
00001 /*******************************************************************************
00002  * $Id: ClustalInterface.h,v 1.12 2004/04/19 23:10:50 darling Exp $
00003  * This file is copyright 2002-2007 Aaron Darling and authors listed in the AUTHORS file.
00004  * This file is licensed under the GPL.
00005  * Please see the file called COPYING for licensing details.
00006  * **************
00007  ******************************************************************************/
00008 
00009 #ifndef _ClustalInterface_h_
00010 #define _ClustalInterface_h_
00011 
00012 #ifdef HAVE_CONFIG_H
00013 #include "config.h"
00014 #endif
00015 
00016 #include "libMems/NumericMatrix.h"
00017 #include "libGenome/gnFilter.h"
00018 #include "libGenome/gnSequence.h"
00019 #include "libMems/GappedAlignment.h"
00020 #include "libMems/GappedAligner.h"
00021 
00022 // attempt to auto-link the ClustalW library on windows
00023 #if defined(WIN64)&&defined(NDEBUG)&&!defined(FASTDEBUG)&&defined(_OPENMP)
00024 #pragma comment(lib, "ClustalW64omp.lib")
00025 #endif
00026 #if defined(WIN64)&&defined(FASTDEBUG)&&defined(_OPENMP)
00027 #pragma comment(lib, "ClustalW64fdomp.lib")
00028 #endif
00029 #if defined(WIN32)&&!defined(WIN64)&&defined(NDEBUG)&&!defined(FASTDEBUG)&&defined(_OPENMP)
00030 #pragma comment(lib, "ClustalWomp.lib")
00031 #endif
00032 #if defined(WIN32)&&!defined(WIN64)&&defined(FASTDEBUG)&&defined(_OPENMP)
00033 #pragma comment(lib, "ClustalWfdomp.lib")
00034 #endif
00035 #if defined(WIN64)&&defined(NDEBUG)&&!defined(FASTDEBUG)&&!defined(_OPENMP)
00036 #pragma comment(lib, "ClustalW64.lib")
00037 #endif
00038 #if defined(WIN64)&&defined(FASTDEBUG)&&!defined(_OPENMP)
00039 #pragma comment(lib, "ClustalW64fd.lib")
00040 #endif
00041 #if defined(WIN32)&&!defined(WIN64)&&defined(NDEBUG)&&!defined(FASTDEBUG)&&!defined(_OPENMP)
00042 #pragma comment(lib, "ClustalW.lib")
00043 #endif
00044 #if defined(WIN32)&&!defined(WIN64)&&defined(FASTDEBUG)&&!defined(_OPENMP)
00045 #pragma comment(lib, "ClustalWfd.lib")
00046 #endif
00047 
00048 
00049 namespace mems {
00050 
00051 class ClustalInterface : public GappedAligner {
00052 public:
00053         ~ClustalInterface(){}
00057         static ClustalInterface& getClustalInterface();
00062         boolean Align( GappedAlignment& cr, Match* r_begin, Match* r_end, std::vector< genome::gnSequence* >& seq_table );
00069         void SetDistanceMatrix( NumericMatrix< double >& distance_matrix, std::string& tree_filename );
00073         void SetMinFlankSize( gnSeqI min_flank ){ min_flank_size = min_flank; }
00074         
00082         void setGuideTree( std::string& tree_filename, NumericMatrix< double >& dist_mat, uint seq_count );
00083         
00085         boolean guideTreeLoaded() const { return distance_matrix.cols() > 0; };
00086         
00087         void SetDistanceMatrix( NumericMatrix< double >& distance_matrix, std::string& tree_filename, boolean reread_tree );
00088 protected:
00089         boolean CallClustal( std::vector< std::string >& seq_table );
00090         NumericMatrix< double > distance_matrix;
00091         gnSeqI min_flank_size;
00092         int clustal_score_cutoff;
00093         bool allocated_aln;
00094 private:
00095         ClustalInterface( const ClustalInterface& ci ){ *this = ci; }
00096         ClustalInterface& operator=( const ClustalInterface& ci );
00097         ClustalInterface();
00098 };
00099 
00100 }
00101 
00102 #endif // _ClustalInterface_h_

Generated on Fri Mar 14 06:01:02 2008 for libMems by doxygen 1.3.6