ProteoWizard
IPIFASTADatabase.hpp
Go to the documentation of this file.
1//
2// $Id$
3//
4//
5// Original author: Darren Kessner <darren@proteowizard.org>
6//
7// Copyright 2006 Louis Warschaw Prostate Cancer Center
8// Cedars Sinai Medical Center, Los Angeles, California 90048
9//
10// Licensed under the Apache License, Version 2.0 (the "License");
11// you may not use this file except in compliance with the License.
12// You may obtain a copy of the License at
13//
14// http://www.apache.org/licenses/LICENSE-2.0
15//
16// Unless required by applicable law or agreed to in writing, software
17// distributed under the License is distributed on an "AS IS" BASIS,
18// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19// See the License for the specific language governing permissions and
20// limitations under the License.
21//
22
23
24#ifndef _IPIFASTADATABASE_HPP_
25#define _IPIFASTADATABASE_HPP_
26
27
29#include <memory>
30#include <string>
31#include <vector>
32#include <iosfwd>
33
34
35namespace pwiz {
36namespace proteome {
37
38
39/// class for accessing data in ipi.*.fasta files
41{
42 public:
43
44 /// constructor reads in entire file
45 IPIFASTADatabase(const std::string& filename);
47
48 /// structure for holding peptide info
50 {
51 int id;
52 std::string faID;
53 std::string fullSeqDescription;
54 std::string sequence;
55
56 Record(int _id=0) : id(_id) {}
57 };
58
59
60 /// access to the data in memory
61 const std::vector<Record>& records() const;
62
63 /// typedef to simplify declaration of Record iterator
64 typedef std::vector<Record>::const_iterator const_iterator;
65
66 // begin() and end()
69
70 private:
71 class Impl;
72 std::auto_ptr<Impl> impl_;
73};
74
75
76PWIZ_API_DECL std::ostream& operator<<(std::ostream& os, const IPIFASTADatabase::Record& record);
77
78
79} // namespace proteome
80} // namespace pwiz
81
82
83#endif // _IPIFASTADATABASE_HPP_
84
#define PWIZ_API_DECL
Definition Export.hpp:32
class for accessing data in ipi.*.fasta files
std::vector< Record >::const_iterator const_iterator
typedef to simplify declaration of Record iterator
IPIFASTADatabase(const std::string &filename)
constructor reads in entire file
const std::vector< Record > & records() const
access to the data in memory
PWIZ_API_DECL std::ostream & operator<<(std::ostream &os, const data::Diff< ProteomeData, DiffConfig > &diff)
structure for holding peptide info