From c0265db4a5d30effbbe9fa8fe89b581d29cfafef Mon Sep 17 00:00:00 2001 From: edgrif <edgrif> Date: Wed, 14 Jul 2004 13:07:42 +0000 Subject: [PATCH] Add parent length and name to feature context, required for mapping --- src/include/ZMap/zmapFeature.h | 7 +++++-- src/zmapGFF/zmapGFF2parser.c | 11 +++++++---- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/include/ZMap/zmapFeature.h b/src/include/ZMap/zmapFeature.h index 821baffaa..ea66145b5 100755 --- a/src/include/ZMap/zmapFeature.h +++ b/src/include/ZMap/zmapFeature.h @@ -25,9 +25,9 @@ * Description: Data structures describing a genetic feature. * * HISTORY: - * Last edited: Jul 14 10:53 2004 (edgrif) + * Last edited: Jul 14 14:01 2004 (edgrif) * Created: Fri Jun 11 08:37:19 2004 (edgrif) - * CVS info: $Id: zmapFeature.h,v 1.5 2004-07-14 12:54:31 edgrif Exp $ + * CVS info: $Id: zmapFeature.h,v 1.6 2004-07-14 13:07:42 edgrif Exp $ *------------------------------------------------------------------- */ #ifndef ZMAP_FEATURE_H @@ -221,6 +221,9 @@ typedef struct ZMapFeatureSetStruct_ typedef struct ZMapFeatureContextStruct_ { char *sequence ; /* The sequence to be displayed. */ + char *parent ; /* Name of parent, not be needed ? */ + int parent_length ; /* Length in bases of parent. */ + ZMapMapBlockStruct sequence_to_parent ; /* Shows how this sequence maps to its ultimate parent. */ ZMapMapBlockStruct features_to_sequence ; /* Shows how these features map to the diff --git a/src/zmapGFF/zmapGFF2parser.c b/src/zmapGFF/zmapGFF2parser.c index 35ba96552..3c7b0630b 100755 --- a/src/zmapGFF/zmapGFF2parser.c +++ b/src/zmapGFF/zmapGFF2parser.c @@ -26,9 +26,9 @@ * * Exported functions: See ZMap/zmapGFF.h * HISTORY: - * Last edited: Jul 14 11:45 2004 (edgrif) + * Last edited: Jul 14 14:04 2004 (edgrif) * Created: Fri May 28 14:25:12 2004 (edgrif) - * CVS info: $Id: zmapGFF2parser.c,v 1.7 2004-07-14 12:53:44 edgrif Exp $ + * CVS info: $Id: zmapGFF2parser.c,v 1.8 2004-07-14 13:07:42 edgrif Exp $ *------------------------------------------------------------------- */ @@ -228,12 +228,12 @@ ZMapFeatureContext zmapGFFGetFeatures(ZMapGFFParser parser) * We assume that we only ask for complete clones.... * */ { - int tmp_start = 100000 ; + int tmp_pad = 100000 ; int clone_length = parser->features_end - parser->features_start + 1 ; feature_context->sequence_to_parent.c1 = parser->features_start ; feature_context->sequence_to_parent.c2 = parser->features_end ; - feature_context->sequence_to_parent.p1 = tmp_start ; + feature_context->sequence_to_parent.p1 = tmp_pad ; feature_context->sequence_to_parent.p2 = feature_context->sequence_to_parent.p1 + clone_length ; @@ -241,6 +241,9 @@ ZMapFeatureContext zmapGFFGetFeatures(ZMapGFFParser parser) feature_context->features_to_sequence.p2 = parser->features_end ; feature_context->features_to_sequence.c1 = parser->features_start ; feature_context->features_to_sequence.c2 = parser->features_end ; + + feature_context->parent_length = feature_context->sequence_to_parent.p2 + tmp_pad ; + feature_context->parent = "chromsome_99" ; } g_datalist_init(&(feature_context->features)) ; -- GitLab