-rw-r--r-- | src/aggregator.c | 33 | ||||
-rw-r--r-- | src/assign/assign_blast_scores.c | 11 | ||||
-rw-r--r-- | src/assign/assign_protein_type.c | 28 | ||||
-rw-r--r-- | src/updator.c | 2 |
4 files changed, 60 insertions, 14 deletions
diff --git a/src/aggregator.c b/src/aggregator.c index c789502..8057bb3 100644 --- a/src/aggregator.c +++ b/src/aggregator.c | |||
@@ -8,15 +8,25 @@ | |||
8 | #include "load/load_influenza_aa_dat.h" | 8 | #include "load/load_influenza_aa_dat.h" |
9 | #include "load/load_influenza_faa.h" | 9 | #include "load/load_influenza_faa.h" |
10 | #include <stdio.h> | 10 | #include <stdio.h> |
11 | #include <stdlib.h> | ||
12 | #include <string.h> | ||
11 | 13 | ||
12 | #define BLASTFILE "run20090807.del" | 14 | #define BLASTFILE "run20090807.del" |
13 | #define H5FILE "influenza.h5" | 15 | #define H5FILE "influenza.h5" |
14 | #define INFLUENZA_AA_DAT "/u/ac/dpellegr/Documents/exp004/genomes/INFLUENZA/influenza_aa.dat" | 16 | #define INFLUENZA_AA_DAT "/genomes/INFLUENZA/influenza_aa.dat" |
15 | #define INFLUENZA_FAA "/u/ac/dpellegr/Documents/exp004/genomes/INFLUENZA/influenza.faa" | 17 | #define INFLUENZA_FAA "/genomes/INFLUENZA/influenza.faa" |
16 | 18 | ||
17 | int | 19 | int |
18 | main () | 20 | main () |
19 | { | 21 | { |
22 | char* exp004 = getenv ("EXP004"); | ||
23 | if (exp004 == NULL) | ||
24 | { | ||
25 | printf ("EXP004 environment variable not set. This should be set to the " | ||
26 | "directory containing the genomes/INFLUENZA data."); | ||
27 | exit (0); | ||
28 | } | ||
29 | |||
20 | /* | 30 | /* |
21 | * Create a new HDF5 file if it does not already exist. If an | 31 | * Create a new HDF5 file if it does not already exist. If an |
22 | * existing file is found then open it. | 32 | * existing file is found then open it. |
@@ -40,15 +50,26 @@ main () | |||
40 | /* | 50 | /* |
41 | * Load the supplementary protein data file. | 51 | * Load the supplementary protein data file. |
42 | */ | 52 | */ |
53 | char* loc1 = malloc (strlen (exp004) + strlen (INFLUENZA_AA_DAT) + 1); | ||
54 | loc1[0] = '\0'; | ||
55 | strcat (loc1, exp004); | ||
56 | strcat (loc1, INFLUENZA_AA_DAT); | ||
43 | printf ("Loading \"influenza_aa.dat\" with contents of %s.\n", | 57 | printf ("Loading \"influenza_aa.dat\" with contents of %s.\n", |
44 | INFLUENZA_AA_DAT); | 58 | loc1); |
45 | load_influenza_aa_dat (file_id, INFLUENZA_AA_DAT); | 59 | load_influenza_aa_dat (file_id, loc1); |
60 | free (loc1); | ||
46 | 61 | ||
47 | /* | 62 | /* |
48 | * Load the FASTA protein sequence data file. | 63 | * Load the FASTA protein sequence data file. |
49 | */ | 64 | */ |
50 | printf ("Loading \"influenza.faa\" with contents of %s.\n", INFLUENZA_FAA); | 65 | char* loc2 = malloc (strlen (exp004) + strlen (INFLUENZA_FAA) + 1); |
51 | load_influenza_faa (file_id, INFLUENZA_FAA); | 66 | loc2[0] = '\0'; |
67 | strcat (loc2, exp004); | ||
68 | strcat (loc2, INFLUENZA_FAA); | ||
69 | printf ("Loading \"influenza.faa\" with contents of %s.\n", | ||
70 | loc2); | ||
71 | load_influenza_faa (file_id, loc2); | ||
72 | free (loc2); | ||
52 | 73 | ||
53 | /* | 74 | /* |
54 | * Load the BLAST scores. | 75 | * Load the BLAST scores. |