Skip to content
Snippets Groups Projects
Commit 8b456fb7 authored by edgrif's avatar edgrif
Browse files

display both feature set and source info.

parent 8f0c7094
No related branches found
No related tags found
No related merge requests found
......@@ -27,9 +27,9 @@
*
* Exported functions: See zmapControl_P.h
* HISTORY:
* Last edited: Apr 3 14:52 2009 (edgrif)
* Last edited: May 8 15:38 2009 (edgrif)
* Created: Tue Jul 18 10:02:04 2006 (edgrif)
* CVS info: $Id: zmapControlWindowInfoPanel.c,v 1.19 2009-04-06 13:49:02 edgrif Exp $
* CVS info: $Id: zmapControlWindowInfoPanel.c,v 1.20 2009-05-08 14:44:39 edgrif Exp $
*-------------------------------------------------------------------
*/
......@@ -59,7 +59,7 @@ GtkWidget *zmapControlWindowMakeInfoPanel(ZMap zmap, ZMapInfoPanelLabels labels)
label[5] = &(labels->feature_score) ;
label[6] = &(labels->feature_type) ;
label[7] = &(labels->feature_set) ;
label[8] = &(labels->feature_style) ;
label[8] = &(labels->feature_source) ;
hbox = gtk_hbox_new(FALSE, 0) ;
gtk_container_border_width(GTK_CONTAINER(hbox), 5);
......@@ -105,6 +105,7 @@ void zmapControlInfoPanelSetText(ZMap zmap, ZMapInfoPanelLabels labels, ZMapFeat
char *tooltip[TOTAL_LABELS] = {NULL} ;
int i ;
GString *desc_str ;
static char *no_desc = "<no description>" ;
label[0] = labels->feature_name ;
label[1] = labels->feature_strand ;
......@@ -114,7 +115,7 @@ void zmapControlInfoPanelSetText(ZMap zmap, ZMapInfoPanelLabels labels, ZMapFeat
label[5] = labels->feature_score ;
label[6] = labels->feature_type ;
label[7] = labels->feature_set ;
label[8] = labels->feature_style ;
label[8] = labels->feature_source ;
/* If no feature description then blank the info panel. */
......@@ -186,59 +187,61 @@ void zmapControlInfoPanelSetText(ZMap zmap, ZMapInfoPanelLabels labels, ZMapFeat
text[5] = feature_desc->feature_score ;
text[6] = feature_desc->feature_type ;
text[7] = feature_desc->feature_set ;
text[8] = feature_desc->feature_style ;
text[8] = feature_desc->feature_source ;
if (feature_desc->feature_set_description || feature_desc->feature_description || feature_desc->feature_locus)
{
desc_str = g_string_new("") ;
g_string_append_printf(desc_str, "Feature Name - \"%s\"",
feature_desc->feature_name) ;
desc_str = g_string_new("") ;
if (feature_desc->feature_known_name)
{
g_string_append(desc_str, "\n\n") ;
g_string_append_printf(desc_str, "Feature Name - \"%s\"",
feature_desc->feature_name) ;
g_string_append_printf(desc_str, "Feature Known Name - \"%s\"",
feature_desc->feature_known_name) ;
}
if (feature_desc->feature_known_name)
{
g_string_append(desc_str, "\n\n") ;
g_string_append_printf(desc_str, "Feature Known Name - \"%s\"",
feature_desc->feature_known_name) ;
}
if (feature_desc->feature_query_length)
{
g_string_append(desc_str, "\n\n") ;
if (feature_desc->feature_query_length)
{
g_string_append(desc_str, "\n\n") ;
g_string_append_printf(desc_str, "Feature Length - \"%s\"",
feature_desc->feature_query_length) ;
}
g_string_append_printf(desc_str, "Feature Length - \"%s\"",
feature_desc->feature_query_length) ;
}
g_string_append(desc_str, "\n\n") ;
if (feature_desc->feature_set_description)
{
g_string_append(desc_str, "\n\n") ;
g_string_append_printf(desc_str, "Feature Set - \"%s, %s\"",
feature_desc->feature_set,
(feature_desc->feature_set_description
? feature_desc->feature_set_description : no_desc)) ;
g_string_append_printf(desc_str, "Description - \"%s\"",
feature_desc->feature_set_description) ;
}
g_string_append(desc_str, "\n\n") ;
if (feature_desc->feature_description)
{
g_string_append(desc_str, "\n\n") ;
g_string_append_printf(desc_str, "Feature Source - \"%s, %s\"",
feature_desc->feature_source,
(feature_desc->feature_source_description
? feature_desc->feature_source_description : no_desc)) ;
g_string_append_printf(desc_str, "Notes - \"%s\"",
feature_desc->feature_description) ;
}
if (feature_desc->feature_description)
{
g_string_append(desc_str, "\n\n") ;
if (feature_desc->feature_locus)
{
g_string_append(desc_str, "\n\n") ;
g_string_append_printf(desc_str, "Notes - \"%s\"",
feature_desc->feature_description) ;
}
g_string_append_printf(desc_str, "Locus - \"%s\"",
feature_desc->feature_locus) ;
}
if (feature_desc->feature_locus)
{
g_string_append(desc_str, "\n\n") ;
tooltip[0] = g_string_free(desc_str, FALSE) ;
g_string_append_printf(desc_str, "Locus - \"%s\"",
feature_desc->feature_locus) ;
}
tooltip[0] = g_string_free(desc_str, FALSE) ;
if (feature_desc->type == ZMAPSTYLE_MODE_ALIGNMENT)
tooltip[1] = "Strand match is aligned to / Strand match is aligned from" ;
......@@ -260,8 +263,8 @@ void zmapControlInfoPanelSetText(ZMap zmap, ZMapInfoPanelLabels labels, ZMapFeat
tooltip[4] = "Frame" ;
tooltip[5] = "Score" ;
tooltip[6] = "Feature Type" ;
tooltip[7] = "Feature Column" ;
tooltip[8] = "Feature Set" ;
tooltip[7] = "Feature Set" ;
tooltip[8] = "Feature Source" ;
}
}
......
......@@ -25,9 +25,9 @@
* Description: Private header for interface that creates/manages/destroys
* instances of ZMaps.
* HISTORY:
* Last edited: Dec 17 09:21 2008 (edgrif)
* Last edited: May 8 14:48 2009 (edgrif)
* Created: Thu Jul 24 14:39:06 2003 (edgrif)
* CVS info: $Id: zmapControl_P.h,v 1.71 2008-12-18 13:30:43 edgrif Exp $
* CVS info: $Id: zmapControl_P.h,v 1.72 2009-05-08 14:44:39 edgrif Exp $
*-------------------------------------------------------------------
*/
#ifndef ZMAP_CONTROL_P_H
......@@ -154,7 +154,7 @@ typedef struct
GtkWidget *feature_name, *feature_strand,
*feature_coords, *sub_feature_coords,
*feature_frame, *feature_score, *feature_type,
*feature_set, *feature_style ;
*feature_set, *feature_source ;
GtkWidget *hbox;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment