diff --git a/src/include/ZMap/zmapStyle.h b/src/include/ZMap/zmapStyle.h index 09d09a13efe77d7ac9e54dd247bd23fdf78c7726..c2dc3cd88507c963a44c121fac61a0f19a2e0d38 100755 --- a/src/include/ZMap/zmapStyle.h +++ b/src/include/ZMap/zmapStyle.h @@ -26,9 +26,9 @@ * Description: Style and Style set handling functions. * * HISTORY: - * Last edited: Mar 5 11:24 2008 (edgrif) + * Last edited: Mar 31 14:26 2008 (edgrif) * Created: Mon Feb 26 09:28:26 2007 (edgrif) - * CVS info: $Id: zmapStyle.h,v 1.18 2008-03-05 11:33:23 edgrif Exp $ + * CVS info: $Id: zmapStyle.h,v 1.19 2008-04-01 13:04:58 edgrif Exp $ *------------------------------------------------------------------- */ #ifndef ZMAP_STYLE_H @@ -203,12 +203,7 @@ void zMapStyleSetGFF(ZMapFeatureTypeStyle style, char *gff_source, char *gff_fea char *zMapStyleGetGFFSource(ZMapFeatureTypeStyle style) ; char *zMapStyleGetGFFFeature(ZMapFeatureTypeStyle style) ; -unsigned int zmapStyleGetWithinAlignError(ZMapFeatureTypeStyle style) ; -gboolean zMapStyleIsParseGaps(ZMapFeatureTypeStyle style) ; gboolean zMapStyleIsDirectionalEnd(ZMapFeatureTypeStyle style) ; -gboolean zMapStyleIsAlignGaps(ZMapFeatureTypeStyle style) ; -void zMapStyleSetAlignGaps(ZMapFeatureTypeStyle style, gboolean show_gaps) ; - void zMapStyleSetDisplayable(ZMapFeatureTypeStyle style, gboolean displayable) ; gboolean zMapStyleIsDisplayable(ZMapFeatureTypeStyle style) ; @@ -266,12 +261,19 @@ void zMapStyleGetStrandAttrs(ZMapFeatureTypeStyle type, gboolean *strand_specific, gboolean *frame_specific, gboolean *show_rev_strand, gboolean *show_as_3_frame) ; void zMapStyleSetEndStyle(ZMapFeatureTypeStyle style, gboolean directional) ; -void zMapStyleSetGappedAligns(ZMapFeatureTypeStyle style, gboolean show_gaps, gboolean parse_gaps, - unsigned int within_align_error) ; + +void zMapStyleSetGappedAligns(ZMapFeatureTypeStyle style, gboolean parse_gaps, unsigned int within_align_error) ; gboolean zMapStyleGetGappedAligns(ZMapFeatureTypeStyle style, unsigned int *within_align_error) ; -void zMapStyleSetJoinAligns(ZMapFeatureTypeStyle style, gboolean join_aligns, unsigned int between_align_error) ; +void zMapStyleSetJoinAligns(ZMapFeatureTypeStyle style, unsigned int between_align_error) ; gboolean zMapStyleGetJoinAligns(ZMapFeatureTypeStyle style, unsigned int *between_align_error) ; gboolean zMapStyleGetParseGaps(ZMapFeatureTypeStyle style) ; +unsigned int zmapStyleGetWithinAlignError(ZMapFeatureTypeStyle style) ; +gboolean zMapStyleIsParseGaps(ZMapFeatureTypeStyle style) ; +gboolean zMapStyleIsAlignGaps(ZMapFeatureTypeStyle style) ; +void zMapStyleSetAlignGaps(ZMapFeatureTypeStyle style, gboolean show_gaps) ; + + + void zMapStyleSetGlyphMode(ZMapFeatureTypeStyle style, ZMapStyleGlyphMode glyph_mode) ; diff --git a/src/zmapFeature/zmapFeatureTypes.c b/src/zmapFeature/zmapFeatureTypes.c index e0c03bcd2b21000f72e1ac5ccbd9879ff302bc96..f7ab6713e6f1a6c2d898d3d2c6a1fa1485716cb1 100755 --- a/src/zmapFeature/zmapFeatureTypes.c +++ b/src/zmapFeature/zmapFeatureTypes.c @@ -27,9 +27,9 @@ * * Exported functions: See ZMap/zmapFeature.h * HISTORY: - * Last edited: Mar 5 10:30 2008 (edgrif) + * Last edited: Apr 1 14:02 2008 (edgrif) * Created: Tue Dec 14 13:15:11 2004 (edgrif) - * CVS info: $Id: zmapFeatureTypes.c,v 1.60 2008-03-05 10:30:51 edgrif Exp $ + * CVS info: $Id: zmapFeatureTypes.c,v 1.61 2008-04-01 13:04:58 edgrif Exp $ *------------------------------------------------------------------- */ @@ -569,7 +569,6 @@ void zMapStylePrint(ZMapFeatureTypeStyle style, char *prefix) ZMAPSTYLEPRINTOPT(style->opts.showText, showText) ; ZMAPSTYLEPRINTOPT(style->opts.parse_gaps, parse_gaps) ; ZMAPSTYLEPRINTOPT(style->opts.align_gaps, align_gaps) ; - ZMAPSTYLEPRINTOPT(style->opts.join_aligns, join_aligns) ; ZMAPSTYLEPRINTOPT(style->opts.strand_specific, strand_specific) ; ZMAPSTYLEPRINTOPT(style->opts.show_rev_strand, show_rev_strand) ; ZMAPSTYLEPRINTOPT(style->opts.frame_specific, frame_specific) ; @@ -1379,7 +1378,6 @@ GData *zMapFeatureTypeGetFromFile(char *styles_file_name) /* Not good to hard code the TRUE here, but I guess blixem requires the gaps array. */ zMapStyleSetGappedAligns(new_type, zMapConfigGetElementBool(next_styles, "gapped_align"), - TRUE, zMapConfigGetElementBool(next_styles, "gapped_error")) ; if (zMapConfigGetElementBool(next_styles, "hidden_init")) diff --git a/src/zmapFeature/zmapStyle.c b/src/zmapFeature/zmapStyle.c index 4d2b5ecc8d8e37fd4cd59ffdc977280373fdd645..8c93edf46e2eb8093bdaecdbb6c00048939b31c5 100755 --- a/src/zmapFeature/zmapStyle.c +++ b/src/zmapFeature/zmapStyle.c @@ -28,9 +28,9 @@ * * Exported functions: See ZMap/zmapStyle.h * HISTORY: - * Last edited: Mar 5 10:33 2008 (edgrif) + * Last edited: Mar 31 14:28 2008 (edgrif) * Created: Mon Feb 26 09:12:18 2007 (edgrif) - * CVS info: $Id: zmapStyle.c,v 1.9 2008-03-05 10:34:23 edgrif Exp $ + * CVS info: $Id: zmapStyle.c,v 1.10 2008-04-01 13:04:58 edgrif Exp $ *------------------------------------------------------------------- */ @@ -932,7 +932,6 @@ gboolean zMapStyleIsAlignGaps(ZMapFeatureTypeStyle style) return style->opts.align_gaps ; } - void zMapStyleSetAlignGaps(ZMapFeatureTypeStyle style, gboolean show_gaps) { zMapAssert(style) ; @@ -943,12 +942,13 @@ void zMapStyleSetAlignGaps(ZMapFeatureTypeStyle style, gboolean show_gaps) } -void zMapStyleSetGappedAligns(ZMapFeatureTypeStyle style, gboolean show_gaps, gboolean parse_gaps, + + +void zMapStyleSetGappedAligns(ZMapFeatureTypeStyle style, gboolean parse_gaps, unsigned int within_align_error) { zMapAssert(style); - style->opts.align_gaps = show_gaps ; style->opts.parse_gaps = parse_gaps ; style->mode_data.alignment.within_align_error = within_align_error ; style->mode_data.alignment.fields_set.within_align_error = TRUE ; @@ -959,23 +959,27 @@ void zMapStyleSetGappedAligns(ZMapFeatureTypeStyle style, gboolean show_gaps, gb gboolean zMapStyleGetGappedAligns(ZMapFeatureTypeStyle style, unsigned int *within_align_error) { - zMapAssert(style); + gboolean result = FALSE ; - if (style->opts.align_gaps && within_align_error) - *within_align_error = style->mode_data.alignment.within_align_error ; + zMapAssert(style && within_align_error) ; - return style->opts.align_gaps ; + if (style->mode_data.alignment.fields_set.within_align_error && within_align_error) + { + *within_align_error = style->mode_data.alignment.within_align_error ; + result = TRUE ; + } + + return result ; } -void zMapStyleSetJoinAligns(ZMapFeatureTypeStyle style, gboolean join_aligns, unsigned int between_align_error) +void zMapStyleSetJoinAligns(ZMapFeatureTypeStyle style, unsigned int between_align_error) { zMapAssert(style); - style->opts.join_aligns = join_aligns ; style->mode_data.alignment.between_align_error = between_align_error ; style->mode_data.alignment.fields_set.between_align_error = TRUE ; @@ -987,12 +991,17 @@ void zMapStyleSetJoinAligns(ZMapFeatureTypeStyle style, gboolean join_aligns, un * otherwise returns FALSE. */ gboolean zMapStyleGetJoinAligns(ZMapFeatureTypeStyle style, unsigned int *between_align_error) { + gboolean result = FALSE ; + zMapAssert(style); - if (style->opts.join_aligns) - *between_align_error = style->mode_data.alignment.between_align_error ; + if (style->mode_data.alignment.fields_set.between_align_error) + { + *between_align_error = style->mode_data.alignment.between_align_error ; + result = TRUE ; + } - return style->opts.join_aligns ; + return result ; } diff --git a/src/zmapFeature/zmapStyle_P.h b/src/zmapFeature/zmapStyle_P.h index c8f3d5f74c9a159504129b5f5be828e701b46217..8a5d8c1adf70b640786fdf652be969c0b1cea1ce 100755 --- a/src/zmapFeature/zmapStyle_P.h +++ b/src/zmapFeature/zmapStyle_P.h @@ -26,9 +26,9 @@ * Description: Private header for style. * * HISTORY: - * Last edited: Mar 5 10:31 2008 (edgrif) + * Last edited: Apr 1 14:03 2008 (edgrif) * Created: Mon Feb 26 09:13:30 2007 (edgrif) - * CVS info: $Id: zmapStyle_P.h,v 1.8 2008-03-05 10:32:06 edgrif Exp $ + * CVS info: $Id: zmapStyle_P.h,v 1.9 2008-04-01 13:04:58 edgrif Exp $ *------------------------------------------------------------------- */ #ifndef ZMAP_STYLE_P_H @@ -299,10 +299,6 @@ typedef struct ZMapFeatureTypeStyleStruct_ unsigned int parse_gaps : 1 ; unsigned int align_gaps : 1 ; /*!< TRUE: gaps within alignment are displayed, FALSE: alignment is displayed as a single block. */ - unsigned int join_aligns : 1 ; /*!< TRUE: joins aligns if between_align_error not exceeded, - FALSE: does not joing aligns. */ - - /*! These are all linked, if strand_specific is FALSE, then so are * frame_specific and show_rev_strand. */