NCBI C++ ToolKit
bioseq_info.hpp
Go to the documentation of this file.

Go to the SVN repository for this file.

1 #ifndef BIOSEQ_INFO__HPP
2 #define BIOSEQ_INFO__HPP
3 
4 /* $Id: bioseq_info.hpp 84834 2018-12-17 15:32:17Z satskyse $
5  * ===========================================================================
6  *
7  * PUBLIC DOMAIN NOTICE
8  * National Center for Biotechnology Information
9  *
10  * This software/database is a "United States Government Work" under the
11  * terms of the United States Copyright Act. It was written as part of
12  * the author's official duties as a United States Government employee and
13  * thus cannot be copyrighted. This software/database is freely available
14  * to the public for use. The National Library of Medicine and the U.S.
15  * Government have not placed any restriction on its use or reproduction.
16  *
17  * Although all reasonable efforts have been taken to ensure the accuracy
18  * and reliability of the software and data, the NLM and the U.S.
19  * Government do not and cannot warrant the performance or results that
20  * may be obtained by using this software or data. The NLM and the U.S.
21  * Government disclaim all warranties, express or implied, including
22  * warranties of performance, merchantability or fitness for any particular
23  * purpose.
24  *
25  * Please cite the author in any work or product based on this material.
26  *
27  * ===========================================================================
28  *
29  * Authors: Sergey Satskiy
30  *
31  * File Description:
32  *
33  * Synchronous retrieving data from bioseq. tables
34  *
35  */
36 
37 #include <corelib/ncbistd.hpp>
40 #include "IdCassScope.hpp"
41 
43 
45 
46 
48 {
50  m_Version(0), m_SeqIdType(0)
51  {}
52 
53  // Sequence of fields and the order are inherited from the DB
54  // https://docs.datastax.com/en/cql/3.3/cql/cql_reference/cql_data_types_c.html
55  string m_Accession;
58 
70 };
71 
72 
73 // e200_Ok: exactly one record found
74 // e404_NotFound: no records found
75 // e300_MultipleChoices: more than one record found
77 FetchCanonicalSeqId(shared_ptr<CCassConnection> conn,
78  const string & keyspace,
79  const string & sec_seq_id,
80  int16_t sec_seq_id_type,
81  bool sec_seq_id_type_provided,
82  string & accession, // output
83  int16_t & version, // output
84  int16_t & seq_id_type); // output
85 
86 // e200_Ok: exactly one record found
87 // e404_NotFound: no records found
88 // e300_MultipleChoices: more than one record found
90 FetchBioseqInfo(shared_ptr<CCassConnection> conn,
91  const string & keyspace,
92  bool version_provided,
93  bool seq_id_type_provided,
94  SBioseqInfo & bioseq_info);
95 
97 
98 #endif
#define END_IDBLOB_SCOPE
Definition: IdCassScope.hpp:40
#define BEGIN_IDBLOB_SCOPE
Definition: IdCassScope.hpp:39
Definition: set.hpp:45
Include a standard set of the NCBI C++ Toolkit most basic headers.
static CS_CONNECTION * conn
Definition: ct_dynamic.c:25
static int version
Definition: mdb_load.c:29
CRequestStatus::ECode FetchBioseqInfo(shared_ptr< CCassConnection > conn, const string &keyspace, bool version_provided, bool seq_id_type_provided, SBioseqInfo &bioseq_info)
CRequestStatus::ECode FetchCanonicalSeqId(shared_ptr< CCassConnection > conn, const string &keyspace, const string &sec_seq_id, int16_t sec_seq_id_type, bool sec_seq_id_type_provided, string &accession, int16_t &version, int16_t &seq_id_type)
Definition: bioseq_info.cpp:58
USING_NCBI_SCOPE
Definition: bioseq_info.hpp:44
Defines CRequestStatus class for NCBI C++ diagnostic API.
signed short int16_t
Definition: stdint.h:122
signed __int64 int64_t
Definition: stdint.h:135
signed int int32_t
Definition: stdint.h:123
signed char int8_t
Definition: stdint.h:121
int8_t m_SeqState
Definition: bioseq_info.hpp:67
int32_t m_TaxId
Definition: bioseq_info.hpp:69
int16_t m_Sat
Definition: bioseq_info.hpp:64
int8_t m_Mol
Definition: bioseq_info.hpp:63
int16_t m_SeqIdType
Definition: bioseq_info.hpp:57
int16_t m_Version
Definition: bioseq_info.hpp:56
int32_t m_SatKey
Definition: bioseq_info.hpp:65
int64_t m_IdSync
Definition: bioseq_info.hpp:61
string m_Accession
Definition: bioseq_info.hpp:55
set< tuple< int16_t, string > > m_SeqIds
Definition: bioseq_info.hpp:66
int8_t m_State
Definition: bioseq_info.hpp:68
int32_t m_Hash
Definition: bioseq_info.hpp:60
int64_t m_DateChanged
Definition: bioseq_info.hpp:59
int32_t m_Length
Definition: bioseq_info.hpp:62
Modified on Wed Feb 28 07:12:23 2024 by modify_doxy.py rev. 669887