ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/PrimerMatch/fasta_io.h
Revision: 1.1.1.1 (vendor branch)
Committed: Wed Dec 22 21:37:17 2004 UTC (11 years, 7 months ago) by nje01
Branch: MAIN
CVS Tags: HEAD, RELEASE-20041222, HEAD
Changes since 1.1: +0 -0 lines
Log Message:
Initial primer_match import

Line File contents
1 /**************************************************************************
2 * This code is part of the supporting infrastructure for ATA Mapper.
3 * Copyright (C) 2002,2003,2004 Applera Corporation. All rights reserved.
4 * Author: Nathan Edwards
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received (LICENSE.txt) a copy of the GNU General Public
17 * License along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 *************************************************************************/
20
21 #ifndef _IBPEP_FASTA_IO_H_
22 #define _IBPEP_FASTA_IO_H_
23
24 #include <assert.h>
25 #include <string>
26
27 #if !defined(NO_STD_NAMESPACE)
28 using namespace std;
29 #endif
30
31 class fasta_entry {
32 std::string defline_;
33 std::string sequence_;
34 public:
35 fasta_entry(std::string const & seq="", std::string const & dl="") {
36 defline_ = dl;
37 sequence_ = seq;
38 }
39 ~fasta_entry() {}
40 std::string const & sequence() const {
41 return sequence_;
42 }
43 std::string const & defline() const {
44 return defline_;
45 }
46 void sequence(std::string const & seq) {
47 sequence_ = seq;
48 }
49 void defline(std::string const & dl) {
50 defline_ = dl;
51 }
52 void uppercase();
53 void lowercase();
54 void read(istream & is);
55 void write(ostream & os) const;
56 };
57
58 ostream & operator<<(ostream & os, fasta_entry const & fe);
59 istream & operator>>(istream & is, fasta_entry & fe);
60
61 // #include "fasta_io.t"
62
63 #endif