summaryrefslogtreecommitdiffstats
Unidiff
-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/assign/assign_protein_type.c b/src/assign/assign_protein_type.c
index 065880f..52a0b70 100644
--- a/src/assign/assign_protein_type.c
+++ b/src/assign/assign_protein_type.c
@@ -19,18 +19,26 @@
19/*19/*
20 * BLAST database containing all of the influenza protein sequences.20 * BLAST database containing all of the influenza protein sequences.
21 */21 */
22#define SEQDB "/u/ac/dpellegr/Documents/exp004/influenzadb/influenzadb"22#define SEQDB "/influenzadb/influenzadb"
2323
24/*24/*
25 * BLAST reference database of prototypical protein types.25 * BLAST reference database of prototypical protein types.
26 */26 */
27#define REFDB "/u/ac/dpellegr/Documents/exp004/influenzadb/proteinnames"27#define REFDB "/influenzadb/proteinnames"
2828
29#define BUFFER_LEN 5029#define BUFFER_LEN 50
3030
31void31void
32assign_protein_type (hid_t file_id)32assign_protein_type (hid_t file_id)
33{33{
34 char* exp004 = getenv ("EXP004");
35 if (exp004 == NULL)
36 {
37 printf ("EXP004 environment variable not set. This should be set to the "
38 "directory containing the genomes/INFLUENZA data.");
39 exit (0);
40 }
41
34 /*42 /*
35 * Iterate through the records for which no protein type has been43 * Iterate through the records for which no protein type has been
36 * assigned. Create a BioSeq Pointer to the data and then use this44 * assigned. Create a BioSeq Pointer to the data and then use this
@@ -47,7 +55,12 @@ assign_protein_type (hid_t file_id)
47 /*55 /*
48 * Open the BLAST sequence database.56 * Open the BLAST sequence database.
49 */57 */
50 ReadDBFILEPtr seqdb = readdb_new (SEQDB, true);58 char* loc1 = malloc (strlen (exp004) + strlen (SEQDB) + 1);
59 loc1[0] = '\0';
60 strcat (loc1, exp004);
61 strcat (loc1, SEQDB);
62 ReadDBFILEPtr seqdb = readdb_new (loc1, true);
63 free (loc1);
5164
52 /*65 /*
53 * Get default BLAST options.66 * Get default BLAST options.
@@ -215,14 +228,19 @@ assign_protein_type (hid_t file_id)
215 "record set. See the BLAST formatdb.log file "228 "record set. See the BLAST formatdb.log file "
216 "for details.\n", faa_buf[i].gi);229 "for details.\n", faa_buf[i].gi);
217 }230 }
218231
232 char* loc2 = malloc (strlen (exp004) + strlen (REFDB) + 1);
233 loc2[0] = '\0';
234 strcat (loc2, exp004);
235 strcat (loc2, REFDB);
219 SeqAlignPtr seqalign = BioseqBlastEngine (bsp,236 SeqAlignPtr seqalign = BioseqBlastEngine (bsp,
220 "blastp",237 "blastp",
221 REFDB,238 loc2,
222 options,239 options,
223 NULL,240 NULL,
224 &error_returns,241 &error_returns,
225 NULL);242 NULL);
243 free (loc2);
226244
227 /*245 /*
228 * BLAST reported an error. Write it out and continue processing.246 * BLAST reported an error. Write it out and continue processing.

Valid XHTML 1.0 Strict

Copyright © 2009 Don Pellegrino All Rights Reserved.