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
035b828e
Commit
035b828e
authored
14 years ago
by
edgrif
Browse files
Options
Downloads
Patches
Plain Diff
add code to feature highlight func. to allow highlighting of subpart of a feature (e.g. exon).
parent
3bed41c6
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/items/zmapWindowSequenceFeature.c
+43
-14
43 additions, 14 deletions
src/zmapWindow/items/zmapWindowSequenceFeature.c
src/zmapWindow/items/zmapWindowSequenceFeature.h
+6
-3
6 additions, 3 deletions
src/zmapWindow/items/zmapWindowSequenceFeature.h
with
49 additions
and
17 deletions
src/zmapWindow/items/zmapWindowSequenceFeature.c
+
43
−
14
View file @
035b828e
...
@@ -30,9 +30,9 @@
...
@@ -30,9 +30,9 @@
*
*
* Exported functions: See zmapWindowSequenceFeature.h
* Exported functions: See zmapWindowSequenceFeature.h
* HISTORY:
* HISTORY:
* Last edited:
Jul 29 11:1
5 2010 (edgrif)
* Last edited:
Aug 18 10:0
5 2010 (edgrif)
* Created: Fri Jun 12 10:01:17 2009 (rds)
* Created: Fri Jun 12 10:01:17 2009 (rds)
* CVS info: $Id: zmapWindowSequenceFeature.c,v 1.1
3
2010-0
7-29 10:17:37
edgrif Exp $
* CVS info: $Id: zmapWindowSequenceFeature.c,v 1.1
4
2010-0
8-18 09:24:51
edgrif Exp $
*-------------------------------------------------------------------
*-------------------------------------------------------------------
*/
*/
...
@@ -192,18 +192,23 @@ GType zMapWindowSequenceFeatureGetType(void)
...
@@ -192,18 +192,23 @@ GType zMapWindowSequenceFeatureGetType(void)
/* Highlight sequence corresponding to supplied feature, frame is needed for */
/* Highlight sequence corresponding to supplied feature, frame is needed for */
gboolean
zMapWindowSequenceFeatureSelectByFeature
(
ZMapWindowSequenceFeature
sequence_feature
,
gboolean
zMapWindowSequenceFeatureSelectByFeature
(
ZMapWindowSequenceFeature
sequence_feature
,
ZMapFeature
seed_feature
)
FooCanvasItem
*
item
,
ZMapFeature
seed_feature
)
{
{
FooCanvasGroup
*
sequence_group
;
FooCanvasGroup
*
sequence_group
;
GList
*
list
;
GList
*
list
;
gboolean
result
=
TRUE
;
gboolean
result
=
TRUE
;
ZMapWindowCanvasItem
canvas_item
;
ZMapWindowCanvasItem
canvas_item
;
ZMapFeature
feature
;
ZMapFeature
feature
;
gboolean
sub_part
;
sequence_group
=
FOO_CANVAS_GROUP
(
sequence_feature
)
;
sequence_group
=
FOO_CANVAS_GROUP
(
sequence_feature
)
;
canvas_item
=
ZMAP_CANVAS_ITEM
(
sequence_feature
)
;
canvas_item
=
ZMAP_CANVAS_ITEM
(
sequence_feature
)
;
feature
=
canvas_item
->
feature
;
feature
=
canvas_item
->
feature
;
/* Is the given item a sub-part of a feature or the whole feature ? */
sub_part
=
zMapWindowCanvasItemIsSubPart
(
item
)
;
if
((
list
=
sequence_group
->
item_list
))
if
((
list
=
sequence_group
->
item_list
))
{
{
do
do
...
@@ -219,18 +224,20 @@ gboolean zMapWindowSequenceFeatureSelectByFeature(ZMapWindowSequenceFeature sequ
...
@@ -219,18 +224,20 @@ gboolean zMapWindowSequenceFeatureSelectByFeature(ZMapWindowSequenceFeature sequ
ZMapFullExon
current_exon
;
ZMapFullExon
current_exon
;
gboolean
deselect
,
event
;
gboolean
deselect
,
event
;
feature_exons_world2canvas_text
(
seed_feature
,
TRUE
,
NULL
,
&
exon_list
);
deselect
=
TRUE
;
/* 1st time deselect any existing highlight. */
deselect
=
TRUE
;
/* 1st time deselect any existing
highlight. */
event
=
FALSE
;
event
=
FALSE
;
exon_list_member
=
g_list_first
(
exon_list
);
feature_exons_world2canvas_text
(
seed_feature
,
TRUE
,
NULL
,
&
exon_list
)
;
do
if
(
sub_part
)
{
{
ZMapFeatureSubPartSpan
span
;
int
start
,
end
;
int
start
,
end
;
current_exon
=
(
ZMapFullExon
)(
exon_list_member
->
data
)
;
span
=
zMapWindowCanvasItemIntervalGetData
(
item
)
;
current_exon
=
(
ZMapFullExon
)(
g_list_nth_data
(
exon_list
,
span
->
index
-
1
))
;
start
=
current_exon
->
exon_span
.
x1
;
start
=
current_exon
->
exon_span
.
x1
;
end
=
current_exon
->
exon_span
.
x2
;
end
=
current_exon
->
exon_span
.
x2
;
...
@@ -241,16 +248,38 @@ gboolean zMapWindowSequenceFeatureSelectByFeature(ZMapWindowSequenceFeature sequ
...
@@ -241,16 +248,38 @@ gboolean zMapWindowSequenceFeatureSelectByFeature(ZMapWindowSequenceFeature sequ
zMapWindowTextItemSelect
(
text_item
,
zMapWindowTextItemSelect
(
text_item
,
start
,
end
,
start
,
end
,
deselect
,
deselect
)
;
deselect
,
deselect
)
;
}
else
{
exon_list_member
=
g_list_first
(
exon_list
);
do
{
int
start
,
end
;
current_exon
=
(
ZMapFullExon
)(
exon_list_member
->
data
)
;
start
=
current_exon
->
exon_span
.
x1
;
end
=
current_exon
->
exon_span
.
x2
;
if
(
feature
->
type
==
ZMAPSTYLE_MODE_PEP_SEQUENCE
)
coordsDNA2Pep
(
feature
,
&
start
,
&
end
)
;
zMapWindowTextItemSelect
(
text_item
,
start
,
end
,
deselect
,
deselect
)
;
deselect
=
FALSE
;
}
while
((
exon_list_member
=
g_list_next
(
exon_list_member
)));
deselect
=
FALSE
;
}
}
while
((
exon_list_member
=
g_list_next
(
exon_list_member
)));
/* Free exons...?? */
/* Tidy up. */
g_list_foreach
(
exon_list
,
exonListFree
,
NULL
)
;
g_list_foreach
(
exon_list
,
exonListFree
,
NULL
)
;
g_list_free
(
exon_list
)
;
g_list_free
(
exon_list
)
;
break
;
break
;
}
}
...
...
This diff is collapsed.
Click to expand it.
src/zmapWindow/items/zmapWindowSequenceFeature.h
+
6
−
3
View file @
035b828e
...
@@ -29,9 +29,9 @@
...
@@ -29,9 +29,9 @@
* highlighting.
* highlighting.
*
*
* HISTORY:
* HISTORY:
* Last edited:
Jul 27 09:10
2010 (edgrif)
* Last edited:
Aug 17 13:55
2010 (edgrif)
* Created: Wed Dec 3 08:44:06 2008 (rds)
* Created: Wed Dec 3 08:44:06 2008 (rds)
* CVS info: $Id: zmapWindowSequenceFeature.h,v 1.1
0
2010-0
7-29 10:17:37
edgrif Exp $
* CVS info: $Id: zmapWindowSequenceFeature.h,v 1.1
1
2010-0
8-18 09:24:51
edgrif Exp $
*-------------------------------------------------------------------
*-------------------------------------------------------------------
*/
*/
...
@@ -39,6 +39,9 @@
...
@@ -39,6 +39,9 @@
#define ZMAP_WINDOW_SEQUENCE_FEATURE_H
#define ZMAP_WINDOW_SEQUENCE_FEATURE_H
#include
<glib-object.h>
#include
<glib-object.h>
#include
<libfoocanvas/libfoocanvas.h>
#define ZMAP_WINDOW_SEQUENCE_FEATURE_NAME "ZMapWindowSequenceFeature"
#define ZMAP_WINDOW_SEQUENCE_FEATURE_NAME "ZMapWindowSequenceFeature"
...
@@ -82,7 +85,7 @@ GType zMapWindowSequenceFeatureGetType(void);
...
@@ -82,7 +85,7 @@ GType zMapWindowSequenceFeatureGetType(void);
gboolean
zMapWindowSequenceFeatureSelectByRegion
(
ZMapWindowSequenceFeature
sequence_feature
,
gboolean
zMapWindowSequenceFeatureSelectByRegion
(
ZMapWindowSequenceFeature
sequence_feature
,
ZMapSequenceType
coord_type
,
int
region_start
,
int
region_end
)
;
ZMapSequenceType
coord_type
,
int
region_start
,
int
region_end
)
;
gboolean
zMapWindowSequenceFeatureSelectByFeature
(
ZMapWindowSequenceFeature
sequence_feature
,
gboolean
zMapWindowSequenceFeatureSelectByFeature
(
ZMapWindowSequenceFeature
sequence_feature
,
FooCanvasItem
*
item
,
ZMapFeature
seed_feature
)
;
ZMapFeature
seed_feature
)
;
gboolean
zMapWindowSequenceDeSelect
(
ZMapWindowSequenceFeature
sequence_feature
)
;
gboolean
zMapWindowSequenceDeSelect
(
ZMapWindowSequenceFeature
sequence_feature
)
;
...
...
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