summaryrefslogtreecommitdiffstats
path: root/src/updator.c (plain)
blob: 0bade65242caae1d1a6ae0a6e429b7f67108b5ca
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/*
 * Update derived fields.
 */

#include "assign/assign_protein_type.h"
#include "assign/assign_blast_scores.h"
#include "error/check_h5_error.h"
#include <petsc.h>
#include <stdio.h>
#include <signal.h>

#define FILE "influenza.h5"

int
main (int argc, char **argv)
{
  /*
   * Initialize the PETSc database and MPI.
   *
   * http://www.mcs.anl.gov/petsc/petsc-2/snapshots/petsc-dev/docs/manualpages/Sys/PetscInitialize.html#PetscInitialize
   */
  PetscInitialize (&argc, &argv, 0, 0);

  /*
   * Open the HDF5 file.
   */
  hid_t file_id = H5Fopen (FILE, H5F_ACC_RDWR, H5P_DEFAULT);
  if (file_id < 0)
    check_h5_error (__FILE__, __LINE__);

  /*
   * Assign protein type values to the sequence records.
   */
  /*
  assign_protein_type (file_id);
  */

  /*
   * Assign pairwise BLAST scores.
   */
  assign_blast_scores (file_id);

  /*
   * Close the HDF5 file.
   */
  herr_t status = H5Fclose (file_id);
  if (status < 0)
    check_h5_error (__FILE__, __LINE__);

  PetscFinalize ();

  return 0;
}

Valid XHTML 1.0 Strict

Copyright © 2009 Don Pellegrino All Rights Reserved.