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
994bb589
Commit
994bb589
authored
17 years ago
by
edgrif
Browse files
Options
Downloads
Patches
Plain Diff
change stats to be output to new IO destination.
parent
364068ae
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/zmapWindow/zmapWindowStats.c
+23
-18
23 additions, 18 deletions
src/zmapWindow/zmapWindowStats.c
with
23 additions
and
18 deletions
src/zmapWindow/zmapWindowStats.c
+
23
−
18
View file @
994bb589
...
...
@@ -29,15 +29,16 @@
*
* Exported functions: See zmapWindow_P.h
* HISTORY:
* Last edited: Oct 1
2
1
1:53
2007 (edgrif)
* Last edited: Oct 1
7
1
5:11
2007 (edgrif)
* Created: Tue Nov 7 10:10:25 2006 (edgrif)
* CVS info: $Id: zmapWindowStats.c,v 1.
4
2007-10-1
2
1
1:10:12
edgrif Exp $
* CVS info: $Id: zmapWindowStats.c,v 1.
5
2007-10-1
7
1
5:59:54
edgrif Exp $
*-------------------------------------------------------------------
*/
#include
<string.h>
#include
<ZMap/zmapUtils.h>
#include
<ZMap/zmapFeature.h>
#include
<ZMap/zmapIO.h>
#include
<zmapWindow_P.h>
...
...
@@ -160,13 +161,14 @@ void zmapWindowStatsReset(ZMapWindowStats stats)
/* Crude, in the end we will do a window for this and a dump function. */
void
zmapWindowStatsPrint
(
ZMapWindowStats
stats
)
void
zmapWindowStatsPrint
(
ZMapIOOut
output
,
ZMapWindowStats
stats
)
{
printf
(
"%s:
\t
Context children: %d, canvas children: %d
\n
"
,
g_quark_to_string
(
stats
->
feature_id
),
stats
->
num_context_children
,
stats
->
num_canvas_children
)
;
g_list_foreach
(
stats
->
child_sets
,
printStats
,
NULL
)
;
if
(
zMapOutWriteFormat
(
output
,
"%s:
\t
Context children: %d, canvas children: %d
\n
"
,
g_quark_to_string
(
stats
->
feature_id
),
stats
->
num_context_children
,
stats
->
num_canvas_children
))
{
g_list_foreach
(
stats
->
child_sets
,
printStats
,
output
)
;
}
return
;
}
...
...
@@ -223,9 +225,10 @@ static void resetStats(gpointer data, gpointer user_data_unused)
static
void
printStats
(
gpointer
data
,
gpointer
user_data
_unused
)
static
void
printStats
(
gpointer
data
,
gpointer
user_data
)
{
ZMapWindowStatsAny
any_stats
=
(
ZMapWindowStatsAny
)
data
;
ZMapIOOut
output
=
(
ZMapIOOut
)
user_data
;
switch
(
any_stats
->
feature_type
)
{
...
...
@@ -235,27 +238,29 @@ static void printStats(gpointer data, gpointer user_data_unused)
{
ZMapWindowStatsBasic
basic
=
(
ZMapWindowStatsBasic
)
any_stats
;
printf
(
"Basic
\t
features:%d
\t
boxes:%d
\n
"
,
basic
->
features
,
basic
->
items
)
;
zMapOutWriteFormat
(
output
,
"Basic
\t
features:%d
\t
boxes:%d
\n
"
,
basic
->
features
,
basic
->
items
)
;
break
;
}
case
ZMAPFEATURE_ALIGNMENT
:
{
ZMapWindowStatsAlign
align
=
(
ZMapWindowStatsAlign
)
any_stats
;
printf
(
"Alignment
\t
features:%d
\t
gapped:%d
\t
not perfect gapped:%d
\t
ungapped:%d
\t
"
"boxes:%d
\t
gapped boxes:%d
\t
ungapped boxes:%d
\t
gapped boxes not drawn:%d
\n
"
,
align
->
total_matches
,
align
->
gapped_matches
,
align
->
not_perfect_gapped_matches
,
align
->
ungapped_matches
,
align
->
total_boxes
,
align
->
gapped_boxes
,
align
->
ungapped_boxes
,
align
->
imperfect_boxes
)
;
zMapOutWriteFormat
(
output
,
"Alignment
\t
features:%d
\t
gapped:%d
\t
not perfect gapped:%d
\t
ungapped:%d
\t
"
"boxes:%d
\t
gapped boxes:%d
\t
ungapped boxes:%d
\t
gapped boxes not drawn:%d
\n
"
,
align
->
total_matches
,
align
->
gapped_matches
,
align
->
not_perfect_gapped_matches
,
align
->
ungapped_matches
,
align
->
total_boxes
,
align
->
gapped_boxes
,
align
->
ungapped_boxes
,
align
->
imperfect_boxes
)
;
break
;
}
case
ZMAPFEATURE_TRANSCRIPT
:
{
ZMapWindowStatsTranscript
transcript
=
(
ZMapWindowStatsTranscript
)
any_stats
;
printf
(
"Transcript
\t
features:%d
\t
exons:%d,
\t
introns:%d,
\t
cds:%d"
"boxes:%d
\t
exon_boxes:%d
\t
intron_boxes:%d
\t
cds_boxes:%d
\n
"
,
transcript
->
transcripts
,
transcript
->
exons
,
transcript
->
introns
,
transcript
->
cds
,
transcript
->
items
,
transcript
->
exon_boxes
,
transcript
->
intron_boxes
,
transcript
->
cds_boxes
)
;
zMapOutWriteFormat
(
output
,
"Transcript
\t
features:%d
\t
exons:%d,
\t
introns:%d,
\t
cds:%d"
"boxes:%d
\t
exon_boxes:%d
\t
intron_boxes:%d
\t
cds_boxes:%d
\n
"
,
transcript
->
transcripts
,
transcript
->
exons
,
transcript
->
introns
,
transcript
->
cds
,
transcript
->
items
,
transcript
->
exon_boxes
,
transcript
->
intron_boxes
,
transcript
->
cds_boxes
)
;
break
;
}
default:
...
...
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