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

Go to the SVN repository for this file.

1 #ifndef OBJTOOLS_BLAST_SEQDB_READER___SEQIDLIST_READER__HPP
2 #define OBJTOOLS_BLAST_SEQDB_READER___SEQIDLIST_READER__HPP
3 
4 /*
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  * Author: Amelia FOng
30  *
31  */
32 
33 /// @file seqidlist_reader.hpp
34 
35 
36 
37 #include <corelib/ncbistre.hpp>
38 #include <corelib/ncbifile.hpp>
41 
43 
44 
46 {
47 
48 public:
49 
50  /// Get seqidlist from dbv5 seqidlist file
51  /// @param file seqidlist file
52  /// @param idlist list of ids read from file
53  /// @param list_info info about seqidlist
54  /// @return num of ids in the file, return 0 if list is in v4 format (plain text)
55  static int GetSeqidlist(CMemoryFile & file, vector<CSeqDBGiList::SSiOid> & idlist, SBlastSeqIdListInfo & list_info);
56 
57  /// Get seqidlist info only from dbv5 seqidlist file
58  /// @param file seqidlist filename (excpetion if file path cannot be resolved)
59  /// @param list_info info about seqidlist
60  /// @return num of ids in the file, return 0 if list is in v4 format (plain text)
61  static int GetSeqidlistInfo(const string & filename, SBlastSeqIdListInfo & list_info);
62 
63  /// @param file seqidlist filename (excpetion if file path cannot be resolved)
64  /// @param os output stream
65  static void PrintSeqidlistInfo(const string & filename, CNcbiOstream & os);
66 };
67 
69 
70 
71 #endif //OBJTOOLS_BLAST_SEQDB_READER___SEQIDLIST_READER__HPP
CMemoryFile –.
Definition: ncbifile.hpp:2860
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
IO_PREFIX::ostream CNcbiOstream
Portable alias for ostream.
Definition: ncbistre.hpp:149
#define NCBI_XOBJREAD_EXPORT
Definition: ncbi_export.h:1315
FILE * file
Defines classes: CDirEntry, CFile, CDir, CSymLink, CMemoryFile, CFileUtil, CFileLock,...
NCBI C++ stream class wrappers for triggering between "new" and "old" C++ stream libraries.
Defines BLAST database access classes.
Defines exception class and several constants for SeqDB.
Blast DB v5 seqid list info.
Modified on Wed Apr 24 14:15:55 2024 by modify_doxy.py rev. 669887