NVBIO
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Methods | List of all members
nvbio::io::SequenceDataEncoder Struct Reference

Detailed description

Base class to encode a host-side SequenceData object. The alphabet is provided to this class as a run-time parameter.

Definition at line 39 of file sequence_encoder.h.

#include <sequence_encoder.h>

Inheritance diagram for nvbio::io::SequenceDataEncoder:
nvbio::io::SequenceDataEncoderImpl< SEQUENCE_ALPHABET >

Public Types

enum  StrandOp { NO_OP = 0x0000, REVERSE_OP = 0x0001, COMPLEMENT_OP = 0x0002, REVERSE_COMPLEMENT_OP = 0x0003 }
 

Public Methods

 SequenceDataEncoder (const Alphabet alphabet)
 
virtual ~SequenceDataEncoder ()
 
virtual void reserve (const uint32 n_reads, const uint32 n_bps)
 
virtual void push_back (const uint32 in_sequence_len, const char *name, const uint8 *base_pairs, const uint8 *quality, const QualityEncoding quality_encoding, const uint32 max_sequence_len, const uint32 trim3, const uint32 trim5, const StrandOp conversion_flags)
 
virtual void begin_batch (void)
 
virtual void end_batch (void)
 
virtual const SequenceDataInfoinfo () const
 
Alphabet alphabet () const
 

Member Enumeration Documentation

a set of flags describing the operators to apply to a given strand

Enumerator
NO_OP 

default, no operator applied

REVERSE_OP 

reverse operator

COMPLEMENT_OP 

complement operator

REVERSE_COMPLEMENT_OP 

convenience definition, same as StrandOp( REVERSE_OP | COMPLEMENT_OP )

Definition at line 43 of file sequence_encoder.h.

Constructor & Destructor Documentation

nvbio::io::SequenceDataEncoder::SequenceDataEncoder ( const Alphabet  alphabet)
inline

constructor

Definition at line 53 of file sequence_encoder.h.

virtual nvbio::io::SequenceDataEncoder::~SequenceDataEncoder ( )
inlinevirtual

destructor

Definition at line 57 of file sequence_encoder.h.

Member Function Documentation

Alphabet nvbio::io::SequenceDataEncoder::alphabet ( ) const
inline

get the alphabet

Definition at line 109 of file sequence_encoder.h.

virtual void nvbio::io::SequenceDataEncoder::begin_batch ( void  )
inlinevirtual

signals that a batch is to begin

Reimplemented in nvbio::io::SequenceDataEncoderImpl< SEQUENCE_ALPHABET >.

Definition at line 97 of file sequence_encoder.h.

virtual void nvbio::io::SequenceDataEncoder::end_batch ( void  )
inlinevirtual

signals that the batch is complete

Reimplemented in nvbio::io::SequenceDataEncoderImpl< SEQUENCE_ALPHABET >.

Definition at line 101 of file sequence_encoder.h.

virtual const SequenceDataInfo* nvbio::io::SequenceDataEncoder::info ( ) const
inlinevirtual

return the sequence data info

Reimplemented in nvbio::io::SequenceDataEncoderImpl< SEQUENCE_ALPHABET >.

Definition at line 105 of file sequence_encoder.h.

virtual void nvbio::io::SequenceDataEncoder::push_back ( const uint32  in_sequence_len,
const char *  name,
const uint8 base_pairs,
const uint8 quality,
const QualityEncoding  quality_encoding,
const uint32  max_sequence_len,
const uint32  trim3,
const uint32  trim5,
const StrandOp  conversion_flags 
)
inlinevirtual

add a read to the end of this batch

Parameters
sequence_leninput read length
nameread name
base_pairslist of base pairs
qualitylist of base qualities
quality_encodingquality encoding scheme
max_sequence_lentruncate the read if longer than this
conversion_flagsconversion operators applied to the strand

Reimplemented in nvbio::io::SequenceDataEncoderImpl< SEQUENCE_ALPHABET >.

Definition at line 73 of file sequence_encoder.h.

virtual void nvbio::io::SequenceDataEncoder::reserve ( const uint32  n_reads,
const uint32  n_bps 
)
inlinevirtual

reserve enough storage for a given number of reads and bps

Reimplemented in nvbio::io::SequenceDataEncoderImpl< SEQUENCE_ALPHABET >.

Definition at line 61 of file sequence_encoder.h.


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