1 /*===========================================================================
2 *
3 *                            PUBLIC DOMAIN NOTICE
4 *               National Center for Biotechnology Information
5 *
6 *  This software/database is a "United States Government Work" under the
7 *  terms of the United States Copyright Act.  It was written as part of
8 *  the author's official duties as a United States Government employee and
9 *  thus cannot be copyrighted.  This software/database is freely available
10 *  to the public for use. The National Library of Medicine and the U.S.
11 *  Government have not placed any restriction on its use or reproduction.
12 *
13 *  Although all reasonable efforts have been taken to ensure the accuracy
14 *  and reliability of the software and data, the NLM and the U.S.
15 *  Government do not and cannot warrant the performance or results that
16 *  may be obtained by using this software or data. The NLM and the U.S.
17 *  Government disclaim all warranties, express or implied, including
18 *  warranties of performance, merchantability or fitness for any particular
19 *  purpose.
20 *
21 *  Please cite the author in any work or product based on this material.
22 *
23 * ===========================================================================
24 *
25 */
26 #ifndef _h_spot_position_
27 #define _h_spot_position_
28 
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
32 
33 #include <klib/rc.h>
34 #include <klib/text.h>
35 #include <klib/log.h>
36 #include <klib/out.h>
37 #include <vdb/cursor.h>
38 #include <vdb/table.h>
39 #include <vdb/database.h>
40 #include "columns.h"
41 
42 
43 #define SIDX_READ_START      0
44 #define N_SIDX               1
45 
46 
47 typedef struct spot_pos
48 {
49     const VTable *table;
50     const VCursor *cursor;
51     col columns[ N_SIDX ];
52 } spot_pos;
53 
54 
55 rc_t make_spot_pos( spot_pos *self, const VDatabase * db );
56 
57 rc_t query_spot_pos( spot_pos *self,
58                      const uint32_t seq_read_id,
59                      const uint64_t spot_id,
60                      uint32_t *pos_offset );
61 
62 void whack_spot_pos( spot_pos *self );
63 
64 #ifdef __cplusplus
65 }
66 #endif
67 
68 #endif
69