1 /* $Id: seqdbexpert.cpp 536658 2017-05-22 15:48:20Z zaretska $
2 * ===========================================================================
3 *
4 * PUBLIC DOMAIN NOTICE
5 * National Center for Biotechnology Information
6 *
7 * This software/database is a "United States Government Work" under the
8 * terms of the United States Copyright Act. It was written as part of
9 * the author's official duties as a United States Government employee and
10 * thus cannot be copyrighted. This software/database is freely available
11 * to the public for use. The National Library of Medicine and the U.S.
12 * Government have not placed any restriction on its use or reproduction.
13 *
14 * Although all reasonable efforts have been taken to ensure the accuracy
15 * and reliability of the software and data, the NLM and the U.S.
16 * Government do not and cannot warrant the performance or results that
17 * may be obtained by using this software or data. The NLM and the U.S.
18 * Government disclaim all warranties, express or implied, including
19 * warranties of performance, merchantability or fitness for any particular
20 * purpose.
21 *
22 * Please cite the author in any work or product based on this material.
23 *
24 * ===========================================================================
25 *
26 * Author: Kevin Bealer
27 *
28 */
29
30 /// @file seqdbexpert.cpp
31 /// Implementation for the CSeqDBExpert class.
32 #include <ncbi_pch.hpp>
33 #include <objtools/blast/seqdb_reader/seqdbexpert.hpp>
34 #include "seqdbimpl.hpp"
35
36 BEGIN_NCBI_SCOPE
37
CSeqDBExpert(const string & dbname,ESeqType seqtype,CSeqDBGiList * gi_list)38 CSeqDBExpert::CSeqDBExpert(const string & dbname,
39 ESeqType seqtype,
40 CSeqDBGiList * gi_list)
41 : CSeqDB(dbname, seqtype, gi_list)
42 {
43 }
44
CSeqDBExpert(const string & dbname,ESeqType seqtype,int oid_begin,int oid_end,bool use_mmap,CSeqDBGiList * gi_list)45 CSeqDBExpert::CSeqDBExpert(const string & dbname,
46 ESeqType seqtype,
47 int oid_begin,
48 int oid_end,
49 bool use_mmap,
50 CSeqDBGiList * gi_list)
51 : CSeqDB(dbname, seqtype, oid_begin, oid_end, use_mmap, gi_list)
52 {
53 }
54
CSeqDBExpert()55 CSeqDBExpert::CSeqDBExpert()
56 : CSeqDB()
57 {
58 }
59
~CSeqDBExpert()60 CSeqDBExpert::~CSeqDBExpert()
61 {
62 }
63
GetRawSeqAndAmbig(int oid,const char ** buf,int * seq_length,int * ambig_length) const64 void CSeqDBExpert::GetRawSeqAndAmbig(int oid,
65 const char ** buf,
66 int * seq_length,
67 int * ambig_length) const
68 {
69
70 m_Impl->GetRawSeqAndAmbig(oid, buf, seq_length, ambig_length);
71
72 }
73
GetGiBounds(TGi * low_id,TGi * high_id,int * count)74 void CSeqDBExpert::GetGiBounds(TGi * low_id,
75 TGi * high_id,
76 int * count)
77 {
78
79 m_Impl->GetGiBounds(low_id, high_id, count);
80
81 }
82
GetPigBounds(int * low_id,int * high_id,int * count)83 void CSeqDBExpert::GetPigBounds(int * low_id,
84 int * high_id,
85 int * count)
86 {
87
88 m_Impl->GetPigBounds(low_id, high_id, count);
89
90 }
91
GetStringBounds(string * low_id,string * high_id,int * count)92 void CSeqDBExpert::GetStringBounds(string * low_id,
93 string * high_id,
94 int * count)
95 {
96
97 m_Impl->GetStringBounds(low_id, high_id, count);
98
99 }
100
Verify()101 void CSeqDBExpert::Verify()
102 {
103
104 }
105
GetSequenceHash(int oid)106 unsigned CSeqDBExpert::GetSequenceHash(int oid)
107 {
108
109 unsigned h = m_Impl->GetSequenceHash(oid);
110
111
112 return h;
113 }
114
HashToOids(unsigned hash,vector<int> & oids)115 void CSeqDBExpert::HashToOids(unsigned hash, vector<int> & oids)
116 {
117
118 m_Impl->HashToOids(hash, oids);
119
120 }
121
122 END_NCBI_SCOPE
123
124