/* static char const rcsid [] = "$Id: maps.h,v 1.1 1998/04/22 10:13:16 stojanov Exp $"; */ /*****************************************************************************/ /* */ /* Unit: MAPS (External declarations) */ /* */ /* Author: Nikola Stojanovic */ /* */ /* Revision: 15 APR 98 */ /* */ /* */ /* Unit contains constant and type declarations for the maps program, along */ /* with the declarations of system-wide procedures and functions */ /* */ /*****************************************************************************/ #include "globin/ntl.h" /*****************************************************************************/ /* */ /* */ /*****************************************************************************/ #define UNDEFINED -31749 #define FLOAT_LN_LIMIT 0.0001 #define ALL_ALIGNMENTS 0 #define DEFAULT_PRINCIPAL_SEQUENCE "human" #define FULL_INCLUSION 0 #define START_TRUNCATED 1 #define END_TRUNCATED 2 #define TRUNC_BOTH_SIDES 3 #define SINGLE_LANDMARK 1 #define BULK_LANDMARK 2 #define EXPLICIT_ORIGIN 1 #define FILED_ORIGINS 2 #define BOX_CODE 1 #define UNDERLINE_CODE 2 #define SINGLE_UNDERLINE 1 #define DOUBLE_UNDERLINE 2 #define SOLID_STYLE NULL #define DOTTED_STYLE "[1 1] 0" #define DASHED_STYLE "[3 2] 0" #define DDASH_STYLE "[5 2 1 2] 0" #define WHITE_SHADE 0.96 #define LIGHTGRAY_SHADE 0.9 #define GRAY_SHADE 0.7 #define DARKGRAY_SHADE 0.5 #define BLACK_SHADE 0.2 #define TOP_PLACE UP_LABEL #define BOTTOM_PLACE DOWN_LABEL #define DESCRIPTION 1 #define NO_DESCRIPTION 0 #define PORTRAIT_CODE 1 #define LANDSCAPE_CODE 2 #define TOP_LINE 1 #define INTERMEDIATE_LINE 2 #define BOTTOM_LINE 3 #define TEXT_LINE 0 #define ALL_LINES_CODE 0 #define NO_CONTENTS 0 #define TICKMARK_CODE 1 #define STRIPPED_TICK_CODE 2 #define ORIGIN_CODE 7 #define LANDMARK_NAME_CODE 8 #define LANDMARK_BIND_CODE 9 #define LINE_TEXT_CODE 11 #define REPEATED_TEXT_CODE 12 #define NO_BANNER 1 #define BANNER_CODE 2 #define NO_TRAILER 3 #define TRAILER_CODE 4 #define VERBATIM_CODE 1 #define PIVOT_CODE 3 #define ENTIRE_SEQUENCE_CODE 3 #define STARTED_CODE 5 #define ENDED_CODE 7 #define NO_OUTPUT 0 #define TEXT_OUTPUT 2 #define POSTSCRIPT_OUTPUT 4 #define ANY_LIST 0 #define ALIAS_LIST 1 #define FILE_LIST 2 #define MINIMAL_FONT 3 #define MAXIMAL_FONT 33 #define MAX_INVOCATION_PARAMETERS 15 #define TEXT_CODE 50 #define DESCRIPTION_CODE 51 #define COUNTER_CODE 52 #define STRICT_CODE 0 #define GENERAL_CODE 1 #define WILDCARD_CODE 2 #define DEFAULT_STRICTNESS_CODE STRICT_CODE /*****************************************************************************/ /* */ /* */ /*****************************************************************************/ typedef struct intlist_fields { /* Record in a list of integer numbers */ int number; struct intlist_fields *next; } IntList_Struct; typedef IntList_Struct *intlist_ptr; /* ... and pointer to it, convenience */ typedef struct seqover_fields { /* One record in list of overlapping seqs. */ int source_list; /* Indication whether the overlap was found as alias or... */ int seq_num; /* Number of the sequence with which overlap was found */ int overlap; /* Was the overlap full inclusion of range or just an overlap? */ long int seq_begin; /* Begining of the sequence with which overlap found */ long int seq_end; /* End of the sequence with which overlap was found */ struct seqover_fields *next; /* Next sequence with an overlap with range */ } SeqOver_Struct; typedef SeqOver_Struct *seqover_ptr; /* Pointer to the record; convenience */ typedef struct landmarkll_fields { /* Record in a list of established landm. */ int sequence; /* Number of sequence in which the landmark is set */ int truncation; /* Code indicating whether landmark is trimmed to fit range */ long int start; /* Starting position of the landmark in its sequence */ long int stop; /* Ending position of the landmark in its sequence */ char *reference; /* Reference code describing this landmark */ int mark_kind; /* Indication whether landmark should be boxed or underlined */ int mark_multiple; /* If underlined, indicates whether single or double */ int mark_number; /* If underlined, indicates in which sequence (number) */ char *mark_seq; /* If underlined, gives name of the sequence in which it is */ char *mark_style; /* Line style for underlining or box outline */ bool mark_shade; /* If mark is box, indicates whether with shaded interior */ float mark_intensity; /* If shaded box mark, how dark the shade is */ label_ptr label; /* Label (text and font) to be associated with landmark */ int label_place; /* Indication whether the label should be at top or bottom */ int label_position; /* Indication label aligned left, right or centered */ struct landmarkll_fields *next; /* Pointer to the next landmark record */ } LandmarkLL_Struct; typedef LandmarkLL_Struct *landmarkll_ptr; /* ... and pointer to it */ typedef struct originll_fields { /* Record in a list of established origins */ char *name; char *sequence; strlist_ptr aliases; char *species; long int position; long int from; long int to; struct originll_fields *next; } OriginLL_Struct; typedef OriginLL_Struct *originll_ptr; typedef struct descll_fields { int contents; int tick_distance; char *inline_text; int text_repeat; char *buffer; long int *counts; struct descll_fields *next; } DescLL_Struct; typedef DescLL_Struct *descll_ptr; typedef struct boxll_fields { /* Record describing a box in a list */ int sequence; int truncation; long int start; long int stop; char *style; bool shade; float intensity; label_ptr label; int label_place; int label_position; struct boxll_fields *next; } BoxLL_Struct; typedef BoxLL_Struct *boxll_ptr; typedef struct underll_fields { /* Record describing an underline in a list */ int kind; int sequence; int truncation; long int start; long int stop; char *style; label_ptr label; int label_place; int label_position; struct underll_fields *next; } UnderLL_Struct; typedef UnderLL_Struct *underll_ptr; typedef struct textll_fields { int banner; char *banner_font; int banner_font_size; long int adjustment; int layout; int pivot; int trailer; char *trailer_font; int trailer_font_size; int started; int ended; char *buffer; } TextLL_Struct; typedef TextLL_Struct *textll_ptr; typedef struct ibox_fields { /* Instantiated box record, absolute position */ long int position; int width; char *style; bool shade; float intensity; label_ptr label; int label_place; int label_position; struct ibox_fields *next; } Ibox_Struct; typedef Ibox_Struct *ibox_ptr; typedef struct iunder_fields { /* Instantiated underline record, abs pos. */ long int position; int width; int seq_num; int multiple; char *style; label_ptr label; int label_place; int label_position; struct iunder_fields *next; } Iunder_Struct; typedef Iunder_Struct *iunder_ptr; typedef struct displayll_fields { /* Record describing a line in the output */ int kind; int originating; long int banner; char *banner_font; int banner_font_size; char *trailer; char *trailer_font; int trailer_font_size; char *buffer; long int *counts; } DisplayLL_Struct; typedef DisplayLL_Struct *displayll_ptr; /*****************************************************************************/ /* */ /* */ /*****************************************************************************/ int VARS_Initialize (void); int CONT_Initialize (char *cl_file, bool cl_align_lock, int cl_align, bool cl_range_lock, long int cl_start, long int cl_stop, char *cl_range_seq, strlist_ptr cl_paths, char *requested_principal, strlist_ptr cl_landmarks, strlist_ptr cl_plains, strlist_ptr cl_origins, bool cl_info_lock, bool cl_info, bool cl_output_lock, int cl_output, bool cl_warnings); void CONT_Load_Command (char *file_name, char *seq_path, strlist_ptr aliases, int alignment, char *range_seq, long int start_range, long int stop_range); void CONT_Landmark_Definition (int landmark_kind, char *file_name, char *landmark_seq, char *origin, long int start, long int stop, int mark_kind, int underline_mult, char *mark_seq, char *mark_style, float mark_shade, label_ptr label, int place, int position, char *font, int font_size); void CONT_Annotations_Command (char *file_name, int counter, int mark_kind, int underline_mult, char *mark_style, float mark_shade, char *text, char *text_font, int text_size, int field, char *field_font, int field_size, int place, int position); void CONT_Origin_Definition (int source_of_origins, char *file_name, char *origin_name, long int position, char *sequence, long int from, long int to); void CONT_Description_Command (int description_code); void CONT_Page_Definition (int orientation, int size, int width, int spacing); void CONT_Box_Command (char *sequence, char *origin, long int start, long int stop, char *style, float shade, label_ptr label, int place, int position); void CONT_Underline_Command (int kind, char *sequence, char *origin, long int start, long int stop, char *style, label_ptr label, int place, int position); void CONT_Line_Definition (int line_kind, int line_number, int line_contents, int tick_distance, char *inline_text, int text_repeat, bool seq_disabled, int banner, char *banner_font, int banner_font_size, long int adjustment, int text_layout, int pivot, char *pivot_seq, int trailer, char *trailer_font, int trailer_font_size, int start_code, int end_code); void CONT_Font_Definition (int font_size); void CONT_Information_Command (bool content, int strictness); void CONT_Output_Definition (int output_code); int CONT_Exec (void); void CONT_Warning (char *report); int CONT_Error_Report (int severity, int code, char *ct_1, char *string_val, long int int_val, char *ct_2, int description, int annotation); void CONT_Error (int severity, int code, char *comment, int description); int LOAD_Initialize (void); int LOAD_Execute (char *alignment_file, char *sequences_path, strlist_ptr seq_aliases, int alignment_number, char *range_sequence, long int range_start, long int range_stop); seqover_ptr ALGN_Get_Sequence_In_Range (char *seq, long int from, long int to, int search_list); seqover_ptr ALGN_Find_Sequence (char *search_name, int search_list); char **ALGN_List_Names (void); strlist_ptr ALGN_Get_Aliases (char *sequence); char *ALGN_Get_Sequence (char *alias); long int ALGN_Principal_Convert (long int absolute); int RAWS_Initialize (void); int RAWS_Expand_Information (void); int RAWS_Expand_Landmarks (char *file_name, int mark_kind, int mark_multiple, char *mark_seq, char *mark_style, bool mark_shade, float mark_intensity, char *label_font, int font_size); int RAWS_Record_Landmark (char *sequence, char *origin, long int start, long int stop, int mark_kind, int mark_multiple, char *mark_seq, char *mark_style, bool mark_shade, float mark_intensity, label_ptr label, int label_place, int label_position); int RAWS_Expand_Annotations (char *file_name, int counter, int mark_kind, int mark_multiple, char *mark_style, bool mark_shade, float mark_intensity, char *text, char *text_font, int text_size, int field, char *field_font, int field_size, int place, int position); int RAWS_Expand_Origins (char *file_name, long int from, long int to); int RAWS_Record_Origin (char *name, long int position, char *sequence, long int from, long int to); int RAWS_Record_Box (char *sequence, char *origin, long int start, long int stop, char *style, bool shade, float intensity, label_ptr label, int label_place, int label_position); int RAWS_Record_Underline (int kind, char *sequence, char *origin, long int start, long int stop, char *style, label_ptr label, int label_place, int label_position); int RAWS_Top_Line (int number, int previous, int contents, int tick_distance, char *inline_text, int text_repeat); int RAWS_Intermediate_Line (int number, int previous, int contents, int tick_distance, char *inline_text, int text_repeat); int RAWS_Bottom_Line (int number, int previous, int contents, int tick_distance, char *inline_text, int text_repeat); int RAWS_Text_Line (int number, bool disabled, int banner, char *banner_font, int banner_font_size, long int adjustment, int layout, int pivot, char *pivot_sequence, int trailer, char *trailer_font, int trailer_font_size, int started, int ended); int RAWS_Execute (void); int PREP_Execute (void); void TEXT_Show (void); void POST_Show (void); bool UTIL_Is_Integer (char *string, int *result); bool UTIL_Is_Long (char *string, long int *result); strlist_ptr UTIL_Copy_Strlist (strlist_ptr list); strlist_ptr UTIL_Release_StrList (strlist_ptr list);