diff --git a/src/zmapFeature/zmapFeature3FrameTranslation.c b/src/zmapFeature/zmapFeature3FrameTranslation.c index 78d34d67d57f74bb0b87a514e5c3448098333b5c..16c8c8f8e2ecd4f5369e6a5c0e6ade786fa100df 100755 --- a/src/zmapFeature/zmapFeature3FrameTranslation.c +++ b/src/zmapFeature/zmapFeature3FrameTranslation.c @@ -29,7 +29,7 @@ * HISTORY: * Last edited: May 1 19:01 2009 (rds) * Created: Wed Apr 8 16:18:11 2009 (rds) - * CVS info: $Id: zmapFeature3FrameTranslation.c,v 1.1 2009-05-08 14:19:54 rds Exp $ + * CVS info: $Id: zmapFeature3FrameTranslation.c,v 1.2 2010-02-09 09:28:30 mh17 Exp $ *------------------------------------------------------------------- */ @@ -91,7 +91,7 @@ void zMapFeature3FrameTranslationSetCreateFeatures(ZMapFeatureSet feature_set, return ; } -void zMapFeature3FrameTranslationSetRevComp(ZMapFeatureSet feature_set, int origin) +void zMapFeature3FrameTranslationSetRevComp(ZMapFeatureSet feature_set, RevCompData cb_data) { zmapFeature3FrameTranslationPopulate(feature_set, NULL); @@ -100,7 +100,7 @@ void zMapFeature3FrameTranslationSetRevComp(ZMapFeatureSet feature_set, int orig * so the numbers don't need rev comping then, so we do it here. * I figured doing it twice was less hassle than special case * elsewhere... RDS */ - g_hash_table_foreach(feature_set->features, fudge_rev_comp_translation, GINT_TO_POINTER(origin)); + g_hash_table_foreach(feature_set->features, fudge_rev_comp_translation, (gpointer) cb_data); return ; } @@ -202,7 +202,9 @@ static void zmapFeature3FrameTranslationPopulate(ZMapFeatureSet feature_se static void fudge_rev_comp_translation(gpointer key, gpointer value, gpointer user_data) { ZMapFeature feature = (ZMapFeature)value; - zmapFeatureRevComp(Coord, GPOINTER_TO_INT(user_data), feature->x1, feature->x2); + RevCompData cb_data = (RevCompData) user_data; + + zmapFeatureRevComp(Coord, cb_data->start, cb_data->end, feature->x1, feature->x2); return ; } @@ -229,7 +231,7 @@ static void translation_set_populate(ZMapFeatureBlock feature_block, zMapFeatureSetAddFeature(feature_set, frame_feature); - block_position = feature_block->block_to_sequence.q1; + block_position = feature_block->block_to_sequence.t1; // actual loaded DNA not logical sequence start for (i = ZMAPFRAME_0; dna && *dna && i <= ZMAPFRAME_2; i++, dna++, block_position++) { diff --git a/src/zmapWindow/zmapWindowDNA.c b/src/zmapWindow/zmapWindowDNA.c index c412c1fd1186cba9033e8aac4291877f717621e1..c964c902dba3be9e466ce688fa9f6ae39e6cd084 100755 --- a/src/zmapWindow/zmapWindowDNA.c +++ b/src/zmapWindow/zmapWindowDNA.c @@ -28,7 +28,7 @@ * HISTORY: * Last edited: Jan 22 11:15 2010 (edgrif) * Created: Fri Oct 6 16:00:11 2006 (edgrif) - * CVS info: $Id: zmapWindowDNA.c,v 1.23 2010-01-22 13:03:40 edgrif Exp $ + * CVS info: $Id: zmapWindowDNA.c,v 1.24 2010-02-09 09:28:30 mh17 Exp $ *------------------------------------------------------------------- */ @@ -160,8 +160,8 @@ void zmapWindowCreateSequenceSearchWindow(ZMapWindow window, FooCanvasItem *feat search_data->window = window ; search_data->block = block ; search_data->sequence_type = sequence_type ; - search_data->search_start = block->block_to_sequence.q1 ; - search_data->search_end = block->block_to_sequence.q2 ; + search_data->search_start = block->block_to_sequence.t1 ; + search_data->search_end = block->block_to_sequence.t2 ; /* Get block coords in screen coords, saving for min & max of spin buttons */ screen_search_start = zmapWindowCoordToDisplay(search_data->window, search_data->search_start) ; @@ -184,7 +184,7 @@ void zmapWindowCreateSequenceSearchWindow(ZMapWindow window, FooCanvasItem *feat } /* Clamp to length of sequence, useless to do that but possible.... */ - max_errors = max_Ns = block->block_to_sequence.q2 - block->block_to_sequence.q1 + 1 ; + max_errors = max_Ns = block->block_to_sequence.t2 - block->block_to_sequence.t1 + 1 ; /* set up the top level window */ @@ -524,8 +524,8 @@ static void searchCB(GtkWidget *widget, gpointer cb_data) /* NEED TO SORT WHOLE COORD JUNK OUT....USER SHOULD SEE BLOCK COORDS WE SHOULD DO RELATIVE COORDS... */ /* Convert to relative coords.... */ - start = search_data->search_start - search_data->block->block_to_sequence.q1 ; - end = search_data->search_end - search_data->block->block_to_sequence.q1 ; + start = search_data->search_start - search_data->block->block_to_sequence.t1 ; + end = search_data->search_end - search_data->block->block_to_sequence.t1 ; dna = search_data->block->sequence.sequence ; dna_len = strlen(dna) ; @@ -567,8 +567,8 @@ static void searchCB(GtkWidget *widget, gpointer cb_data) || (search_data->max_errors < 0 || search_data->max_errors > dna_len) || (search_data->max_Ns < 0 || search_data->max_Ns > dna_len)) err_text = g_strdup_printf("start/end/max errors/max Ns\n must all be within range %d -> %d", - search_data->block->block_to_sequence.q1, - search_data->block->block_to_sequence.q2) ; + search_data->block->block_to_sequence.t1, + search_data->block->block_to_sequence.t2) ; } @@ -762,8 +762,8 @@ static void remapCoords(gpointer data, gpointer user_data) DNASearchData search_data = (DNASearchData)user_data ; ZMapFeatureBlock block = (ZMapFeatureBlock)search_data->block ; - match_data->start = match_data->start + block->block_to_sequence.q1 ; - match_data->end = match_data->end + block->block_to_sequence.q1 ; + match_data->start = match_data->start + block->block_to_sequence.t1 ; + match_data->end = match_data->end + block->block_to_sequence.t1 ; if (search_data->window->display_forward_coords) { diff --git a/src/zmapWindow/zmapWindowDNAChoose.c b/src/zmapWindow/zmapWindowDNAChoose.c index 609315e96ad78fc9db3d736e6d303ee56b31dbca..f1b7c2e527cdc86d27c7e71aa6dbb9a61f94dac3 100755 --- a/src/zmapWindow/zmapWindowDNAChoose.c +++ b/src/zmapWindow/zmapWindowDNAChoose.c @@ -33,7 +33,7 @@ * HISTORY: * Last edited: Jun 12 09:26 2009 (rds) * Created: Fri Nov 10 09:50:48 2006 (edgrif) - * CVS info: $Id: zmapWindowDNAChoose.c,v 1.9 2009-06-19 11:15:29 rds Exp $ + * CVS info: $Id: zmapWindowDNAChoose.c,v 1.10 2010-02-09 09:28:30 mh17 Exp $ *------------------------------------------------------------------- */ @@ -139,8 +139,8 @@ char *zmapWindowDNAChoose(ZMapWindow window, FooCanvasItem *feature_item, ZMapWi return dna ; } - block_start = block->block_to_sequence.q1 ; - block_end = block->block_to_sequence.q2 ; + block_start = block->block_to_sequence.t1 ; + block_end = block->block_to_sequence.t2 ; @@ -237,7 +237,7 @@ char *zmapWindowDNAChoose(ZMapWindow window, FooCanvasItem *feature_item, ZMapWi dna_data->dna_start, GTK_SIGNAL_FUNC(startSpinCB), "End: ", dna_data->dna_start, block_end, dna_data->dna_end, GTK_SIGNAL_FUNC(endSpinCB), - "Flanking bases: ", 0, (block->block_to_sequence.q2 - 1), + "Flanking bases: ", 0, (block->block_to_sequence.t2 - 1), dna_data->dna_flanking, GTK_SIGNAL_FUNC(flankingSpinCB)) ; gtk_box_pack_start(GTK_BOX(hbox), start_end, TRUE, TRUE, 0) ; @@ -376,8 +376,8 @@ static gboolean checkCoords(DNASearchData dna_data) start = dna_data->dna_start - dna_data->dna_flanking ; end = dna_data->dna_end + dna_data->dna_flanking ; - block_start = dna_data->block->block_to_sequence.q1; - block_end = dna_data->block->block_to_sequence.q2; + block_start = dna_data->block->block_to_sequence.t1; + block_end = dna_data->block->block_to_sequence.t2; if(dna_data->window->display_forward_coords) { @@ -408,7 +408,7 @@ static void getDNA(DNASearchData dna_data) if (!checkCoords(dna_data)) return ; - block_start = dna_data->block->block_to_sequence.q1; + block_start = dna_data->block->block_to_sequence.t1; if(dna_data->window->display_forward_coords) { @@ -432,8 +432,8 @@ static void getDNA(DNASearchData dna_data) || (end < 0 || end > dna_len) || (start - dna_data->dna_flanking < 0 || end + dna_data->dna_flanking > dna_len)) err_text = g_strdup_printf("start/end +/- flanking must be within range %d -> %d", - dna_data->block->block_to_sequence.q1, - dna_data->block->block_to_sequence.q2) ; + dna_data->block->block_to_sequence.t1, + dna_data->block->block_to_sequence.t2) ; if (err_text) { @@ -628,8 +628,8 @@ static void updateSpinners(DNASearchData dna_data) end = gtk_spin_button_get_value_as_int(dna_data->end_spin) ; flanking = gtk_spin_button_get_value_as_int(dna_data->flanking_spin) ; - min_start = dna_data->block->block_to_sequence.q1; - max_end = dna_data->block->block_to_sequence.q2; + min_start = dna_data->block->block_to_sequence.t1; + max_end = dna_data->block->block_to_sequence.t2; if(dna_data->window->display_forward_coords) {