ProteoWizard
pwiz
utility
proteome
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
28
#include "
pwiz/utility/misc/Export.hpp
"
29
#include <memory>
30
#include <string>
31
#include <vector>
32
#include <iosfwd>
33
34
35
namespace
pwiz
{
36
namespace
proteome
{
37
38
39
/// class for accessing data in ipi.*.fasta files
40
class
PWIZ_API_DECL
IPIFASTADatabase
41
{
42
public
:
43
44
/// constructor reads in entire file
45
IPIFASTADatabase
(
const
std::string& filename);
46
~
IPIFASTADatabase
();
47
48
/// structure for holding peptide info
49
struct
PWIZ_API_DECL
Record
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()
67
const_iterator
begin();
68
const_iterator
end();
69
70
private
:
71
class
Impl;
72
std::auto_ptr<Impl>
impl_
;
73
};
74
75
76
PWIZ_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
pwiz::proteome::operator<<
PWIZ_API_DECL std::ostream & operator<<(std::ostream &os, const data::Diff< ProteomeData, DiffConfig > &diff)
pwiz
Definition:
ChromatogramList_Filter.hpp:36
pwiz::proteome::IPIFASTADatabase::impl_
std::auto_ptr< Impl > impl_
Definition:
IPIFASTADatabase.hpp:71
pwiz::proteome
Definition:
AminoAcid.hpp:35
pwiz::proteome::IPIFASTADatabase::Record::fullSeqDescription
std::string fullSeqDescription
Definition:
IPIFASTADatabase.hpp:53
pwiz::proteome::IPIFASTADatabase::const_iterator
std::vector< Record >::const_iterator const_iterator
typedef to simplify declaration of Record iterator
Definition:
IPIFASTADatabase.hpp:64
PWIZ_API_DECL
#define PWIZ_API_DECL
Definition:
Export.hpp:32
Export.hpp
pwiz::proteome::IPIFASTADatabase::Record
structure for holding peptide info
Definition:
IPIFASTADatabase.hpp:49
pwiz::proteome::AminoAcid::Info::record
const PWIZ_API_DECL Record & record(Type type)
returns the amino acid's Record by type
pwiz::proteome::IPIFASTADatabase::Record::Record
Record(int _id=0)
Definition:
IPIFASTADatabase.hpp:56
pwiz::proteome::IPIFASTADatabase::Record::sequence
std::string sequence
Definition:
IPIFASTADatabase.hpp:54
pwiz::proteome::IPIFASTADatabase::Record::id
int id
Definition:
IPIFASTADatabase.hpp:51
pwiz::proteome::IPIFASTADatabase
class for accessing data in ipi.*.fasta files
Definition:
IPIFASTADatabase.hpp:40
pwiz::proteome::IPIFASTADatabase::Record::faID
std::string faID
Definition:
IPIFASTADatabase.hpp:52
Generated by
1.8.17