SHORE API
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
shore::read Struct Reference

Short read data type. More...

Classes

struct  accessory
 Additional read information, usually represented as optional tags. More...
 

Public Types

enum  InsertState { PE_UNSPECIFIED, PE_FILTER_ORPHAN, PE_TECHNICAL, PE_PAIRED }
 Paired end sequencing attributes. More...
 
enum  PeOrientation { ORI_UNSPECIFIED, ORI_TOWARDS, ORI_AWAY, ORI_SAME }
 Expected orientation relative to read1. More...
 
typedef bool(* compare_type )(const read &, const read &)
 

Public Member Functions

 read ()
 Constructor, init defaults.
 
bool is_firstread () const
 First read of a PE or single end run.
 
bool is_lastread () const
 Second read of a PE run.
 
int get_qual_std (const size_t pos) const
 Get integer quality value for a position.
 
void get_part (shore::read &buf, size_t left, size_t right, bool set_tags) const
 Get the part of the read between left and right. More...
 
void get_clipped_read (shore::read &buf, bool set_tags=false) const
 Get the part of the read between CLL and CLR. More...
 
void get_read_prefix (shore::read &buf, bool set_tags=false) const
 Get the part of the read that comes before CLL. More...
 
void get_read_suffix (shore::read &buf, bool set_tags=false) const
 Get the part of the read that follows CLR. More...
 

Static Public Member Functions

static bool cmp_id (const read &r1, const read &r2)
 ID comparator.
 
static bool cmp_seq (const read &r1, const read &r2)
 Sequence comparator.
 
static bool cmp_id_str (const std::string &id1, const std::string &id2)
 ID comparator (string version).
 
static void qual_sanger2illumina (std::string &qual)
 Convert a quality string from sanger format to solexa/illumina 1.3+ format.
 
static void qual_illumina2sanger (std::string &qual)
 Convert a quality string from solexa/illumina 1.3+ format to sanger format.
 
static void qual_solexa2sanger (std::string &qual)
 Convert a quality string from solexa/illumina 1.0 format to sanger format.
 
static char enc_qual_sanger (const int q)
 Convert an integer quality value to sanger char encoding.
 
static int dec_qual_sanger (const char q)
 Convert a quality value in sanger char encoding tpo integer.
 

Public Attributes

std::string id
 ID of the fragment that the read comes from.
 
std::string sequence
 Sequence of the read.
 
std::string qual_std
 Quality string.
 
int index
 Index of this read. More...
 
InsertState pe_state
 
std::string qual_aux
 Auxiliary quality string.
 
accessory tags
 Optional information, e.g. filtering.
 

Static Public Attributes

static const int ASCIIENC_ILLUMINA =64
 ASCII offset for quality zero in illumina encoding.
 
static const int ASCIIENC_SANGER =33
 ASCII offset for quality zero in sanger encoding.
 
static const int ASCIIENC_CHASTITY =-10
 ASCII offset for chastity 50.
 
static const char insstate_enc [5]
 
static const char * ori_conv [4]
 

Detailed Description

Short read data type.

Member Enumeration Documentation

Paired end sequencing attributes.

Enumerator
PE_UNSPECIFIED 

Any of the below.

PE_FILTER_ORPHAN 

Partner lost due to quality filtering.

PE_TECHNICAL 

E.g. barcode read.

PE_PAIRED 

Not PE_FILTER_ORPHAN or PE_TECHNICAL.

Expected orientation relative to read1.

Enumerator
ORI_UNSPECIFIED 

Unspecified, assume >< or <>.

ORI_TOWARDS 

><, paired end

ORI_AWAY 

<>, mate pair

ORI_SAME 

>>, unidirectional

Member Function Documentation

void shore::read::get_clipped_read ( shore::read buf,
bool  set_tags = false 
) const

Get the part of the read between CLL and CLR.

Parameters
set_tagsAlso copy the tag values (except CLL / CLR).
void shore::read::get_part ( shore::read buf,
size_t  left,
size_t  right,
bool  set_tags 
) const

Get the part of the read between left and right.

Parameters
set_tagsAlso copy the tag values (except CLL / CLR).
void shore::read::get_read_prefix ( shore::read buf,
bool  set_tags = false 
) const

Get the part of the read that comes before CLL.

Parameters
set_tagsAlso copy the tag values (except CLL / CLR).
void shore::read::get_read_suffix ( shore::read buf,
bool  set_tags = false 
) const

Get the part of the read that follows CLR.

Parameters
set_tagsAlso copy the tag values (except CLL / CLR).

Member Data Documentation

int shore::read::index

Index of this read.

0: unpaired read 1..n: paired end or other multi-part read


The documentation for this struct was generated from the following file: