NCBI C Toolkit Cross Reference

C/desktop/glbpic.h


  1 #ifndef _GLBPIC_
  2 #define _GLBPIC_
  3 
  4 #include <maputil.h>
  5 #include <gather.h>
  6 #include <jzcoll.h>
  7 #include <picture.h>
  8 
  9 #ifdef __cplusplus
 10 extern "C" {
 11 #endif
 12 
 13 
 14 typedef struct globalbsp{               /*the map drawing unit for global view*/ 
 15         BioseqPtr bsp;
 16         CharPtr label;                  /*label for the sequence*/
 17         RecT rec;                       /*for drawing a linear molecule*/
 18         Int2 radius;                    /*for drawing a circular molecule*/
 19         Uint1 map_type;                 /*determine the type of the map*/
 20         Boolean show_map_unit;          /*show the map unit??*/
 21         Boolean check_cyto;             /*check if it is a cyto-genetic map*/
 22         ValNodePtr l_marks;             /*the list of MapMarks, such as landmarks, band in 
 23                                                                         cytogenetic map*/
 24         ValNodePtr g_marks;                             /*the list of marks that are picked by the user*/
 25         ValNodePtr cyto_marks;                  /*marks for the cytogenetic map*/
 26         Boolean hide;                                   /*hide the current Bioseq*/
 27         Uint2 priority;                 /*priority for search a particular gene*/
 28         ValNodePtr rrp_list;    /*list for showing the repeat regions*/
 29         ValNodePtr arp_list;    /*list for showing the alignment in the global view*/
 30         Boolean has_fish_align; /*the arp_list is a FISH alignment*/
 31         Boolean is_seqindex_map;        /*is it a sequence index map*/
 32         Boolean align_has_status;       /*if the alignment arp_list has status*/
 33         Int2 num_lod_score;     /*number of the LOD scores for a genethon map*/
 34 }GlobalBsp, PNTR GlobalBspPtr;
 35 
 36 
 37 typedef struct globaldraw{
 38         Boolean is_circle;
 39         PoinT center;
 40         ValNodePtr gbp_list;    /*the list of the globalbsp data*/
 41         GeneDataPtr g_data;
 42         ValNodePtr g_list;              /*list of user-selected genes*/
 43         
 44         Boolean free_data;              /*if TRUE, free msp_list and equiv_align_list*/
 45         ValNodePtr msp_list;    /*manually loaded Seq-entry*/
 46         ValNodePtr equiv_align_list;    /*manually loaded Seq-annot + alignment parsed out*/
 47         ValNodePtr ext_align;   /*alignment taken from the external*/
 48         
 49         ValNodePtr slp_list;    /*list of selected intervals */
 50         Uint1 release_choice;   /* 0 = graphic view, 1=alignment view*/
 51         Boolean draw_align_legend;      /*add the legend for the colors used in                                           different score scale*/
 52 }GlobalDraw, PNTR GlobalDrawPtr;
 53 
 54 typedef struct mapmark{                 /*marks labeled on the global view*/
 55         Char label[20];                 /*label the mark*/
 56         Int4 pos;                       /*position in basepair coordinate*/
 57         Boolean inward;                 /*the orientation for mark label*/
 58 }MapMark, PNTR MapMarkPtr;
 59 
 60 /*************************************************************************
 61 *
 62 *       default variables associated with the layout of the global picture
 63 *
 64 **************************************************************************/
 65 #define LINEAR_BSP      1               /*a linear Bioseq*/
 66 #define CIRCLE_BSP      2               /* a circular Bioseq*/
 67 
 68 #define PI              ((FloatHi)3.14159)
 69 
 70 /*options for showing the Equiv-align */
 71 #define EQUIV_ALIGN_DEFAULT     0       /*show the consistent markers and only 
 72                                         some of the inconsistent markers*/
 73 #define EQUIV_ALIGN_ALL         1       /*show all the equiv-aligns*/
 74 /***************************************************************************
 75 *
 76 *       CreateGlobalDrawData(msp_list, ext_align, user_list, need_free)
 77 *       Create the GlobalDrawPtr structure to draw the global view
 78 *       msp_list: externally loaded Seq-entry and its file name (used for saving)
 79 *       ext_align: the externally loaded sequence-alignment for equiv maps
 80 *       user_list: a list of user-selected gene symbols
 81 *       need_free: if TRUE, the free callback will free msp_list, ext_align and 
 82 *       user_list.
 83 *
 84 ****************************************************************************/           
 85 GlobalDrawPtr CreateGlobalDrawData PROTO((ValNodePtr msp_list, ValNodePtr ext_align, ValNodePtr user_list, Boolean need_free, Boolean for_picture, Uint1 equiv_align_option));
 86 
 87 /**************************************************************************
 88 *
 89 *       ree_global_draw(gdraw_p)
 90 *       free all the data related to the global draw
 91 *
 92 ***************************************************************************/
 93 GlobalDrawPtr free_global_draw PROTO((GlobalDrawPtr gdraw_p));
 94 
 95 BioseqPtr has_cyto_map PROTO((GlobalDrawPtr gdraw_p));
 96 
 97 
 98 /***************************************************************************
 99 *
100 *       functions related to the layout of GlobalDrawPtr
101 *
102 *       LayoutGlobalDrawData(gdraw_p, pan_width, pan_height)
103 *       gdraw_p: the GlobalDrawPtr
104 *       pan_width: the width of the viewer
105 *       pan_height: the height of the viewer
106 *
107 ****************************************************************************/           
108 Boolean LayoutGlobalDrawData PROTO((GlobalDrawPtr gdraw_p, Int2 pan_width, Int2 pan_height));
109 
110 /************************************************************************
111 *
112 *       Draw_Global(gdraw_p)
113 *       return a picture created from GlobalDrawPtr
114 *
115 ************************************************************************/
116 SegmenT Draw_Global PROTO((GlobalDrawPtr gdraw_p));
117 
118 
119 SegmenT MuskGlobalPicture PROTO((ValNodePtr msp_list, ValNodePtr ext_align, Boolean need_free, Int2 panel_width, Int2 panel_height, ValNodePtr user_list, GlobalDrawPtr PNTR vwr_extra,  Uint1 equiv_align_option, Boolean draw_align_legend));
120 
121 SegmenT SequinGlobalPicture PROTO((SeqEntryPtr sep, Int2 panel_width, Int2 panel_height, ValNodePtr user_list, GlobalDrawPtr PNTR vwr_extra, Boolean draw_align_legend));
122 
123 SegmenT GlobalPictureUpdate PROTO((GlobalDrawPtr gdraw_p, ValNodePtr new_gene_list, Int2 panel_width, Int2 panel_height));
124 
125 
126 /*********************************************************************
127 *
128 *
129 *       find_map_pos(convert the start_pnt, stop_pnt into a list of
130 *       Seq-locs)
131 *
132 *********************************************************************/
133 ValNodePtr find_map_pos PROTO((GlobalDrawPtr gdraw_p, PntInfo start_pnt, PntInfo stop_pnt));
134 
135 GeneDataPtr create_gene_data PROTO((ValNodePtr msp_list, ValNodePtr mark_list));
136 
137 #ifdef __cplusplus
138 }
139 #endif
140 
141 #endif
142 
143 

source navigation ]   [ diff markup ]   [ identifier search ]   [ freetext search ]   [ file search ]  

This page was automatically generated by the LXR engine.
Visit the LXR main site for more information.