Fixes for failed test cases (most was due to the data being used or problems with...
[jabaws.git] / binaries / src / tcoffee / t_coffee_source / fast_tree_header.h
index 11a6caf..45fe99b 100644 (file)
@@ -63,13 +63,14 @@ PartTree_param;
 
 //*********** ktup-distance ***************
 void makepointtable_fast(int *coded_seq, int ktup, int ng, int length);
-int makecompositiontable_fastal(FILE* tables_f, int *table, int *pointt, int length);
+void makecompositiontable_fastal(FILE* tables_f, int *table, int *pointt, int length);
 void get_table(short *table, FILE *tables, long index);
 
 
 
 void make_fast_tree(char *file_name, int n, int ktup);
-int make_pos_len_index_of_file(char *file_name, char *ktable_f, long **file_positions, int **seq_lengths, int ktup, char* type);
+int make_pos_len_index_of_file(char *file_name, char *ktable_f, long **file_positions, int **seq_lengths, int ktup, int is_dna);
+int make_pos_len_index_of_file_retree(char *file_name, long **file_positions, int **seq_lengths);
 // void ktup_one2all(FILE *seq_f, int* file_positions, int *least_similar);
 
 
@@ -78,14 +79,45 @@ int euclidean_dist(FILE* ktup_f, long pos1, long pos2, short *table1, short *tab
 int euclidean_dist_half(FILE* ktup_f, long pos2, short *table1, short *table2, int length);
 
 void partTree_r(PartTree_param *param_set);
-
+void partTree_retree(PartTree_param *param_set);
+void make_partTree(char *sequence_f, char *tree_f, int ktup, int subgroup, int is_dna, int retree);
 
 int filter(int *sequence_group, int **dist_mat, int *seed_set_cleaned, PartTree_param *param_set);
-/*********************************COPYRIGHT NOTICE**********************************/
+int fast_aln2sim_mat2 (char *seq1, char *seq2);
+
+
+
+
+
+
+
+/**
+ * \brief Struct to save the features for a set of sequences.
+ * 
+ */
+typedef struct
+{
+       /// The number of this sequence.
+       int seq_number;
+       /// The feature to use in qsort.
+       int *elem_2_compare;
+       /// An element of features.
+       double *features;
+}
+Cluster_info;
+
+
+int                            cluster_recursive(int start, int end, Cluster_info* matrix, int dim, double *mean, double *variance, int *elem_2_compare, FILE* tree_f, int *node);
+int*                   recode_sequence(char * seq, int seq_length, int *char2value, int alphabet_size, int word_length);
+double*                        get_features(int *recoded_seq, int seq_length, int k_tup, int max_coding, int max_dist, int num_features);
+Cluster_info*  feature_extract(char *seq_file_name, int max_dist, int k_tup, int *char2value, int alphabet_size, int *elem_2_compare, int *num_seq_p, int num_features);
+void                   compute_oligomer_distance_tree(char *seq_file_name, int* char2value, char *tree_file_name, int max_dist, int word_length, int alphabet_size);
+
+/******************************COPYRIGHT NOTICE*******************************/
 /*© Centro de Regulacio Genomica */
 /*and */
 /*Cedric Notredame */
-/*Tue Oct 27 10:12:26 WEST 2009. */
+/*Fri Feb 18 08:27:45 CET 2011 - Revision 596. */
 /*All rights reserved.*/
 /*This file is part of T-COFFEE.*/
 /**/
@@ -109,4 +141,4 @@ int filter(int *sequence_group, int **dist_mat, int *seed_set_cleaned, PartTree_
 /**/
 /**/
 /*     */
-/*********************************COPYRIGHT NOTICE**********************************/
+/******************************COPYRIGHT NOTICE*******************************/