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
109893cb
Commit
109893cb
authored
19 years ago
by
edgrif
Browse files
Options
Downloads
Patches
Plain Diff
change styles/types to be a list instead of a dataset.
parent
6f161821
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/include/ZMap/zmapGFF.h
+3
-3
3 additions, 3 deletions
src/include/ZMap/zmapGFF.h
src/zmapGFF/zmapGFF2parser.c
+11
-31
11 additions, 31 deletions
src/zmapGFF/zmapGFF2parser.c
src/zmapGFF/zmapGFF_P.h
+3
-3
3 additions, 3 deletions
src/zmapGFF/zmapGFF_P.h
with
17 additions
and
37 deletions
src/include/ZMap/zmapGFF.h
+
3
−
3
View file @
109893cb
...
...
@@ -28,9 +28,9 @@
* of ZMapFeatureStruct's, one for each GFF source.
*
* HISTORY:
* Last edited:
May
2
0
09:4
1
2005 (edgrif)
* Last edited:
Jun
2
4
09:4
5
2005 (edgrif)
* Created: Sat May 29 13:18:32 2004 (edgrif)
* CVS info: $Id: zmapGFF.h,v 1.
7
2005-0
5
-2
7
1
5
:1
3:13
edgrif Exp $
* CVS info: $Id: zmapGFF.h,v 1.
8
2005-0
6
-2
4
1
3
:1
6:44
edgrif Exp $
*-------------------------------------------------------------------
*/
#ifndef ZMAP_GFF_H
...
...
@@ -45,7 +45,7 @@ typedef struct ZMapGFFParserStruct_ *ZMapGFFParser ;
ZMapGFFParser
zMapGFFCreateParser
(
G
Data
*
sources
,
gboolean
parse_only
)
;
ZMapGFFParser
zMapGFFCreateParser
(
G
List
*
sources
,
gboolean
parse_only
)
;
gboolean
zMapGFFParseLine
(
ZMapGFFParser
parser
,
char
*
line
)
;
...
...
This diff is collapsed.
Click to expand it.
src/zmapGFF/zmapGFF2parser.c
+
11
−
31
View file @
109893cb
...
...
@@ -26,9 +26,9 @@
*
* Exported functions: See ZMap/zmapGFF.h
* HISTORY:
* Last edited: Jun 2
3 20:00
2005 (
rnc
)
* Last edited: Jun 2
4 14:15
2005 (
edgrif
)
* Created: Fri May 28 14:25:12 2004 (edgrif)
* CVS info: $Id: zmapGFF2parser.c,v 1.2
4
2005-06-24 1
2:09:16 rnc
Exp $
* CVS info: $Id: zmapGFF2parser.c,v 1.2
5
2005-06-24 1
3:16:44 edgrif
Exp $
*-------------------------------------------------------------------
*/
...
...
@@ -36,6 +36,7 @@
#include
<strings.h>
#include
<errno.h>
#include
<glib.h>
#include
<ZMap/zmapUtils.h>
#include
<ZMap/zmapFeature.h>
#include
<zmapGFF_P.h>
...
...
@@ -67,10 +68,10 @@ static gboolean formatStrand(char *strand_str, ZMapStrand *strand_out) ;
static
gboolean
formatPhase
(
char
*
phase_str
,
ZMapPhase
*
phase_out
)
;
static
void
getFeatureArray
(
GQuark
key_id
,
gpointer
data
,
gpointer
user_data
)
;
static
void
destroyFeatureArray
(
gpointer
data
)
;
static
void
printSource
(
GQuark
key_id
,
gpointer
data
,
gpointer
user_data
)
;
static
void
loadGaps
(
char
*
currentPos
,
GArray
*
gaps
);
static
void
printSource
(
GQuark
key_id
,
gpointer
data
,
gpointer
user_data
)
;
/* types is the list of methods/types, call it what you will that we want to see
* in the output, we may need to filter the incoming data stream to get this.
...
...
@@ -79,7 +80,7 @@ static void printSource(GQuark key_id, gpointer data, gpointer user_data) ;
* _not_ create any features. This means the parser can be tested/used on huge datasets
* without having to have huge amounts of memory to hold the feature structs.
* You can only set parse_only when you create the parser, it cannot be set later. */
ZMapGFFParser
zMapGFFCreateParser
(
G
Data
*
sources
,
gboolean
parse_only
)
ZMapGFFParser
zMapGFFCreateParser
(
G
List
*
sources
,
gboolean
parse_only
)
{
ZMapGFFParser
parser
;
...
...
@@ -208,30 +209,15 @@ gboolean zMapGFFGetFeatures(ZMapGFFParser parser, ZMapFeatureBlock feature_block
* for parse_only.... */
if
(
!
parser
->
parse_only
&&
parser
->
feature_sets
)
{
#ifdef ED_G_NEVER_INCLUDE_THIS_CODE
/* NOT NEEDED NOW ????? */
feature_context
->
sequence_name
=
g_quark_from_string
(
parser
->
sequence_name
)
;
#endif
/* ED_G_NEVER_INCLUDE_THIS_CODE */
feature_block
->
features_to_sequence
.
p1
=
parser
->
features_start
;
feature_block
->
features_to_sequence
.
p2
=
parser
->
features_end
;
feature_block
->
features_to_sequence
.
c1
=
parser
->
features_start
;
feature_block
->
features_to_sequence
.
c2
=
parser
->
features_end
;
g_datalist_init
(
&
(
feature_block
->
feature_sets
))
;
g_datalist_foreach
(
&
(
parser
->
feature_sets
),
getFeatureArray
,
&
(
feature_block
->
feature_sets
))
;
/* OK, THIS IS A HACK, REALLY THIS PARSER CODE SHOULD JUST USE THE FEATURE.H
* HEADER AND NOT DELVE INTO THE FEATURE BLOCK STUFF BY FOR NOW WE HAVE TO FIX
* UP ALL THE LINKS "BY HAND"..... */
g_datalist_foreach
(
&
(
feature_block
->
feature_sets
),
setBlock
,
feature_block
)
;
...
...
@@ -598,7 +584,6 @@ static gboolean parseBodyLine(ZMapGFFParser parser, char *line)
ZMapStrand
strand
;
ZMapPhase
phase
;
char
*
err_text
=
NULL
;
char
*
source_lower
=
NULL
;
/* I'm afraid I'm not doing assembly stuff at the moment, its not worth it....if I need
* to change this decision I can just this section.....
...
...
@@ -626,20 +611,18 @@ static gboolean parseBodyLine(ZMapGFFParser parser, char *line)
err_text
=
g_strdup_printf
(
"phase format not recognised: %s"
,
phase_str
)
;
else
{
/* Check further constraints, including that the source in the GFF record must be
* one we have requested, note also that we require the source to have been translated into
* lower case. */
source_lower
=
g_ascii_strdown
(
source
,
-
1
)
;
GQuark
source_id
;
#ifdef ED_G_NEVER_INCLUDE_THIS_CODE
/* debugging.... */
g_datalist_foreach
(
&
(
parser
->
sources
),
printSource
,
NULL
)
;
#endif
/* ED_G_NEVER_INCLUDE_THIS_CODE */
source_id
=
zMapStyleCreateID
(
source
)
;
if
(
parser
->
sources
&&
!
(
g_datalist_get_data
(
&
(
parser
->
sources
),
source_lower
)))
err_text
=
g_strdup_printf
(
"source not request: %s"
,
source_lower
)
;
if
(
parser
->
sources
&&
!
(
zMapFindStyle
(
parser
->
sources
,
source_id
)))
err_text
=
g_strdup_printf
(
"features with this source were not requested: %s"
,
source
)
;
}
if
(
err_text
)
...
...
@@ -656,9 +639,6 @@ static gboolean parseBodyLine(ZMapGFFParser parser, char *line)
start
,
end
,
score
,
strand
,
phase
,
attributes
,
gaps
)
;
}
if
(
source_lower
)
g_free
(
source_lower
)
;
}
return
result
;
...
...
@@ -1252,7 +1232,7 @@ static void getFeatureArray(GQuark key_id, gpointer data, gpointer user_data)
feature_set
->
features
)
;
/* agh, poke in feature internals... */
new_features
->
style
=
feature_set
->
unique_id
;
new_features
->
style
_id
=
feature_set
->
unique_id
;
g_datalist_id_set_data
(
features
,
new_features
->
unique_id
,
new_features
)
;
...
...
This diff is collapsed.
Click to expand it.
src/zmapGFF/zmapGFF_P.h
+
3
−
3
View file @
109893cb
...
...
@@ -25,9 +25,9 @@
* Description:
* Exported functions: See XXXXXXXXXXXXX.h
* HISTORY:
* Last edited:
Mar 28 12:37
2005 (edgrif)
* Last edited:
Jun 24 09:46
2005 (edgrif)
* Created: Sat May 29 13:18:32 2004 (edgrif)
* CVS info: $Id: zmapGFF_P.h,v 1.
8
2005-0
4-05
1
4
:1
8:06
edgrif Exp $
* CVS info: $Id: zmapGFF_P.h,v 1.
9
2005-0
6-24
1
3
:1
6:44
edgrif Exp $
*-------------------------------------------------------------------
*/
#ifndef ZMAP_GFF_P_H
...
...
@@ -121,7 +121,7 @@ typedef struct ZMapGFFParserStruct_
char
*
sequence_name
;
int
features_start
,
features_end
;
G
Data
*
sources
;
/* If present, only make features from
G
List
*
sources
;
/* If present, only make features from
GFF records with a source from this
list. */
...
...
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