Gamgee
You miserable little maggot. I'll stove your head in!
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | List of all members
gamgee::Fastq Class Reference

Utility class to hold one FastA or FastQ record. More...

#include <fastq.h>

Public Member Functions

 Fastq ()
 creates an empty record More...
 
 Fastq (std::string name, std::string comment, std::string sequence, std::string quals="")
 creates a full object by assigning all fields More...
 
 Fastq (const Fastq &)=default
 
Fastqoperator= (const Fastq &)=default
 
 Fastq (Fastq &&)=default
 
Fastqoperator= (Fastq &&)=default
 
bool operator!= (const Fastq &other) const
 inequality comparison of all fields in the record More...
 
bool operator== (const Fastq &other) const
 equality comparison of all fields in the record More...
 
std::string name () const
 
std::string comment () const
 
std::string sequence () const
 
std::string quals () const
 
void set_name (const std::string &name)
 
void set_comment (const std::string &comment)
 
void set_sequence (const std::string &sequence)
 
void set_quals (const std::string &quals)
 
void chop (const int nBases)
 hard clips the first n bases of the read. More...
 
void reverse_complement ()
 transform the sequence into it's reverse complement. More...
 
bool is_fastq () const
 true if the record has a quals in it's qual field More...
 

Detailed Description

Utility class to hold one FastA or FastQ record.

Will automatically output a FastA or FastQ based on the presence of quality scores.

Constructor & Destructor Documentation

gamgee::Fastq::Fastq ( )
inline

creates an empty record

gamgee::Fastq::Fastq ( std::string  name,
std::string  comment,
std::string  sequence,
std::string  quals = "" 
)
inline

creates a full object by assigning all fields

Parameters
namesequence name
commentoptional comment
sequencesequence bases
qualsoptional quality scores (leave it out for FastA)
gamgee::Fastq::Fastq ( const Fastq )
default
gamgee::Fastq::Fastq ( Fastq &&  )
default

Member Function Documentation

void gamgee::Fastq::chop ( const int  nBases)

hard clips the first n bases of the read.

std::string gamgee::Fastq::comment ( ) const
inline
bool gamgee::Fastq::is_fastq ( ) const

true if the record has a quals in it's qual field

std::string gamgee::Fastq::name ( ) const
inline
bool gamgee::Fastq::operator!= ( const Fastq other) const
inline

inequality comparison of all fields in the record

Returns
true if any field differs (string comparison)
Fastq& gamgee::Fastq::operator= ( const Fastq )
default
Fastq& gamgee::Fastq::operator= ( Fastq &&  )
default
bool gamgee::Fastq::operator== ( const Fastq other) const
inline

equality comparison of all fields in the record

Returns
true only if every field is the same (string comparison)
std::string gamgee::Fastq::quals ( ) const
inline
void gamgee::Fastq::reverse_complement ( )

transform the sequence into it's reverse complement.

std::string gamgee::Fastq::sequence ( ) const
inline
void gamgee::Fastq::set_comment ( const std::string &  comment)
inline
void gamgee::Fastq::set_name ( const std::string &  name)
inline
void gamgee::Fastq::set_quals ( const std::string &  quals)
inline
void gamgee::Fastq::set_sequence ( const std::string &  sequence)
inline

The documentation for this class was generated from the following files: