Permalink
Browse files

fixes fo rlarge multigene analysis

  • Loading branch information...
1 parent 57d37ed commit 09cc361ec0e3d4fe33cab908fbdbe9438cb1a7cb Simon Berger committed with Dec 4, 2012
Showing with 30 additions and 12 deletions.
  1. +1 −1 build_papara2.sh
  2. +9 −6 papara2_main.cpp
  3. +3 −2 phy_cut_partition.cpp
  4. +17 −3 vec_unit.h
View
@@ -5,7 +5,7 @@
-g++ -o papara -O3 -msse4.1 -I. -I ivy_mike/src/ -I ublasJama-1.0.2.3 papara.cpp pvec.cpp pars_align_seq.cpp pars_align_gapp_seq.cpp parsimony.cpp sequence_model.cpp papara2_main.cpp blast_partassign.cpp align_utils.cpp ivy_mike/src/time.cpp ivy_mike/src/tree_parser.cpp ivy_mike/src/getopt.cpp ivy_mike/src/demangle.cpp ivy_mike/src/multiple_alignment.cpp ublasJama-1.0.2.3/EigenvalueDecomposition.cpp -lpthread
+g++ -o papara -O3 -msse4a -I. -I ivy_mike/src/ -I ublasJama-1.0.2.3 papara.cpp pvec.cpp pars_align_seq.cpp pars_align_gapp_seq.cpp parsimony.cpp sequence_model.cpp papara2_main.cpp blast_partassign.cpp align_utils.cpp ivy_mike/src/time.cpp ivy_mike/src/tree_parser.cpp ivy_mike/src/getopt.cpp ivy_mike/src/demangle.cpp ivy_mike/src/multiple_alignment.cpp ublasJama-1.0.2.3/EigenvalueDecomposition.cpp -lpthread
#-I/usr/include/boost141/
View
@@ -215,14 +215,16 @@ void run_papara( const std::string &qs_name, const std::string &alignment_name,
}
+void print_commandline( std::ostream &os, char **argv, int argc ) {
+
+ std::stringstream ss;
+ std::copy( argv, argv + argc, std::ostream_iterator<char *>( os, " " ) );
+ os << std::endl;
+}
+
int main( int argc, char *argv[] ) {
-// aligned_buffer<int> xxx(1024);
- char *xargv[9] = {"xxx", "-t", "C:/2012_robert_454/RAxML_bestTree.cora_Sanger_reference_alignment.tre", "-s", "C:/2012_robert_454/cora_Sanger_reference_alignment.phy",
- "-q", "C:/2012_robert_454/cluster_52_72_cora_inversa_squamiformis_DIC_148_149.fas", "-j", "2" };
- argv = (char**) xargv;
- argc = 9;
namespace igo = ivy_mike::getopt;
@@ -357,7 +359,8 @@ int main( int argc, char *argv[] ) {
papara::add_log_tee papara_log_file( logs );
-
+ papara::lout << "papara called as:\n";
+ print_commandline( papara::lout, argv, argc );
const bool ref_gaps = !opt_no_ref_gaps;
View
@@ -56,7 +56,8 @@ int main( int argc, char *argv[] ) {
std::ostream &os = std::cout;
size_t name_width = lp.max_name_len() + 1;
-
+
+ os << lp.size() << " " << col_max - col_min << "\n";
for( int i = 0, size = lp.size(); i < size; ++i ) {
std::string name = lp.name_at(i);
@@ -74,4 +75,4 @@ int main( int argc, char *argv[] ) {
}
-}
+}
View
@@ -422,12 +422,26 @@ struct vector_unit<int, 4> {
return _mm_max_epi32( a, b );
#else
//#warning "probably untested code!"
- assert(0);
const vec_t ma = _mm_cmpgt_epi32( a, b );
- return _mm_or_si128( _mm_and_si128( ma, a ), _mm_andnot_si128( ma, b ) );
+ const vec_t ret = _mm_or_si128( _mm_and_si128( ma, a ), _mm_andnot_si128( ma, b ) );
+#if 0
+ println( a );
+ println( b );
+ println( ret );
+
+ assert(0);
+#endif
+ return ret;
#endif
}
-
+
+ static inline void println( const vec_t & v ) {
+
+ T tmp[W];
+ _mm_storeu_si128( (vec_t*)tmp, v );
+ printf( "%d %d %d %d\n", tmp[0], tmp[1], tmp[2], tmp[3] );
+ }
+
static inline const vec_t abs_diff( const vec_t &a, const vec_t &b ) {
// i don't really like this function, as ideally this would just be abs(sub(a,b)),
// but there doesn't seem to be a fast way to implement abs on pre SSSSSSE3.

0 comments on commit 09cc361

Please sign in to comment.