-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCFasta.H
42 lines (38 loc) · 1.09 KB
/
CFasta.H
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
36
37
38
39
40
41
/****************************************************************
CFasta.H
BOOM : Bioinformatics Object Oriented Modules
Copyright (C)2012 William H. Majoros ([email protected]).
This is OPEN SOURCE SOFTWARE governed by the Gnu General Public
License (GPL) version 3, as described at www.opensource.org.
****************************************************************/
#ifndef INCL_CFasta_H
#define INCL_CFasta_H
#include <iostream>
#include "String.H"
#include "Vector.H"
#include "File.H"
#include "Regex.H"
using namespace std;
using namespace BOOM;
/****************************************************************
CFASTA : Continuous Fasta format
>gene312
0.04 0.68 0.92 0.12
0.98 0.12 0.84 0.123 0.73
>gene782
0.12 0.321 ...etc...
****************************************************************/
class CFasta {
public:
CFasta(const String &filename);
virtual ~CFasta();
void close();
bool getNextSequence(String &defline,String &id,Vector<double> &values);
bool eof();
protected:
Regex deflineRegex;
File f;
String nextDefline;
String filename;
};
#endif