1 #ifndef gamgee__fastq__guard
2 #define gamgee__fastq__guard
19 m_name {}, m_comment {}, m_sequence{}, m_quals{} {}
25 std::string
quals =
""
42 return !(*
this == other);
51 return m_name == other.m_name &&
52 m_comment == other.m_comment &&
53 m_sequence == other.m_sequence &&
54 m_quals == other.m_quals;
58 std::string
name()
const {
return m_name; }
59 std::string
comment()
const {
return m_comment; }
60 std::string
sequence()
const {
return m_sequence; }
61 std::string
quals()
const {
return m_quals; }
67 void chop(
const int nBases);
74 std::string m_comment;
75 std::string m_sequence;
90 #endif // gamgee__fastq__guard
void set_sequence(const std::string &sequence)
Definition: fastq.h:64
bool is_fastq() const
true if the record has a quals in it's qual field
Definition: fastq.cpp:10
std::string comment() const
Definition: fastq.h:59
void set_name(const std::string &name)
Definition: fastq.h:62
void reverse_complement()
transform the sequence into it's reverse complement.
Definition: fastq.cpp:20
Fastq & operator=(const Fastq &)=default
std::string sequence() const
Definition: fastq.h:60
Utility class to hold one FastA or FastQ record.
Definition: fastq.h:13
bool operator!=(const Fastq &other) const
inequality comparison of all fields in the record
Definition: fastq.h:41
void chop(const int nBases)
hard clips the first n bases of the read.
Definition: fastq.cpp:14
std::string quals() const
Definition: fastq.h:61
bool operator==(const Fastq &other) const
equality comparison of all fields in the record
Definition: fastq.h:50
void set_quals(const std::string &quals)
Definition: fastq.h:65
Definition: exceptions.h:9
std::ostream & operator<<(std::ostream &os, const gamgee::Fastq &fq)
outputs the fastq record in fastq format.
Definition: fastq.cpp:34
Fastq(std::string name, std::string comment, std::string sequence, std::string quals="")
creates a full object by assigning all fields
Definition: fastq.h:22
void set_comment(const std::string &comment)
Definition: fastq.h:63
Fastq()
creates an empty record
Definition: fastq.h:18
std::string name() const
Definition: fastq.h:58