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
552a3de7
Commit
552a3de7
authored
18 years ago
by
rds
Browse files
Options
Downloads
Patches
Plain Diff
get 3 frame translation
parent
c2d5348a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/zmapFeature/zmapFeature.c
+65
-4
65 additions, 4 deletions
src/zmapFeature/zmapFeature.c
with
65 additions
and
4 deletions
src/zmapFeature/zmapFeature.c
+
65
−
4
View file @
552a3de7
...
...
@@ -27,9 +27,9 @@
*
* Exported functions: See zmapView_P.h
* HISTORY:
* Last edited: Jun
28 10:17
2006 (
edgrif
)
* Last edited: Jun
30 16:24
2006 (
rds
)
* Created: Fri Jul 16 13:05:58 2004 (edgrif)
* CVS info: $Id: zmapFeature.c,v 1.3
8
2006-06-
28 09:18:35 edgrif
Exp $
* CVS info: $Id: zmapFeature.c,v 1.3
9
2006-06-
30 15:24:39 rds
Exp $
*-------------------------------------------------------------------
*/
...
...
@@ -38,6 +38,8 @@
#include
<glib.h>
#include
<ZMap/zmapUtils.h>
#include
<zmapFeature_P.h>
#include
<ZMap/zmapPeptide.h>
...
...
@@ -183,7 +185,7 @@ ZMapFeatureAny zMapFeatureGetParentGroup(ZMapFeatureAny any_feature, ZMapFeature
&&
group_type
>=
ZMAPFEATURE_STRUCT_CONTEXT
&&
group_type
<=
ZMAPFEATURE_STRUCT_FEATURE
)
;
if
(
any_feature
->
struct_type
>
group_type
)
if
(
any_feature
->
struct_type
>
=
group_type
)
{
ZMapFeatureAny
group
=
any_feature
;
...
...
@@ -447,7 +449,6 @@ gboolean zMapFeatureAddAlignmentData(ZMapFeature feature,
return
result
;
}
/*!
* Adds a URL to the object, n.b. we add this as a string that must be freed, this.
* is because I don't want the global GQuark table to be expanded by these...
...
...
@@ -763,6 +764,66 @@ void zMapFeatureBlockDestroy(ZMapFeatureBlock block, gboolean free_data)
return
;
}
gboolean
zMapFeatureBlockThreeFrameTranslation
(
ZMapFeatureBlock
block
,
ZMapFeatureSet
*
set_out
)
{
ZMapFeatureSet
feature_set
=
NULL
;
ZMapFeatureTypeStyle
style
=
NULL
;
ZMapFeatureContext
context
=
NULL
;
GQuark
style_id
=
0
;
gboolean
still_good
=
FALSE
,
created
=
FALSE
;
style_id
=
zMapStyleCreateID
(
ZMAP_FIXED_STYLE_3FT_NAME
);
if
(
block
->
sequence
.
length
)
still_good
=
TRUE
;
if
(
!
(
context
=
(
ZMapFeatureContext
)(
zMapFeatureGetParentGroup
((
ZMapFeatureAny
)
block
,
ZMAPFEATURE_STRUCT_CONTEXT
))))
still_good
=
FALSE
;
if
((
feature_set
=
(
ZMapFeatureSet
)(
g_datalist_id_get_data
(
&
(
block
->
feature_sets
),
style_id
))))
still_good
=
FALSE
;
/* We've already got one */
if
(
still_good
&&
(
style
=
zMapFindStyle
(
context
->
styles
,
style_id
))
!=
NULL
)
{
feature_set
=
zMapFeatureSetCreate
(
ZMAP_FIXED_STYLE_3FT_NAME
,
NULL
);
feature_set
->
style
=
style
;
created
=
TRUE
;
}
if
(
still_good
&&
feature_set
)
{
int
i
;
char
*
seq
=
NULL
,
*
f_name
=
NULL
,
*
s_name
;
ZMapFeature
threeft
=
NULL
;
ZMapPeptide
pep
=
NULL
;
s_name
=
(
char
*
)
g_quark_to_string
(
block
->
original_id
);
seq
=
block
->
sequence
.
sequence
;
seq
+=
2
;
/* We do it in this order so it looks sensible on the display */
for
(
i
=
2
;
seq
&&
*
seq
&&
i
>=
0
;
i
--
,
seq
--
)
{
threeft
=
zMapFeatureCreateEmpty
();
f_name
=
g_strdup_printf
(
ZMAP_FIXED_STYLE_3FT
"_phase_%d"
,
i
);
pep
=
zMapPeptideCreateSafely
(
NULL
,
NULL
,
seq
,
NULL
,
FALSE
);
threeft
->
text
=
g_strdup
(
zMapPeptideSequence
(
pep
));
zMapFeatureAddStandardData
(
threeft
,
f_name
,
f_name
,
s_name
,
"sequence"
,
ZMAPFEATURE_PEP_SEQUENCE
,
style
,
i
+
1
,
zMapPeptideLength
(
pep
)
*
3
+
i
+
1
,
FALSE
,
0
.
0
,
ZMAPSTRAND_NONE
,
ZMAPPHASE_NONE
);
zMapFeatureSetAddFeature
(
feature_set
,
threeft
);
}
}
if
(
set_out
)
*
set_out
=
feature_set
;
return
created
;
}
ZMapFeatureContext
zMapFeatureContextCreate
(
char
*
sequence
,
int
start
,
int
end
,
GList
*
types
,
GList
*
set_names
)
...
...
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