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
bb3a7a34
Commit
bb3a7a34
authored
19 years ago
by
edgrif
Browse files
Options
Downloads
Patches
Plain Diff
use new feature to string convertors.
parent
5da30a44
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/zmapWindow/zmapWindowFeatureList.c
+19
-46
19 additions, 46 deletions
src/zmapWindow/zmapWindowFeatureList.c
src/zmapWindow/zmapWindowItem.c
+4
-4
4 additions, 4 deletions
src/zmapWindow/zmapWindowItem.c
with
23 additions
and
50 deletions
src/zmapWindow/zmapWindowFeatureList.c
+
19
−
46
View file @
bb3a7a34
...
...
@@ -27,9 +27,9 @@
*
* Exported functions: See XXXXXXXXXXXXX.h
* HISTORY:
* Last edited:
Oct 6 16:1
5 200
5
(
rds
)
* Last edited:
Feb 17 13:5
5 200
6
(
edgrif
)
* Created: Tue Sep 27 13:06:09 2005 (rds)
* CVS info: $Id: zmapWindowFeatureList.c,v 1.
4
200
5-10-0
7 1
0
:56:
16 rds
Exp $
* CVS info: $Id: zmapWindowFeatureList.c,v 1.
5
200
6-02-1
7 1
3
:56:
35 edgrif
Exp $
*-------------------------------------------------------------------
*/
...
...
@@ -53,7 +53,7 @@ static gint sortByFunc (GtkTreeModel *model,
GtkTreeIter
*
a
,
GtkTreeIter
*
b
,
gpointer
userdata
);
static
char
*
featureLookUpEnum
(
int
id
,
int
enumType
);
static
void
addFeatureItemToStore
(
GtkTreeModel
*
treeModel
,
ZMapFeature
feature
,
...
...
@@ -278,16 +278,20 @@ static void addFeatureItemToStore(GtkTreeModel *treeModel,
case
ITEM_FEATURE_PARENT
:
gtk_tree_store_append
(
store
,
&
append
,
parent
);
appended
=
TRUE
;
gtk_tree_store_set
(
store
,
&
append
,
ZMAP_WINDOW_LIST_COL_NAME
,
(
char
*
)
g_quark_to_string
(
feature
->
original_id
),
ZMAP_WINDOW_LIST_COL_START
,
feature
->
x1
,
ZMAP_WINDOW_LIST_COL_END
,
feature
->
x2
,
ZMAP_WINDOW_LIST_COL_SCORE
,
feature
->
score
,
ZMAP_WINDOW_LIST_COL_TYPE
,
zMapFeatureType2Str
(
feature
->
type
),
-
1
);
if
(
descend
&&
FOO_IS_CANVAS_GROUP
(
item
))
{
GList
*
children
=
NULL
;
FooCanvasGroup
*
grp
=
FOO_CANVAS_GROUP
(
item
);
children
=
grp
->
item_list
;
while
(
children
)
{
...
...
@@ -300,13 +304,16 @@ static void addFeatureItemToStore(GtkTreeModel *treeModel,
case
ITEM_FEATURE_CHILD
:
{
ZMapWindowItemFeature
subfeature
;
subfeature
=
(
ZMapWindowItemFeature
)
g_object_get_data
(
G_OBJECT
(
item
),
"item_subfeature_data"
)
;
gtk_tree_store_append
(
store
,
&
append
,
parent
);
appended
=
TRUE
;
gtk_tree_store_set
(
store
,
&
append
,
ZMAP_WINDOW_LIST_COL_START
,
subfeature
->
start
,
ZMAP_WINDOW_LIST_COL_END
,
subfeature
->
end
,
ZMAP_WINDOW_LIST_COL_END
,
subfeature
->
end
,
ZMAP_WINDOW_LIST_COL_TYPE
,
zMapFeatureSubPart2Str
(
subfeature
->
subpart
),
-
1
);
}
break
;
...
...
@@ -317,9 +324,8 @@ static void addFeatureItemToStore(GtkTreeModel *treeModel,
if
(
appended
)
gtk_tree_store_set
(
store
,
&
append
,
ZMAP_WINDOW_LIST_COL_STRAND
,
featureLookUpEnum
(
feature
->
strand
,
STRAND_ENUM
),
ZMAP_WINDOW_LIST_COL_TYPE
,
featureLookUpEnum
(
feature
->
type
,
TYPE_ENUM
),
ZMAP_WINDOW_LIST_COL_PHASE
,
featureLookUpEnum
(
feature
->
phase
,
PHASE_ENUM
),
ZMAP_WINDOW_LIST_COL_STRAND
,
zMapFeatureStrand2Str
(
feature
->
strand
),
ZMAP_WINDOW_LIST_COL_PHASE
,
zMapFeaturePhase2Str
(
feature
->
phase
),
ZMAP_WINDOW_LIST_COL_FEATURE_TYPE
,
zMapStyleGetName
(
zMapFeatureGetStyle
(
feature
)),
ZMAP_WINDOW_LIST_COL_FEATURE_ITEM
,
item
,
-
1
)
;
...
...
@@ -333,11 +339,11 @@ static void addFeatureItemToStore(GtkTreeModel *treeModel,
gtk_list_store_append
(
store
,
&
append
);
gtk_list_store_set
(
store
,
&
append
,
ZMAP_WINDOW_LIST_COL_NAME
,
(
char
*
)
g_quark_to_string
(
feature
->
original_id
),
ZMAP_WINDOW_LIST_COL_STRAND
,
f
eature
LookUpEnum
(
feature
->
strand
,
STRAND_ENUM
),
ZMAP_WINDOW_LIST_COL_STRAND
,
zMapF
eature
Strand2Str
(
feature
->
strand
),
ZMAP_WINDOW_LIST_COL_START
,
feature
->
x1
,
ZMAP_WINDOW_LIST_COL_END
,
feature
->
x2
,
ZMAP_WINDOW_LIST_COL_TYPE
,
f
eature
LookUpEnum
(
feature
->
type
,
TYPE_ENUM
),
ZMAP_WINDOW_LIST_COL_PHASE
,
f
eature
LookUpEnum
(
feature
->
phase
,
PHASE_ENUM
),
ZMAP_WINDOW_LIST_COL_TYPE
,
zMapF
eature
Type2Str
(
feature
->
type
),
ZMAP_WINDOW_LIST_COL_PHASE
,
zMapF
eature
Phase2Str
(
feature
->
phase
),
ZMAP_WINDOW_LIST_COL_SCORE
,
feature
->
score
,
ZMAP_WINDOW_LIST_COL_FEATURE_TYPE
,
zMapStyleGetName
(
zMapFeatureGetStyle
(
feature
)),
ZMAP_WINDOW_LIST_COL_FEATURE_ITEM
,
item
,
...
...
@@ -346,8 +352,11 @@ static void addFeatureItemToStore(GtkTreeModel *treeModel,
ZMAP_WINDOW_LIST_COL_SORT_STRAND
,
feature
->
strand
,
-
1
)
;
}
return
;
}
/** \Brief To sort the column
*/
static
gint
sortByFunc
(
GtkTreeModel
*
model
,
...
...
@@ -418,39 +427,3 @@ static gint sortByFunc (GtkTreeModel *model,
return
answer
;
}
static
char
*
featureLookUpEnum
(
int
id
,
int
enumType
)
{
/* These arrays must correspond 1:1 with the enums declared in zmapFeature.h */
static
char
*
types
[]
=
{
"Basic"
,
"Homology"
,
"Exon"
,
"Intron"
,
"Transcript"
,
"Variation"
,
"Boundary"
,
"Sequence"
}
;
static
char
*
strands
[]
=
{
"."
,
"Forward"
,
"Reverse"
}
;
static
char
*
phases
[]
=
{
"NONE"
,
"0"
,
"1"
,
"2"
}
;
static
char
*
homolTypes
[]
=
{
"dna"
,
"protein"
,
"translated"
}
;
char
*
enum_str
=
NULL
;
zMapAssert
(
enumType
==
TYPE_ENUM
||
enumType
==
STRAND_ENUM
||
enumType
==
PHASE_ENUM
||
enumType
==
HOMOLTYPE_ENUM
)
;
switch
(
enumType
)
{
case
TYPE_ENUM
:
enum_str
=
types
[
id
];
break
;
case
STRAND_ENUM
:
enum_str
=
strands
[
id
];
break
;
case
PHASE_ENUM
:
enum_str
=
phases
[
id
];
break
;
case
HOMOLTYPE_ENUM
:
enum_str
=
homolTypes
[
id
];
break
;
default:
break
;
}
return
enum_str
;
}
This diff is collapsed.
Click to expand it.
src/zmapWindow/zmapWindowItem.c
+
4
−
4
View file @
bb3a7a34
...
...
@@ -26,9 +26,9 @@
*
* Exported functions: See zmapWindow_P.h
* HISTORY:
* Last edited:
Jan 24
1
0
:5
2
2006 (edgrif)
* Last edited:
Feb 17
1
3
:5
7
2006 (edgrif)
* Created: Thu Sep 8 10:37:24 2005 (edgrif)
* CVS info: $Id: zmapWindowItem.c,v 1.1
1
2006-0
1-24 14:23:28
edgrif Exp $
* CVS info: $Id: zmapWindowItem.c,v 1.1
2
2006-0
2-17 13:57:45
edgrif Exp $
*-------------------------------------------------------------------
*/
...
...
@@ -472,6 +472,7 @@ gboolean zMapWindowScrollToItem(ZMapWindow window, FooCanvasItem *item)
}
void
zmapWindowShowItem
(
FooCanvasItem
*
item
)
{
ZMapFeature
feature
;
...
...
@@ -492,7 +493,7 @@ void zmapWindowShowItem(FooCanvasItem *item)
"Name: %s, type: %s, style: %s, x1: %d, x2: %d, "
"item_x1: %d, item_x1: %d
\n
"
,
(
char
*
)
g_quark_to_string
(
feature
->
original_id
),
z
m
apFeature
LookUpEnum
(
feature
->
type
,
TYPE_ENUM
),
z
M
apFeature
Type2Str
(
feature
->
type
),
zMapStyleGetName
(
zMapFeatureGetStyle
(
feature
)),
feature
->
x1
,
feature
->
x2
,
...
...
@@ -904,7 +905,6 @@ static void checkScrollRegion(ZMapWindow window, double start, double end)
vis_change
.
zoom_status
=
zMapWindowGetZoomStatus
(
window
)
;
vis_change
.
scrollable_top
=
y1
;
vis_change
.
scrollable_bot
=
y2
;
vis_change
.
strand
=
window
->
context_strand
;
(
*
(
window
->
caller_cbs
->
visibilityChange
))(
window
,
window
->
app_data
,
(
void
*
)
&
vis_change
)
;
}
...
...
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