Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Z
zmap
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ensembl-gh-mirror
zmap
Commits
b75d7dbd
Commit
b75d7dbd
authored
20 years ago
by
edgrif
Browse files
Options
Downloads
Patches
Plain Diff
redo earlier changes overwritten by robs checkin.
parent
03da6eea
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/zmapFeature/zmapFeature.c
+16
-8
16 additions, 8 deletions
src/zmapFeature/zmapFeature.c
src/zmapFeature/zmapFeatureUtils.c
+15
-14
15 additions, 14 deletions
src/zmapFeature/zmapFeatureUtils.c
with
31 additions
and
22 deletions
src/zmapFeature/zmapFeature.c
+
16
−
8
View file @
b75d7dbd
...
...
@@ -27,9 +27,9 @@
*
* Exported functions: See zmapView_P.h
* HISTORY:
* Last edited: Nov 22 1
0
:1
2
2004 (edgrif)
* Last edited: Nov 22 1
8
:1
7
2004 (edgrif)
* Created: Fri Jul 16 13:05:58 2004 (edgrif)
* CVS info: $Id: zmapFeature.c,v 1.
9
2004-11-22
17:47:09
edgrif Exp $
* CVS info: $Id: zmapFeature.c,v 1.
10
2004-11-22
22:46:21
edgrif Exp $
*-------------------------------------------------------------------
*/
...
...
@@ -37,7 +37,11 @@
#include
<glib.h>
#include
<ZMap/zmapUtils.h>
#include
<ZMap/zmapFeature.h>
#ifdef ED_G_NEVER_INCLUDE_THIS_CODE
#include
<zmapView_P.h>
#endif
/* ED_G_NEVER_INCLUDE_THIS_CODE */
/*! @defgroup zmapfeatures zMapFeatures: feature handling for ZMap
...
...
@@ -95,12 +99,13 @@ static void printFeature(GQuark key_id, gpointer data, gpointer user_data) ;
* @param void None.
* @return ZMapFeature A pointer to the new ZMapFeature.
* */
ZMapFeature
zmapFeatureCreate
(
void
)
ZMapFeature
zmapFeatureCreate
Empty
(
void
)
{
ZMapFeature
feature
;
feature
=
g_new0
(
ZMapFeatureStruct
,
1
)
;
feature
->
id
=
ZMAPFEATUREID_NULL
;
feature
->
feature_id
=
ZMAPFEATURE_NULLQUARK
;
feature
->
db_id
=
ZMAPFEATUREID_NULL
;
feature
->
type
=
ZMAPFEATURE_INVALID
;
return
feature
;
...
...
@@ -114,7 +119,7 @@ ZMapFeature zmapFeatureCreate(void)
* NOTE that really we need this to be a polymorphic function so that the arguments
* are different for different features.
* */
gboolean
zmapFeatureAugmentData
(
ZMapFeature
feature
,
char
*
name
,
gboolean
zmapFeatureAugmentData
(
ZMapFeature
feature
,
char
*
feature_name_id
,
char
*
name
,
char
*
sequence
,
char
*
source
,
ZMapFeatureType
feature_type
,
int
start
,
int
end
,
double
score
,
ZMapStrand
strand
,
ZMapPhase
phase
,
...
...
@@ -124,11 +129,10 @@ gboolean zmapFeatureAugmentData(ZMapFeature feature, char *name,
zMapAssert
(
feature
)
;
/* Note we have hacked this up for now...in the end we should have a unique id for each feature
* but for now we will look at the type to determine if a feature is empty or not..... */
/* If its an empty feature then initialise... */
if
(
feature
->
type
==
ZMAPFEATURE_
INVALID
)
if
(
feature
->
feature_id
==
ZMAPFEATURE_
NULLQUARK
)
{
feature
->
feature_id
=
g_quark_from_string
(
feature_name_id
)
;
feature
->
name
=
g_strdup
(
name
)
;
feature
->
type
=
feature_type
;
feature
->
x1
=
start
;
...
...
@@ -458,7 +462,11 @@ static void doNewFeatureSets(GQuark key_id, gpointer data, gpointer user_data)
* work as part of a foreach loop....which is where this routine is called from... */
unused
=
g_datalist_id_remove_no_notify
(
&
(
new_feature_sets
),
key_id
)
;
#ifdef ED_G_NEVER_INCLUDE_THIS_CODE
printf
(
"stop here
\n
"
)
;
#endif
/* ED_G_NEVER_INCLUDE_THIS_CODE */
}
else
{
...
...
This diff is collapsed.
Click to expand it.
src/zmapFeature/zmapFeatureUtils.c
+
15
−
14
View file @
b75d7dbd
...
...
@@ -26,9 +26,9 @@
* 1
* Exported functions: See zmapFeature.h
* HISTORY:
* Last edited: Nov 22
14:46
2004 (edgrif)
* Last edited: Nov 22
21:39
2004 (edgrif)
* Created: Tue Nov 2 2004 (rnc)
* CVS info: $Id: zmapFeatureUtils.c,v 1.
1
2004-11-22
14
:4
8
:2
2
edgrif Exp $
* CVS info: $Id: zmapFeatureUtils.c,v 1.
2
2004-11-22
22
:4
6
:2
1
edgrif Exp $
*-------------------------------------------------------------------
*/
...
...
@@ -43,32 +43,33 @@ static gboolean printLine(GIOChannel *channel, gchar *line);
char
*
zmapLookUpEnum
(
int
id
,
int
enumType
)
char
*
zmap
Feature
LookUpEnum
(
int
id
,
int
enumType
)
{
/* These arrays must correspond 1:1 with the enums declared in zmapFeature.h */
static
char
*
types
[
8
]
=
{
"BASIC"
,
"HOMOL"
,
"EXON"
,
"INTRON"
,
"TRANSCRIPT"
,
"VARIATION"
,
"BOUNDARY"
,
"SEQUENCE"
}
;
static
char
*
strands
[
3
]
=
{
"ZMAPSTRAND_NONE"
,
"ZMAPSTRAND_DOWN"
,
"ZMAPSTRAND_UP"
};
static
char
*
phases
[
4
]
=
{
"ZMAPPHASE_NONE"
,
"ZMAPPHASE_0"
,
"ZMAPPHASE_1"
,
"ZMAPPHASE_2"
};
char
*
enum_str
=
NULL
;
zMapAssert
(
enumType
==
TYPE_ENUM
||
enumType
==
STRAND_ENUM
||
enumType
==
PHASE_ENUM
)
;
switch
(
enumType
)
{
case
TYPE_ENUM
:
return
types
[
id
];
enum_str
=
types
[
id
];
break
;
case
STRAND_ENUM
:
return
strands
[
id
];
enum_str
=
strands
[
id
];
break
;
case
PHASE_ENUM
:
return
phases
[
id
];
enum_str
=
phases
[
id
];
break
;
}
default:
break
;
}
return
NULL
;
return
enum_str
;
}
char
*
zMapFeatureCreateID
(
ZMapFeatureType
feature_type
,
char
*
feature_name
,
...
...
@@ -228,12 +229,12 @@ static void featureDump_TD(GQuark key_id, gpointer data, gpointer user_data)
if
(
feature
)
{
line
=
g_string_sized_new
(
150
);
type
=
zmapLookUpEnum
(
feature
->
type
,
TYPE_ENUM
);
strand
=
zmapLookUpEnum
(
feature
->
strand
,
STRAND_ENUM
);
phase
=
zmapLookUpEnum
(
feature
->
phase
,
PHASE_ENUM
);
type
=
zmap
Feature
LookUpEnum
(
feature
->
type
,
TYPE_ENUM
);
strand
=
zmap
Feature
LookUpEnum
(
feature
->
strand
,
STRAND_ENUM
);
phase
=
zmap
Feature
LookUpEnum
(
feature
->
phase
,
PHASE_ENUM
);
g_string_printf
(
line
,
"%d
\t
%s
\t
%s
\t
%d
\t
%d
\t
%d
\t
%s
\t
%s
\t
%s
\t
%f"
,
feature
->
id
,
feature
->
db_
id
,
feature
->
name
,
type
,
feature
->
x1
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment