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

Shared functionality for sam_reader and bam_reader. More...

Inheritance diagram for shore::sam_base:
shore::bam_reader shore::sam_reader

Classes

struct  config
 Configuration struct that may be passed to sam_reader or bam_reader. More...
 

Public Member Functions

 sam_base (const config &c)
 
leftover_pipe & leftovers ()
 
void set_max_ed (const int ed)
 
void set_max_gaps (const int g)
 
void set_max_gapsize (const int g)
 
void set_max_hits (const int h)
 
void discard_softclipped (const bool d)
 

Static Public Member Functions

static void cigar2aln (std::string &aln, cigarstats &cs, const std::string &read, const std::string &cigar, const shore::sequence_record &chr, const size_t start, const int max_gapsize=1)
 Convert cigar string to shore alignment string. More...
 

Protected Types

typedef std::map< std::string,
size_t >::const_iterator 
ichr_t
 

Protected Member Functions

void load_reference ()
 Load the reference sequence.
 
void xa_parse (shore::alignment &f, std::string &seq, std::string &cigar, bool &isrev, cigarstats &cigsta, size_t &xaofs, const std::string &xa)
 Parse BWA style XA tags.
 

Protected Attributes

config m_conf
 
std::pair< int,
shore::alignment::InsertState
m_peconv [0x801]
 SAM flag to SHORE PE flag conversion table.
 
std::pair< int,
shore::read::InsertState
m_peconv_left [0x801]
 SAM flag leftover SHORE PE flag conversion table.
 
int m_tid [256][256]
 Lookup table for tag enumeration.
 
shore::sink< samheader,
std::string > 
m_header
 
std::map< std::string, size_t > m_refmap
 Maps string refseq IDs to fasta enumerated IDs.
 
std::vector
< shore::sequence_record
m_refseq
 Reference sequences.
 
std::vector< int > m_bamid2seqid
 Converts bam file sequence IDs to fasta enumerated IDs.
 

Static Protected Attributes

static const int MAXTAGS =3224
 Maximum number of tags ([A-Za-z][A-Za-z0-9]) = 3224.
 

Detailed Description

Shared functionality for sam_reader and bam_reader.

Member Function Documentation

static void shore::sam_base::cigar2aln ( std::string &  aln,
cigarstats &  cs,
const std::string &  read,
const std::string &  cigar,
const shore::sequence_record chr,
const size_t  start,
const int  max_gapsize = 1 
)
static

Convert cigar string to shore alignment string.

Returns
A pair (edit_distance,ngaps).

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