-rw-r--r-- | src/Makefile.am | 11 | ||||
-rw-r--r-- | src/aggregator.c | 7 | ||||
-rw-r--r-- | src/updator.c | 33 |
3 files changed, 43 insertions, 8 deletions
diff --git a/src/updator.c b/src/updator.c new file mode 100644 index 0000000..8d556da --- a/dev/null +++ b/src/updator.c | |||
@@ -0,0 +1,33 @@ | |||
1 | /* | ||
2 | * Update derived fields. | ||
3 | */ | ||
4 | |||
5 | #include "assign_protein_type.h" | ||
6 | #include "check_h5_error.h" | ||
7 | |||
8 | #define FILE "influenza.h5" | ||
9 | |||
10 | int | ||
11 | main () | ||
12 | { | ||
13 | /* | ||
14 | * Open the HDF5 file. | ||
15 | */ | ||
16 | hid_t file_id = H5Fopen (FILE, H5F_ACC_RDWR, H5P_DEFAULT); | ||
17 | if (file_id < 0) | ||
18 | check_h5_error (file_id, __FILE__, __LINE__); | ||
19 | |||
20 | /* | ||
21 | * Assign protein type values to the sequence records. | ||
22 | */ | ||
23 | assign_protein_type (file_id); | ||
24 | |||
25 | /* | ||
26 | * Close the HDF5 file. | ||
27 | */ | ||
28 | herr_t status = H5Fclose (file_id); | ||
29 | if (status < 0) | ||
30 | check_h5_error (status, __FILE__, __LINE__); | ||
31 | |||
32 | return 0; | ||
33 | } | ||