-rw-r--r-- | analysis/year.R | 20 | ||||
-rw-r--r-- | src/Makefile.am | 39 | ||||
-rw-r--r-- | src/aggregator.c | 6 | ||||
-rw-r--r-- | src/assign/assign_protein_type.c (renamed from src/assign_protein_type.c) | 87 | ||||
-rw-r--r-- | src/assign/assign_protein_type.h (renamed from src/assign_protein_type.h) | 0 | ||||
-rw-r--r-- | src/error/check_error.c (renamed from src/check_error.c) | 0 | ||||
-rw-r--r-- | src/error/check_error.h (renamed from src/check_error.h) | 0 | ||||
-rw-r--r-- | src/error/check_h5_error.c (renamed from src/check_h5_error.c) | 0 | ||||
-rw-r--r-- | src/error/check_h5_error.h (renamed from src/check_h5_error.h) | 0 | ||||
-rw-r--r-- | src/error/check_ncbi_error.c (renamed from src/check_ncbi_error.c) | 0 | ||||
-rw-r--r-- | src/error/check_ncbi_error.h (renamed from src/check_ncbi_error.h) | 0 | ||||
-rw-r--r-- | src/load/load_influenza_aa_dat.c (renamed from src/load_influenza_aa_dat.c) | 4 | ||||
-rw-r--r-- | src/load/load_influenza_aa_dat.h (renamed from src/load_influenza_aa_dat.h) | 0 | ||||
-rw-r--r-- | src/load/load_influenza_faa.c (renamed from src/load_influenza_faa.c) | 10 | ||||
-rw-r--r-- | src/load/load_influenza_faa.h (renamed from src/load_influenza_faa.h) | 0 | ||||
-rw-r--r-- | src/model/gi_type_data.h | 21 | ||||
-rw-r--r-- | src/model/gi_type_data_init.c | 36 | ||||
-rw-r--r-- | src/model/gi_type_data_init.h | 14 | ||||
-rw-r--r-- | src/model/sequence_data.h (renamed from src/sequence_data.h) | 5 | ||||
-rw-r--r-- | src/model/sequence_data_init.c (renamed from src/sequence_data_init.c) | 6 | ||||
-rw-r--r-- | src/model/sequence_data_init.h (renamed from src/sequence_data_init.h) | 0 | ||||
-rw-r--r-- | src/updator.c | 4 |
22 files changed, 181 insertions, 71 deletions
diff --git a/src/model/gi_type_data_init.c b/src/model/gi_type_data_init.c new file mode 100644 index 0000000..4a161c7 --- a/dev/null +++ b/src/model/gi_type_data_init.c | |||
@@ -0,0 +1,36 @@ | |||
1 | #include "gi_type_data_init.h" | ||
2 | #include "gi_type_data.h" | ||
3 | |||
4 | /* | ||
5 | * There should be some way to automate the generation of these values | ||
6 | * or at least this source file based on just the definition of the | ||
7 | * struct. Perhaps an HDF5 precompiler could do such a thing. | ||
8 | */ | ||
9 | void | ||
10 | gi_type_data_init (size_t *dst_size, size_t *dst_offset, size_t *dst_sizes, | ||
11 | hid_t *field_type) | ||
12 | { | ||
13 | *dst_size = sizeof (gi_type_data); | ||
14 | |||
15 | dst_offset[0] = HOFFSET (gi_type_data, gi); | ||
16 | dst_offset[1] = HOFFSET (gi_type_data, type); | ||
17 | dst_offset[2] = HOFFSET (gi_type_data, protein); | ||
18 | |||
19 | gi_type_data dst_buf[1]; | ||
20 | |||
21 | dst_sizes[0] = sizeof (dst_buf[0].gi); | ||
22 | dst_sizes[1] = sizeof (dst_buf[0].type); | ||
23 | dst_sizes[2] = sizeof (dst_buf[0].protein); | ||
24 | |||
25 | field_type[0] = H5T_NATIVE_INT; | ||
26 | |||
27 | hid_t type_h5t = H5Tcopy (H5T_C_S1); | ||
28 | H5Tset_size (type_h5t, 2); | ||
29 | field_type[1] = type_h5t; | ||
30 | |||
31 | hid_t protein_h5t = H5Tcopy (H5T_C_S1); | ||
32 | H5Tset_size (protein_h5t, 7); | ||
33 | field_type[2] = protein_h5t; | ||
34 | |||
35 | return; | ||
36 | } | ||