File: fasta.hpp

package info (click to toggle)
dnaclust 3-7
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, sid, trixie
  • size: 720 kB
  • sloc: cpp: 3,630; sh: 516; makefile: 64
file content (35 lines) | stat: -rw-r--r-- 628 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#ifndef FASTA_HPP
#define FASTA_HPP

#include <string>
#include <istream>
#include <ostream>
#include <vector>

namespace sequence
{
  using std::string;
  using std::vector;
  using std::istream;
  using std::ostream;

  const int CHARS_PER_LINE = 60;
  
  struct FastaRecord
  {
    FastaRecord();
    FastaRecord(const string &);
    string header;
    string sequence;
  };

  istream &operator>>(istream &, FastaRecord &);
  ostream &operator<<(ostream &, const FastaRecord &);
  
  typedef vector<FastaRecord> Fasta;
  
  istream &operator>>(istream &, Fasta &);
  ostream &operator<<(ostream &, const Fasta &);
}

#endif