vdj_pipe
pipeline for processing DNA sequence data
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes | Static Private Attributes | Friends | List of all members
vdj_pipe::Seq_fls< N, S > Class Template Reference

store short sequence in an integer More...

#include <sequence_fls.hpp>

Public Types

typedef Seq_fls self_type
 

Public Member Functions

 Seq_fls ()
 
 Seq_fls (const boost::string_ref seq)
 
 Seq_fls (self_type const &ss)
 
std::size_t size () const
 
self_typeoperator= (self_type const &ss)
 
self_typeoperator= (const boost::string_ref seq)
 
bool operator== (self_type const &sf) const
 
bool operator!= (self_type const &sf) const
 
Nucleotide operator[] (const std::size_t i) const
 
void set (const unsigned i, const Nucleotide n)
 
std::string to_string (std::size_t n=self_type::length()) const
 
std::ostream & print (std::ostream &os, std::size_t n=self_type::length()) const
 

Static Public Member Functions

static std::size_t length ()
 

Static Public Attributes

static const unsigned alphabet_size = N
 

Private Member Functions

void assign (const boost::string_ref seq)
 

Private Attributes

val_
 

Static Private Attributes

static const unsigned BITS_PER_CHAR = boost::static_log2<N>::value
 
static const unsigned MAX_CHARS = sizeof(S) * 8 / BITS_PER_CHAR
 
static const unsigned MASK = ~(~0 << BITS_PER_CHAR)
 

Friends

std::size_t hash_value (self_type const &seq)
 
std::ostream & operator<< (std::ostream &os, self_type const &seq)
 
bool assign (self_type &seq1, const boost::string_ref seq2)
 

Detailed Description

template<unsigned N = 4, typename S = boost::uint_least32_t>
class vdj_pipe::Seq_fls< N, S >

store short sequence in an integer

Template Parameters
Nalphabet size
storagetype

Member Typedef Documentation

template<unsigned N = 4, typename S = boost::uint_least32_t>
typedef Seq_fls vdj_pipe::Seq_fls< N, S >::self_type

Constructor & Destructor Documentation

template<unsigned N = 4, typename S = boost::uint_least32_t>
vdj_pipe::Seq_fls< N, S >::Seq_fls ( )
inline
template<unsigned N = 4, typename S = boost::uint_least32_t>
vdj_pipe::Seq_fls< N, S >::Seq_fls ( const boost::string_ref  seq)
inlineexplicit
template<unsigned N = 4, typename S = boost::uint_least32_t>
vdj_pipe::Seq_fls< N, S >::Seq_fls ( self_type const &  ss)
inline

Member Function Documentation

template<unsigned N = 4, typename S = boost::uint_least32_t>
void vdj_pipe::Seq_fls< N, S >::assign ( const boost::string_ref  seq)
inlineprivate
template<unsigned N = 4, typename S = boost::uint_least32_t>
static std::size_t vdj_pipe::Seq_fls< N, S >::length ( )
inlinestatic
template<unsigned N = 4, typename S = boost::uint_least32_t>
bool vdj_pipe::Seq_fls< N, S >::operator!= ( self_type const &  sf) const
inline
template<unsigned N = 4, typename S = boost::uint_least32_t>
self_type& vdj_pipe::Seq_fls< N, S >::operator= ( self_type const &  ss)
inline
template<unsigned N = 4, typename S = boost::uint_least32_t>
self_type& vdj_pipe::Seq_fls< N, S >::operator= ( const boost::string_ref  seq)
inline
template<unsigned N = 4, typename S = boost::uint_least32_t>
bool vdj_pipe::Seq_fls< N, S >::operator== ( self_type const &  sf) const
inline
template<unsigned N = 4, typename S = boost::uint_least32_t>
Nucleotide vdj_pipe::Seq_fls< N, S >::operator[] ( const std::size_t  i) const
inline
template<unsigned N = 4, typename S = boost::uint_least32_t>
std::ostream& vdj_pipe::Seq_fls< N, S >::print ( std::ostream &  os,
std::size_t  n = self_type::length() 
) const
inline
template<unsigned N = 4, typename S = boost::uint_least32_t>
void vdj_pipe::Seq_fls< N, S >::set ( const unsigned  i,
const Nucleotide  n 
)
inline
template<unsigned N = 4, typename S = boost::uint_least32_t>
std::size_t vdj_pipe::Seq_fls< N, S >::size ( ) const
inline
template<unsigned N = 4, typename S = boost::uint_least32_t>
std::string vdj_pipe::Seq_fls< N, S >::to_string ( std::size_t  n = self_type::length()) const
inline

Friends And Related Function Documentation

template<unsigned N = 4, typename S = boost::uint_least32_t>
bool assign ( self_type seq1,
const boost::string_ref  seq2 
)
friend

Assign seq2 to seq1

Parameters
seq1[out]compressed sequence
seq2[in]regular sequence
Returns
true if seq2 can fit into seq1 and the alphabet of seq1 can accommodate all characters of seq2
template<unsigned N = 4, typename S = boost::uint_least32_t>
std::size_t hash_value ( self_type const &  seq)
friend
template<unsigned N = 4, typename S = boost::uint_least32_t>
std::ostream& operator<< ( std::ostream &  os,
self_type const &  seq 
)
friend

Member Data Documentation

template<unsigned N = 4, typename S = boost::uint_least32_t>
const unsigned vdj_pipe::Seq_fls< N, S >::alphabet_size = N
static
template<unsigned N = 4, typename S = boost::uint_least32_t>
const unsigned vdj_pipe::Seq_fls< N, S >::BITS_PER_CHAR = boost::static_log2<N>::value
staticprivate
template<unsigned N = 4, typename S = boost::uint_least32_t>
const unsigned vdj_pipe::Seq_fls< N, S >::MASK = ~(~0 << BITS_PER_CHAR)
staticprivate
template<unsigned N = 4, typename S = boost::uint_least32_t>
const unsigned vdj_pipe::Seq_fls< N, S >::MAX_CHARS = sizeof(S) * 8 / BITS_PER_CHAR
staticprivate
template<unsigned N = 4, typename S = boost::uint_least32_t>
S vdj_pipe::Seq_fls< N, S >::val_
private

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