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 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76
|
//
// fastqread.h
// Mothur
//
// Created by Sarah Westcott on 1/26/15.
// Copyright (c) 2015 Schloss Lab. All rights reserved.
//
#ifndef Mothur_fastqread_h
#define Mothur_fastqread_h
#include "mothur.h"
#include "mothurout.h"
#include "sequence.hpp"
#include "qualityscores.h"
/* This class is a representation of a fastqread. If no format is given, defaults to illumina1.8+.
@M00704:50:000000000-A3G0K:1:1101:15777:1541 2:N:0:0
NCTCTACCAGGCCAAGCATAATGGGCGGGATCGTATCGAAGTAGCCTTGATGGGTAAGGTTGCCTGAGTTTCACAAGACAGATTACAGAGGTCGTCTATGCCCTGTCTCTTATACACATCTGACGCTGCCGACGAATAGAGAGGTGTAGATCTCGGTGGTCGCCGTATCATTAAAAAAAATATCGTCTAGGCCATGTGTGACGCTCGGTCTGGGCTTCACGAACAGGGGGTCCGCCATGTACCGCGCGCTC
+
#>>3AAFFFBAAFAGGFFFFGFHHHGGGG0EFGFHHFGHBFFGFDGHFGEGFFEBEGFCBFGFGFF2F4B3EGFHHHEHEHGHHH3FGHFG3BEEFHHHGGEGHFFHHEFGHHFHFHHF1B?FFD/AD/FC/<@D-.FGBF1<<<<<<GH0=GE<C<AD.0--:-;::900000900---.000./..;/;/9;//9/;;//....--;..//....9//9.;--/..---..--.-9/////.------.
*/
class FastqRead {
public:
#ifdef UNIT_TEST
friend class TestFastqRead;
#endif
FastqRead();
FastqRead(Sequence, QualityScores);
FastqRead(Sequence, QualityScores, string);
FastqRead(string f);
FastqRead(string f, string n, string s, vector<int> sc);
FastqRead(ifstream&, bool&, string f);
#ifdef USE_BOOST
FastqRead(boost::iostreams::filtering_istream&, bool&, string f);
#endif
~FastqRead() = default;
void setFormat(string f) { format = f; }
string getFormat() { return format; }
string getName() { return name; }
void setName(string n) { name = n; }
string getSeq() { return sequence; }
void setSeq(string s) { sequence = s; }
vector<int> getScores() { return scores; }
void setScores(vector<int> s);
void printFastq(ostream&);
Sequence getSequence();
QualityScores getQuality();
private:
MothurOut* m;
Utils util;
vector<int> scores;
string name, comment;
string sequence;
string scoreString;
string format;
vector<char> convertTable;
vector<int> convertBackTable;
vector<int> convertQual(string qual);
string convertQual(vector<int>);
};
#endif
|