NVBIO
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Methods | Public Members | List of all members
nvbio::io::SequenceDataViewCore< IndexIterator, SequenceStorageIterator, QualStorageIterator, NameStorageIterator > Struct Template Reference

Detailed description

template< typename IndexIterator = uint32*, typename SequenceStorageIterator = uint32*, typename QualStorageIterator = char*, typename NameStorageIterator = char*>
struct nvbio::io::SequenceDataViewCore< IndexIterator, SequenceStorageIterator, QualStorageIterator, NameStorageIterator >

A storage-less plain-view class to represent the core sequence data iterators. Notice that this class only has runtime knowledge of the underlying alphabet encoding, and as such does provide any direct access to the stored sequences (except for pointers to underlying storage). In order to access the decoded sequences, one needs to provide compile-time knowledge of the alphabet, and create a SequenceDataAccess wrapper.
This class is templated over the iterators pointing to the actual storage, so as to allow them being both raw (const or non-const) pointers or fancier iterators (e.g. cuda::load_pointer or nvbio::vector<system_tag>::iterator's)
Template Parameters
IndexIteratorthe type of the iterator to the reads index
ReadStorageIteratorthe type of the iterator to the reads storage
QualStorageIteratorthe type of the iterator to the qualities storage
NameStorageIteratorthe type of the iterator to the names storage

Definition at line 301 of file sequence.h.

#include <sequence.h>

Inheritance diagram for nvbio::io::SequenceDataViewCore< IndexIterator, SequenceStorageIterator, QualStorageIterator, NameStorageIterator >:
nvbio::io::SequenceDataInfo

Public Types

typedef IndexIterator index_iterator
 the index iterator More...
 
typedef SequenceStorageIterator sequence_storage_iterator
 the read storage iterator More...
 
typedef QualStorageIterator qual_storage_iterator
 the qualities iterator More...
 
typedef NameStorageIterator name_storage_iterator
 the names string iterator More...
 
typedef to_const
< IndexIterator >::type 
const_index_iterator
 the index iterator More...
 
typedef to_const
< SequenceStorageIterator >
::type 
const_sequence_storage_iterator
 the read storage iterator More...
 
typedef to_const
< QualStorageIterator >::type 
const_qual_storage_iterator
 the qualities iterator More...
 
typedef to_const
< NameStorageIterator >::type 
const_name_storage_iterator
 the names string iterator More...
 

Public Methods

NVBIO_HOST_DEVICE NVBIO_FORCEINLINE SequenceDataViewCore ()
 
NVBIO_HOST_DEVICE NVBIO_FORCEINLINE SequenceDataViewCore (const SequenceDataInfo &info, const SequenceStorageIterator sequence_stream, const IndexIterator sequence_index, const QualStorageIterator qual_stream, const NameStorageIterator name_stream, const IndexIterator name_index)
 
template<typename InIndexIterator , typename InSequenceIterator , typename InQualIterator , typename InNameIterator >
NVBIO_HOST_DEVICE NVBIO_FORCEINLINE SequenceDataViewCore (const SequenceDataViewCore< InIndexIterator, InSequenceIterator, InQualIterator, InNameIterator > &in)
 
template<typename InIndexIterator , typename InSequenceIterator , typename InQualIterator , typename InNameIterator >
NVBIO_HOST_DEVICE
NVBIO_FORCEINLINE
SequenceDataViewCore
operator= (const SequenceDataViewCore< InIndexIterator, InSequenceIterator, InQualIterator, InNameIterator > &in)
 
NVBIO_HOST_DEVICE
NVBIO_FORCEINLINE
index_iterator 
name_index ()
 
NVBIO_HOST_DEVICE
NVBIO_FORCEINLINE
index_iterator 
sequence_index ()
 
NVBIO_HOST_DEVICE
NVBIO_FORCEINLINE
name_storage_iterator 
name_stream ()
 
NVBIO_HOST_DEVICE
NVBIO_FORCEINLINE
sequence_storage_iterator 
sequence_storage ()
 
NVBIO_HOST_DEVICE
NVBIO_FORCEINLINE
qual_storage_iterator 
qual_stream ()
 
NVBIO_HOST_DEVICE
NVBIO_FORCEINLINE
const_index_iterator 
name_index () const
 
NVBIO_HOST_DEVICE
NVBIO_FORCEINLINE
const_index_iterator 
sequence_index () const
 
NVBIO_HOST_DEVICE
NVBIO_FORCEINLINE
const_name_storage_iterator 
name_stream () const
 
NVBIO_HOST_DEVICE
NVBIO_FORCEINLINE
const_sequence_storage_iterator 
sequence_storage () const
 
NVBIO_HOST_DEVICE
NVBIO_FORCEINLINE
const_qual_storage_iterator 
qual_stream () const
 
NVBIO_HOST_DEVICE
NVBIO_FORCEINLINE uint2 
get_range (const uint32 i) const
 
- Public Methods inherited from nvbio::io::SequenceDataInfo
NVBIO_HOST_DEVICE NVBIO_FORCEINLINE SequenceDataInfo ()
 
NVBIO_HOST_DEVICE
NVBIO_FORCEINLINE Alphabet 
alphabet () const
 
NVBIO_HOST_DEVICE
NVBIO_FORCEINLINE uint32 
size () const
 
NVBIO_HOST_DEVICE
NVBIO_FORCEINLINE uint32 
bps () const
 
NVBIO_HOST_DEVICE
NVBIO_FORCEINLINE uint32 
words () const
 
NVBIO_HOST_DEVICE
NVBIO_FORCEINLINE uint32 
qs () const
 
NVBIO_HOST_DEVICE
NVBIO_FORCEINLINE uint32 
name_stream_len () const
 
NVBIO_HOST_DEVICE
NVBIO_FORCEINLINE bool 
has_qualities () const
 
NVBIO_HOST_DEVICE
NVBIO_FORCEINLINE uint32 
max_sequence_len () const
 
NVBIO_HOST_DEVICE
NVBIO_FORCEINLINE uint32 
min_sequence_len () const
 
NVBIO_HOST_DEVICE
NVBIO_FORCEINLINE uint32 
avg_sequence_len () const
 

Public Members

name_storage_iterator m_name_stream
 a pointer to a buffer containing the names of all the reads in this batch More...
 
index_iterator m_name_index
 an array of uint32 with the byte indices of the starting locations of each name in name_stream More...
 
sequence_storage_iterator m_sequence_stream
 
index_iterator m_sequence_index
 an array of uint32 with the indices of the starting locations of each read in sequence_stream (in base pairs) More...
 
qual_storage_iterator m_qual_stream
 a pointer to a buffer containing quality data More...
 
- Public Members inherited from nvbio::io::SequenceDataInfo
Alphabet m_alphabet
 the alphabet More...
 
uint32 m_n_seqs
 number of reads in this struct More...
 
uint32 m_name_stream_len
 the length (in bytes) of the name_stream buffer More...
 
uint32 m_sequence_stream_len
 the length of sequence_stream in base pairs More...
 
uint32 m_sequence_stream_words
 the number of words in sequence_stream More...
 
uint32 m_has_qualities
 has qualities More...
 
uint32 m_min_sequence_len
 statistics on the reads More...
 
uint32 m_max_sequence_len
 statistics on the reads More...
 
uint32 m_avg_sequence_len
 statistics on the reads More...
 

Member Typedef Documentation

template<typename IndexIterator = uint32*, typename SequenceStorageIterator = uint32*, typename QualStorageIterator = char*, typename NameStorageIterator = char*>
typedef to_const<IndexIterator>::type nvbio::io::SequenceDataViewCore< IndexIterator, SequenceStorageIterator, QualStorageIterator, NameStorageIterator >::const_index_iterator

the index iterator

Definition at line 308 of file sequence.h.

template<typename IndexIterator = uint32*, typename SequenceStorageIterator = uint32*, typename QualStorageIterator = char*, typename NameStorageIterator = char*>
typedef to_const<NameStorageIterator>::type nvbio::io::SequenceDataViewCore< IndexIterator, SequenceStorageIterator, QualStorageIterator, NameStorageIterator >::const_name_storage_iterator

the names string iterator

Definition at line 311 of file sequence.h.

template<typename IndexIterator = uint32*, typename SequenceStorageIterator = uint32*, typename QualStorageIterator = char*, typename NameStorageIterator = char*>
typedef to_const<QualStorageIterator>::type nvbio::io::SequenceDataViewCore< IndexIterator, SequenceStorageIterator, QualStorageIterator, NameStorageIterator >::const_qual_storage_iterator

the qualities iterator

Definition at line 310 of file sequence.h.

template<typename IndexIterator = uint32*, typename SequenceStorageIterator = uint32*, typename QualStorageIterator = char*, typename NameStorageIterator = char*>
typedef to_const<SequenceStorageIterator>::type nvbio::io::SequenceDataViewCore< IndexIterator, SequenceStorageIterator, QualStorageIterator, NameStorageIterator >::const_sequence_storage_iterator

the read storage iterator

Definition at line 309 of file sequence.h.

template<typename IndexIterator = uint32*, typename SequenceStorageIterator = uint32*, typename QualStorageIterator = char*, typename NameStorageIterator = char*>
typedef IndexIterator nvbio::io::SequenceDataViewCore< IndexIterator, SequenceStorageIterator, QualStorageIterator, NameStorageIterator >::index_iterator

the index iterator

Definition at line 303 of file sequence.h.

template<typename IndexIterator = uint32*, typename SequenceStorageIterator = uint32*, typename QualStorageIterator = char*, typename NameStorageIterator = char*>
typedef NameStorageIterator nvbio::io::SequenceDataViewCore< IndexIterator, SequenceStorageIterator, QualStorageIterator, NameStorageIterator >::name_storage_iterator

the names string iterator

Definition at line 306 of file sequence.h.

template<typename IndexIterator = uint32*, typename SequenceStorageIterator = uint32*, typename QualStorageIterator = char*, typename NameStorageIterator = char*>
typedef QualStorageIterator nvbio::io::SequenceDataViewCore< IndexIterator, SequenceStorageIterator, QualStorageIterator, NameStorageIterator >::qual_storage_iterator

the qualities iterator

Definition at line 305 of file sequence.h.

template<typename IndexIterator = uint32*, typename SequenceStorageIterator = uint32*, typename QualStorageIterator = char*, typename NameStorageIterator = char*>
typedef SequenceStorageIterator nvbio::io::SequenceDataViewCore< IndexIterator, SequenceStorageIterator, QualStorageIterator, NameStorageIterator >::sequence_storage_iterator

the read storage iterator

Definition at line 304 of file sequence.h.

Constructor & Destructor Documentation

template<typename IndexIterator = uint32*, typename SequenceStorageIterator = uint32*, typename QualStorageIterator = char*, typename NameStorageIterator = char*>
NVBIO_HOST_DEVICE NVBIO_FORCEINLINE nvbio::io::SequenceDataViewCore< IndexIterator, SequenceStorageIterator, QualStorageIterator, NameStorageIterator >::SequenceDataViewCore ( )
inline

empty constructor

Definition at line 316 of file sequence.h.

template<typename IndexIterator = uint32*, typename SequenceStorageIterator = uint32*, typename QualStorageIterator = char*, typename NameStorageIterator = char*>
NVBIO_HOST_DEVICE NVBIO_FORCEINLINE nvbio::io::SequenceDataViewCore< IndexIterator, SequenceStorageIterator, QualStorageIterator, NameStorageIterator >::SequenceDataViewCore ( const SequenceDataInfo info,
const SequenceStorageIterator  sequence_stream,
const IndexIterator  sequence_index,
const QualStorageIterator  qual_stream,
const NameStorageIterator  name_stream,
const IndexIterator  name_index 
)
inline

constructor

Definition at line 321 of file sequence.h.

template<typename IndexIterator = uint32*, typename SequenceStorageIterator = uint32*, typename QualStorageIterator = char*, typename NameStorageIterator = char*>
template<typename InIndexIterator , typename InSequenceIterator , typename InQualIterator , typename InNameIterator >
NVBIO_HOST_DEVICE NVBIO_FORCEINLINE nvbio::io::SequenceDataViewCore< IndexIterator, SequenceStorageIterator, QualStorageIterator, NameStorageIterator >::SequenceDataViewCore ( const SequenceDataViewCore< InIndexIterator, InSequenceIterator, InQualIterator, InNameIterator > &  in)
inline

copy constructor

Definition at line 344 of file sequence.h.

Member Function Documentation

template<typename IndexIterator = uint32*, typename SequenceStorageIterator = uint32*, typename QualStorageIterator = char*, typename NameStorageIterator = char*>
NVBIO_HOST_DEVICE NVBIO_FORCEINLINE uint2 nvbio::io::SequenceDataViewCore< IndexIterator, SequenceStorageIterator, QualStorageIterator, NameStorageIterator >::get_range ( const uint32  i) const
inline

get the range of a read in the sequence stream

Definition at line 389 of file sequence.h.

template<typename IndexIterator = uint32*, typename SequenceStorageIterator = uint32*, typename QualStorageIterator = char*, typename NameStorageIterator = char*>
NVBIO_HOST_DEVICE NVBIO_FORCEINLINE index_iterator nvbio::io::SequenceDataViewCore< IndexIterator, SequenceStorageIterator, QualStorageIterator, NameStorageIterator >::name_index ( )
inline

Definition at line 375 of file sequence.h.

template<typename IndexIterator = uint32*, typename SequenceStorageIterator = uint32*, typename QualStorageIterator = char*, typename NameStorageIterator = char*>
NVBIO_HOST_DEVICE NVBIO_FORCEINLINE const_index_iterator nvbio::io::SequenceDataViewCore< IndexIterator, SequenceStorageIterator, QualStorageIterator, NameStorageIterator >::name_index ( ) const
inline

Definition at line 381 of file sequence.h.

template<typename IndexIterator = uint32*, typename SequenceStorageIterator = uint32*, typename QualStorageIterator = char*, typename NameStorageIterator = char*>
NVBIO_HOST_DEVICE NVBIO_FORCEINLINE name_storage_iterator nvbio::io::SequenceDataViewCore< IndexIterator, SequenceStorageIterator, QualStorageIterator, NameStorageIterator >::name_stream ( )
inline

Definition at line 377 of file sequence.h.

template<typename IndexIterator = uint32*, typename SequenceStorageIterator = uint32*, typename QualStorageIterator = char*, typename NameStorageIterator = char*>
NVBIO_HOST_DEVICE NVBIO_FORCEINLINE const_name_storage_iterator nvbio::io::SequenceDataViewCore< IndexIterator, SequenceStorageIterator, QualStorageIterator, NameStorageIterator >::name_stream ( ) const
inline

Definition at line 383 of file sequence.h.

template<typename IndexIterator = uint32*, typename SequenceStorageIterator = uint32*, typename QualStorageIterator = char*, typename NameStorageIterator = char*>
template<typename InIndexIterator , typename InSequenceIterator , typename InQualIterator , typename InNameIterator >
NVBIO_HOST_DEVICE NVBIO_FORCEINLINE SequenceDataViewCore& nvbio::io::SequenceDataViewCore< IndexIterator, SequenceStorageIterator, QualStorageIterator, NameStorageIterator >::operator= ( const SequenceDataViewCore< InIndexIterator, InSequenceIterator, InQualIterator, InNameIterator > &  in)
inline

assignment operator

Definition at line 361 of file sequence.h.

template<typename IndexIterator = uint32*, typename SequenceStorageIterator = uint32*, typename QualStorageIterator = char*, typename NameStorageIterator = char*>
NVBIO_HOST_DEVICE NVBIO_FORCEINLINE qual_storage_iterator nvbio::io::SequenceDataViewCore< IndexIterator, SequenceStorageIterator, QualStorageIterator, NameStorageIterator >::qual_stream ( )
inline

Definition at line 379 of file sequence.h.

template<typename IndexIterator = uint32*, typename SequenceStorageIterator = uint32*, typename QualStorageIterator = char*, typename NameStorageIterator = char*>
NVBIO_HOST_DEVICE NVBIO_FORCEINLINE const_qual_storage_iterator nvbio::io::SequenceDataViewCore< IndexIterator, SequenceStorageIterator, QualStorageIterator, NameStorageIterator >::qual_stream ( ) const
inline

Definition at line 385 of file sequence.h.

template<typename IndexIterator = uint32*, typename SequenceStorageIterator = uint32*, typename QualStorageIterator = char*, typename NameStorageIterator = char*>
NVBIO_HOST_DEVICE NVBIO_FORCEINLINE index_iterator nvbio::io::SequenceDataViewCore< IndexIterator, SequenceStorageIterator, QualStorageIterator, NameStorageIterator >::sequence_index ( )
inline

Definition at line 376 of file sequence.h.

template<typename IndexIterator = uint32*, typename SequenceStorageIterator = uint32*, typename QualStorageIterator = char*, typename NameStorageIterator = char*>
NVBIO_HOST_DEVICE NVBIO_FORCEINLINE const_index_iterator nvbio::io::SequenceDataViewCore< IndexIterator, SequenceStorageIterator, QualStorageIterator, NameStorageIterator >::sequence_index ( ) const
inline

Definition at line 382 of file sequence.h.

template<typename IndexIterator = uint32*, typename SequenceStorageIterator = uint32*, typename QualStorageIterator = char*, typename NameStorageIterator = char*>
NVBIO_HOST_DEVICE NVBIO_FORCEINLINE sequence_storage_iterator nvbio::io::SequenceDataViewCore< IndexIterator, SequenceStorageIterator, QualStorageIterator, NameStorageIterator >::sequence_storage ( )
inline

Definition at line 378 of file sequence.h.

template<typename IndexIterator = uint32*, typename SequenceStorageIterator = uint32*, typename QualStorageIterator = char*, typename NameStorageIterator = char*>
NVBIO_HOST_DEVICE NVBIO_FORCEINLINE const_sequence_storage_iterator nvbio::io::SequenceDataViewCore< IndexIterator, SequenceStorageIterator, QualStorageIterator, NameStorageIterator >::sequence_storage ( ) const
inline

Definition at line 384 of file sequence.h.

Member Data Documentation

template<typename IndexIterator = uint32*, typename SequenceStorageIterator = uint32*, typename QualStorageIterator = char*, typename NameStorageIterator = char*>
index_iterator nvbio::io::SequenceDataViewCore< IndexIterator, SequenceStorageIterator, QualStorageIterator, NameStorageIterator >::m_name_index

an array of uint32 with the byte indices of the starting locations of each name in name_stream

Definition at line 392 of file sequence.h.

template<typename IndexIterator = uint32*, typename SequenceStorageIterator = uint32*, typename QualStorageIterator = char*, typename NameStorageIterator = char*>
name_storage_iterator nvbio::io::SequenceDataViewCore< IndexIterator, SequenceStorageIterator, QualStorageIterator, NameStorageIterator >::m_name_stream

a pointer to a buffer containing the names of all the reads in this batch

Definition at line 391 of file sequence.h.

template<typename IndexIterator = uint32*, typename SequenceStorageIterator = uint32*, typename QualStorageIterator = char*, typename NameStorageIterator = char*>
qual_storage_iterator nvbio::io::SequenceDataViewCore< IndexIterator, SequenceStorageIterator, QualStorageIterator, NameStorageIterator >::m_qual_stream

a pointer to a buffer containing quality data

Definition at line 397 of file sequence.h.

template<typename IndexIterator = uint32*, typename SequenceStorageIterator = uint32*, typename QualStorageIterator = char*, typename NameStorageIterator = char*>
index_iterator nvbio::io::SequenceDataViewCore< IndexIterator, SequenceStorageIterator, QualStorageIterator, NameStorageIterator >::m_sequence_index

an array of uint32 with the indices of the starting locations of each read in sequence_stream (in base pairs)

Definition at line 396 of file sequence.h.

template<typename IndexIterator = uint32*, typename SequenceStorageIterator = uint32*, typename QualStorageIterator = char*, typename NameStorageIterator = char*>
sequence_storage_iterator nvbio::io::SequenceDataViewCore< IndexIterator, SequenceStorageIterator, QualStorageIterator, NameStorageIterator >::m_sequence_stream

a pointer to a buffer containing the read data note that this could point at either host or device memory

Definition at line 393 of file sequence.h.


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