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
e58d5a56
Commit
e58d5a56
authored
14 years ago
by
edgrif
Browse files
Options
Downloads
Patches
Plain Diff
add function to test whether an alignment is gapped.
parent
d12a8b7c
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/include/ZMap/zmapFeature.h
+3
-2
3 additions, 2 deletions
src/include/ZMap/zmapFeature.h
src/zmapFeature/zmapFeature.c
+31
-2
31 additions, 2 deletions
src/zmapFeature/zmapFeature.c
with
34 additions
and
4 deletions
src/include/ZMap/zmapFeature.h
+
3
−
2
View file @
e58d5a56
...
@@ -25,9 +25,9 @@
...
@@ -25,9 +25,9 @@
* Description: Data structures describing a sequence feature.
* Description: Data structures describing a sequence feature.
*
*
* HISTORY:
* HISTORY:
* Last edited: Aug 1
1
0
9:47
2010 (edgrif)
* Last edited: Aug 1
7
0
8:35
2010 (edgrif)
* Created: Fri Jun 11 08:37:19 2004 (edgrif)
* Created: Fri Jun 11 08:37:19 2004 (edgrif)
* CVS info: $Id: zmapFeature.h,v 1.17
8
2010-08-1
1
0
8:47:36
edgrif Exp $
* CVS info: $Id: zmapFeature.h,v 1.17
9
2010-08-1
8
0
9:16:53
edgrif Exp $
*-------------------------------------------------------------------
*-------------------------------------------------------------------
*/
*/
#ifndef ZMAP_FEATURE_H
#ifndef ZMAP_FEATURE_H
...
@@ -782,6 +782,7 @@ gboolean zMapFeatureAddAlignmentData(ZMapFeature feature,
...
@@ -782,6 +782,7 @@ gboolean zMapFeatureAddAlignmentData(ZMapFeature feature,
ZMapPhase
target_phase
,
ZMapPhase
target_phase
,
GArray
*
gaps
,
unsigned
int
align_error
,
GArray
*
gaps
,
unsigned
int
align_error
,
gboolean
has_local_sequence
)
;
gboolean
has_local_sequence
)
;
gboolean
zMapFeatureAlignmentIsGapped
(
ZMapFeature
feature
)
;
gboolean
zMapFeatureAddAssemblyPathData
(
ZMapFeature
feature
,
gboolean
zMapFeatureAddAssemblyPathData
(
ZMapFeature
feature
,
int
length
,
ZMapStrand
strand
,
GArray
*
path
)
;
int
length
,
ZMapStrand
strand
,
GArray
*
path
)
;
gboolean
zMapFeatureSetCoords
(
ZMapStrand
strand
,
int
*
start
,
int
*
end
,
gboolean
zMapFeatureSetCoords
(
ZMapStrand
strand
,
int
*
start
,
int
*
end
,
...
...
This diff is collapsed.
Click to expand it.
src/zmapFeature/zmapFeature.c
+
31
−
2
View file @
e58d5a56
...
@@ -28,9 +28,9 @@
...
@@ -28,9 +28,9 @@
*
*
* Exported functions: See zmapView_P.h
* Exported functions: See zmapView_P.h
* HISTORY:
* HISTORY:
* Last edited: Aug
5 15:01
2010 (edgrif)
* Last edited: Aug
17 08:42
2010 (edgrif)
* Created: Fri Jul 16 13:05:58 2004 (edgrif)
* Created: Fri Jul 16 13:05:58 2004 (edgrif)
* CVS info: $Id: zmapFeature.c,v 1.13
2
2010-08-
09
09:
04:30
edgrif Exp $
* CVS info: $Id: zmapFeature.c,v 1.13
3
2010-08-
18
09:
16:53
edgrif Exp $
*-------------------------------------------------------------------
*-------------------------------------------------------------------
*/
*/
...
@@ -832,6 +832,35 @@ gboolean zMapFeatureAddAlignmentData(ZMapFeature feature,
...
@@ -832,6 +832,35 @@ gboolean zMapFeatureAddAlignmentData(ZMapFeature feature,
return
result
;
return
result
;
}
}
/* Returns TRUE if alignment is gapped, FALSE otherwise. NOTE that sometimes
* we are passed data for an alignment feature which must represent a gapped
* alignment but we are not passed the gap data. This test all this. */
gboolean
zMapFeatureAlignmentIsGapped
(
ZMapFeature
feature
)
{
gboolean
result
=
FALSE
;
zMapAssert
(
zMapFeatureIsValidFull
(
feature
,
ZMAPFEATURE_STRUCT_FEATURE
))
;
if
(
feature
->
type
==
ZMAPSTYLE_MODE_ALIGNMENT
)
{
int
ref_length
,
match_length
;
ref_length
=
(
feature
->
x2
-
feature
->
x1
)
+
1
;
match_length
=
(
feature
->
feature
.
homol
.
y2
-
feature
->
feature
.
homol
.
y1
)
+
1
;
if
(
feature
->
feature
.
homol
.
type
!=
ZMAPHOMOL_N_HOMOL
)
match_length
*=
3
;
if
(
ref_length
!=
match_length
)
result
=
TRUE
;
}
return
result
;
}
/*!
/*!
* Adds assembly path data to a feature.
* Adds assembly path data to a 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