summaryrefslogtreecommitdiffstats
Side-by-side diff
-rw-r--r--src/aggregator.c33
-rw-r--r--src/assign/assign_blast_scores.c11
-rw-r--r--src/assign/assign_protein_type.c28
-rw-r--r--src/updator.c2
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 @@
#include "load/load_influenza_aa_dat.h"
#include "load/load_influenza_faa.h"
#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
#define BLASTFILE "run20090807.del"
#define H5FILE "influenza.h5"
-#define INFLUENZA_AA_DAT "/u/ac/dpellegr/Documents/exp004/genomes/INFLUENZA/influenza_aa.dat"
-#define INFLUENZA_FAA "/u/ac/dpellegr/Documents/exp004/genomes/INFLUENZA/influenza.faa"
+#define INFLUENZA_AA_DAT "/genomes/INFLUENZA/influenza_aa.dat"
+#define INFLUENZA_FAA "/genomes/INFLUENZA/influenza.faa"
int
main ()
{
+ char* exp004 = getenv ("EXP004");
+ if (exp004 == NULL)
+ {
+ printf ("EXP004 environment variable not set. This should be set to the "
+ "directory containing the genomes/INFLUENZA data.");
+ exit (0);
+ }
+
/*
* Create a new HDF5 file if it does not already exist. If an
* existing file is found then open it.
@@ -40,15 +50,26 @@ main ()
/*
* Load the supplementary protein data file.
*/
+ char* loc1 = malloc (strlen (exp004) + strlen (INFLUENZA_AA_DAT) + 1);
+ loc1[0] = '\0';
+ strcat (loc1, exp004);
+ strcat (loc1, INFLUENZA_AA_DAT);
printf ("Loading \"influenza_aa.dat\" with contents of %s.\n",
- INFLUENZA_AA_DAT);
- load_influenza_aa_dat (file_id, INFLUENZA_AA_DAT);
+ loc1);
+ load_influenza_aa_dat (file_id, loc1);
+ free (loc1);
/*
* Load the FASTA protein sequence data file.
*/
- printf ("Loading \"influenza.faa\" with contents of %s.\n", INFLUENZA_FAA);
- load_influenza_faa (file_id, INFLUENZA_FAA);
+ char* loc2 = malloc (strlen (exp004) + strlen (INFLUENZA_FAA) + 1);
+ loc2[0] = '\0';
+ strcat (loc2, exp004);
+ strcat (loc2, INFLUENZA_FAA);
+ printf ("Loading \"influenza.faa\" with contents of %s.\n",
+ loc2);
+ load_influenza_faa (file_id, loc2);
+ free (loc2);
/*
* Load the BLAST scores.

Valid XHTML 1.0 Strict

Copyright © 2009 Don Pellegrino All Rights Reserved.