-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathsyngstat.c
More file actions
51 lines (43 loc) · 1.36 KB
/
syngstat.c
File metadata and controls
51 lines (43 loc) · 1.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/* File: syngstat.c
* Author: Richard Durbin (rd109@cam.ac.uk)
* Copyright (C) Richard Durbin, Cambridge University, 2025
*-------------------------------------------------------------------
* Description: statistics on syng files
* Exported functions:
* HISTORY:
* Last edited: Mar 15 16:24 2026 (rd109)
* Created: Sun Mar 16 17:11:08 2025 (rd109)
*-------------------------------------------------------------------
*/
#include "seqio.h"
#include "seqhash.h"
#include "syng.h"
/**************** main program ********************/
static char usage[] =
"Usage: syngstat <syng 1file>*\n" ;
int main (int argc, char *argv[])
{
timeUpdate (0) ;
storeCommandLine (argc, argv) ;
argc-- ; ++argv ;
while (argc--)
{ OneFile *of = oneFileOpenRead (*argv++, 0, 0, 1) ;
if (!of) die ("failed to open ONEfile %s", *--argv) ;
if (of->subType && !strcmp (of->subType, "gbwt"))
{ I64 nZ = 0, nV = 0, nE = 0, ne = 0 ;
oneStats (of, 'V', &nV, 0, 0) ;
oneStats (of, 'E', &nE, 0, 0) ;
oneStats (of, 'e', &ne, 0, 0) ;
oneStats (of, 'Z', &nZ, 0, 0) ;
printf ("GBWT file %s with %'lld vertices, %'lld edges and %'lld sequences\n",
oneFileName(of), nV, (nE+ne)/2, nZ) ;
if (nV)
{ SyngBWT *sb = syngBWTread (of) ;
syngBWTstat (sb) ;
syngBWTdestroy (sb) ;
}
timeUpdate (stdout) ;
}
oneFileClose (of) ;
}
}