NVBIO
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Methods | Public Members | Static Public Members | List of all members
nvbio::FMIndexFilter< host_tag, fm_index_type > Struct Template Reference

Detailed description

template< typename fm_index_type>
struct nvbio::FMIndexFilter< host_tag, fm_index_type >

This class implements a FM-index filter which can be used to find and filter matches between an arbitrary string-set and an FM-index.
The filter will return an ordered set of (index-pos,string-id) pairs, where string-id is the index into the string-set and index-pos is an index into the FM-index.
Template Parameters
fm_index_typethe type of the fm-index

Definition at line 75 of file filter.h.

#include <filter.h>

Inheritance diagram for nvbio::FMIndexFilter< host_tag, fm_index_type >:
nvbio::FMIndexFilterHost< fm_index_type >

Public Types

typedef host_tag system_tag
 the backend system More...
 
typedef fm_index_type index_type
 the index type More...
 
typedef index_type::index_type coord_type
 the coordinate type of the fm-index, uint32|uint64|uint32_2|uint64_2 More...
 
typedef vector_type
< coord_type, 2 >::type 
range_type
 ranges are either uint32_2 or uint64_2; More...
 
typedef vector_type
< coord_type, hit_dim >::type 
hit_type
 hits are either uint2 or uint4 More...
 

Public Methods

template<typename string_set_type >
uint64 rank (const fm_index_type &index, const string_set_type &string_set)
 
template<typename hits_iterator >
void locate (const uint64 begin, const uint64 end, hits_iterator hits)
 
uint64 n_hits () const
 
const range_typeranges () const
 
const uint64ranks () const
 

Public Members

uint32 m_n_queries
 
index_type m_index
 
uint64 m_n_occurrences
 
thrust::host_vector< range_typem_ranges
 
thrust::host_vector< uint64m_slots
 

Static Public Members

static const uint32 coord_dim = vector_traits<coord_type>::DIM
 
static const uint32 hit_dim = coord_dim*2
 hits are either uint2 or uint4 More...
 

Member Typedef Documentation

template<typename fm_index_type >
typedef index_type::index_type nvbio::FMIndexFilter< host_tag, fm_index_type >::coord_type

the coordinate type of the fm-index, uint32|uint64|uint32_2|uint64_2

Definition at line 80 of file filter.h.

template<typename fm_index_type >
typedef vector_type<coord_type,hit_dim>::type nvbio::FMIndexFilter< host_tag, fm_index_type >::hit_type

hits are either uint2 or uint4

Definition at line 86 of file filter.h.

template<typename fm_index_type >
typedef fm_index_type nvbio::FMIndexFilter< host_tag, fm_index_type >::index_type

the index type

Definition at line 78 of file filter.h.

template<typename fm_index_type >
typedef vector_type<coord_type,2>::type nvbio::FMIndexFilter< host_tag, fm_index_type >::range_type

ranges are either uint32_2 or uint64_2;

Definition at line 83 of file filter.h.

template<typename fm_index_type >
typedef host_tag nvbio::FMIndexFilter< host_tag, fm_index_type >::system_tag

the backend system

Definition at line 77 of file filter.h.

Member Function Documentation

template<typename fm_index_type >
template<typename hits_iterator >
void nvbio::FMIndexFilter< host_tag, fm_index_type >::locate ( const uint64  begin,
const uint64  end,
hits_iterator  hits 
)

enumerate all hits in a given range

Template Parameters
hits_iteratora hit_type iterator
Parameters
beginthe beginning of the hits sequence to locate, in [0,n_hits)
endthe end of the hits sequence to locate, in [0,n_hits]

Definition at line 238 of file filter_inl.h.

template<typename fm_index_type >
uint64 nvbio::FMIndexFilter< host_tag, fm_index_type >::n_hits ( ) const
inline

return the number of hits from the last rank query

Definition at line 115 of file filter.h.

template<typename fm_index_type >
const range_type* nvbio::FMIndexFilter< host_tag, fm_index_type >::ranges ( ) const
inline

return the individual ranges of the ranked queries

Definition at line 119 of file filter.h.

template<typename fm_index_type >
template<typename string_set_type >
uint64 nvbio::FMIndexFilter< host_tag, fm_index_type >::rank ( const fm_index_type &  index,
const string_set_type &  string_set 
)

enact the filter on an FM-index and a string-set

Parameters
indexthe FM-index
string-setthe query string-set
Returns
the total number of hits

Definition at line 202 of file filter_inl.h.

template<typename fm_index_type >
const uint64* nvbio::FMIndexFilter< host_tag, fm_index_type >::ranks ( ) const
inline

return the global ranks of the output hits (i.e. the range [ranks[i], ranks[i+1]) identifies the position of the hits corresponding to the i-th query in the locate output)

Definition at line 124 of file filter.h.

Member Data Documentation

template<typename fm_index_type >
const uint32 nvbio::FMIndexFilter< host_tag, fm_index_type >::coord_dim = vector_traits<coord_type>::DIM
static

Definition at line 81 of file filter.h.

template<typename fm_index_type >
const uint32 nvbio::FMIndexFilter< host_tag, fm_index_type >::hit_dim = coord_dim*2
static

hits are either uint2 or uint4

Definition at line 85 of file filter.h.

template<typename fm_index_type >
index_type nvbio::FMIndexFilter< host_tag, fm_index_type >::m_index

Definition at line 127 of file filter.h.

template<typename fm_index_type >
uint64 nvbio::FMIndexFilter< host_tag, fm_index_type >::m_n_occurrences

Definition at line 128 of file filter.h.

template<typename fm_index_type >
uint32 nvbio::FMIndexFilter< host_tag, fm_index_type >::m_n_queries

Definition at line 126 of file filter.h.

template<typename fm_index_type >
thrust::host_vector<range_type> nvbio::FMIndexFilter< host_tag, fm_index_type >::m_ranges

Definition at line 129 of file filter.h.

template<typename fm_index_type >
thrust::host_vector<uint64> nvbio::FMIndexFilter< host_tag, fm_index_type >::m_slots

Definition at line 130 of file filter.h.


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