Changeset 6141 for trunk/NTREE/AP_consensus.cxx
- Timestamp:
- 14/08/09 16:29:27 (3 years ago)
- Files:
-
- 1 modified
-
trunk/NTREE/AP_consensus.cxx (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/NTREE/AP_consensus.cxx
r6100 r6141 33 33 * Dependencies: Needs consens.fig and CON_groups.fig 34 34 * 35 * Description: This module calculates the consensus of sequenc ies of35 * Description: This module calculates the consensus of sequences of 36 36 * bases or amino acids. The result can be one or more lines 37 37 * of characters and it is written to the extended data of … … 83 83 * Description: This function creates one or more result strings out 84 84 * of table statistic. Memory for result is allocated 85 * and later freed edin function CON_calculate_cb85 * and later freed in function CON_calculate_cb 86 86 * 87 87 * NOTE: Usage of groupflags and groupnames see function … … 510 510 { 511 511 int group2=1; 512 float highest=0,relativ ;512 float highest=0,relative; 513 513 int diffchar; 514 514 if (absolutrow[col]){ 515 515 while( (diffchar=neworder[group2++]) ){ 516 relativ =(float)statistic[diffchar][col]516 relative=(float)statistic[diffchar][col] 517 517 /(float)absolutrow[col]; 518 if(relativ >highest) highest=relativ;519 additional[diffchar][col]=relativ ;518 if(relative>highest) highest=relative; 519 additional[diffchar][col]=relative; 520 520 } 521 521 additional[0][col]=highest; … … 525 525 } 526 526 527 GBDATA *gb_relativ =GB_search(gb_graph,"MAX",GB_FLOATS);528 err=GB_write_floats(gb_relativ ,additional[0],maxalignlen);527 GBDATA *gb_relative=GB_search(gb_graph,"MAX",GB_FLOATS); 528 err=GB_write_floats(gb_relative,additional[0],maxalignlen); 529 529 530 530 for(group=1;group<numdiffchars;group++) … … 533 533 if (ch <'A' || ch>'Z') continue; 534 534 sprintf(charname,"N%c",ch); 535 gb_relativ =GB_search(gb_graph,charname,GB_FLOATS);536 err=GB_write_floats(gb_relativ ,additional[group],maxalignlen);535 gb_relative=GB_search(gb_graph,charname,GB_FLOATS); 536 err=GB_write_floats(gb_relative,additional[group],maxalignlen); 537 537 } 538 538 … … 628 628 629 629 630 /* creating the table for characters and allocating memory for 'statist c' */630 /* creating the table for characters and allocating memory for 'statistic' */ 631 631 int *statistic[MAX_AMINOS+1]; 632 632 int convtable[256]; … … 895 895 * Function: CON_calc_max_freq_cb( AW_window *aw) 896 896 * 897 * Description: Gets the maximum frequenc efor each columns.897 * Description: Gets the maximum frequency for each columns. 898 898 * 899 899 * NOTE:
