summaryrefslogtreecommitdiffstats
Unidiff
-rw-r--r--src/assign_protein_type.c29
-rw-r--r--src/load_influenza_aa_dat.c2
-rw-r--r--src/load_influenza_faa.c42
3 files changed, 59 insertions, 14 deletions
diff --git a/src/assign_protein_type.c b/src/assign_protein_type.c
index 54db84e..1b58f54 100644
--- a/src/assign_protein_type.c
+++ b/src/assign_protein_type.c
@@ -1,10 +1,12 @@
1#include "assign_protein_type.h"1#include "assign_protein_type.h"
2#include "check_ncbi_error.h"2#include "check_ncbi_error.h"
3#include "check_h5_error.h"
3#include <ncbi.h>4#include <ncbi.h>
4#include <readdb.h>5#include <readdb.h>
5#include <blast.h>6#include <blast.h>
6#include <salpacc.h>7#include <salpacc.h>
7#include <stdbool.h>8#include <stdbool.h>
9#include <hdf5_hl.h>
810
9/*11/*
10 * BLAST database containing all of the influenza protein sequences.12 * BLAST database containing all of the influenza protein sequences.
@@ -45,6 +47,33 @@ assign_protein_type (hid_t file_id)
45 ValNodePtr error_returns = NULL;47 ValNodePtr error_returns = NULL;
4648
47 /*49 /*
50 * Read the data from HDF5 file.
51 */
52 hsize_t nfields;
53 hsize_t nrecords;
54 herr_t status = H5TBget_table_info (file_id, "influenza.faa", &nfields,
55 &nrecords);
56 if (status < 0)
57 check_h5_error (status, __FILE__, __LINE__);
58
59 /*
60 * todo: Allocate memory of nrecords for dst_buf.
61 *
62 * todo: Refactor code to share structres in read and write HDF5
63 * calls.
64 */
65
66 status = H5TBread_table (file_id, "influenza.faa", dst_size, dst_offset,
67 dst_sizes, dst_buf);
68 if (status < 0)
69 check_h5_error (status, __FILE__, __LINE__);
70
71 for (int i = 0; i < nrecords; i++)
72 {
73
74 }
75
76 /*
48 * Read the sequence from the database by GI.77 * Read the sequence from the database by GI.
49 */78 */
50 Int4 sequence_number = readdb_gi2seq (seqdb, 453644, NULL);79 Int4 sequence_number = readdb_gi2seq (seqdb, 453644, NULL);

Valid XHTML 1.0 Strict

Copyright © 2009 Don Pellegrino All Rights Reserved.