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::MEMFilter< device_tag, fm_index_type > Struct Template Reference

Detailed description

template< typename fm_index_type>
struct nvbio::MEMFilter< device_tag, fm_index_type >

This class implements an FM-index filter which can be used to find and filter MEMs between an arbitrary string-set and an FM-index.
The filter is designed to:
  • first find and rank the suffix array ranges containing occurrences of all MEMs, expressed as a series of lists of (SA-begin, SA-end,string-id,string_begin|string-end<<16) tuples: there is one such list for each string in the set, and the entries are stored contiguously in a single vector;
  • and then enumerate each individual occurrence of a MEM within the lists, as a set of (index-pos,string-id,string-begin,string-end) tuples.
Template Parameters
fm_index_typethe type of the fm-index

Definition at line 379 of file mem.h.

#include <mem.h>

Inheritance diagram for nvbio::MEMFilter< device_tag, fm_index_type >:
nvbio::MEMFilterDevice< fm_index_type >

Public Types

typedef device_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 More...
 
typedef MEMRange< coord_typerank_type
 rank coordinates are either uint32_4 or uint64_4 More...
 
typedef MEMHit< coord_typemem_type
 MEM coordinates are either uint32_4 or uint64_4. More...
 
typedef mem_type hit_type
 MEM coordinates are either uint32_4 or uint64_4. More...
 

Public Methods

template<typename string_set_type >
uint64 rank (const fm_index_type &f_index, const fm_index_type &r_index, const string_set_type &string_set, const uint32 min_intv=1u, const uint32 max_intv=uint32(-1), const uint32 min_span=1u, const uint32 split_len=uint32(-1), const uint32 split_width=uint32(-1))
 
uint32 first_hit (const uint32 string_id) const
 
template<typename mems_iterator >
void locate (const uint64 begin, const uint64 end, mems_iterator mems)
 
uint64 n_hits () const
 
uint64 n_mems () const
 
uint64 n_ranges () const
 

Public Members

uint32 m_n_queries
 
index_type m_f_index
 
index_type m_r_index
 
uint64 m_n_occurrences
 
DeviceVectorArray< rank_typem_mem_ranges
 
thrust::device_vector< uint64m_slots
 
thrust::device_vector< uint8d_temp_storage
 

Static Public Members

static const uint32 coord_dim = vector_traits<coord_type>::DIM
 

Member Typedef Documentation

template<typename fm_index_type >
typedef index_type::index_type nvbio::MEMFilter< device_tag, fm_index_type >::coord_type

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

Definition at line 384 of file mem.h.

template<typename fm_index_type >
typedef mem_type nvbio::MEMFilter< device_tag, fm_index_type >::hit_type

MEM coordinates are either uint32_4 or uint64_4.

Definition at line 389 of file mem.h.

template<typename fm_index_type >
typedef fm_index_type nvbio::MEMFilter< device_tag, fm_index_type >::index_type

the index type

Definition at line 382 of file mem.h.

template<typename fm_index_type >
typedef MEMHit<coord_type> nvbio::MEMFilter< device_tag, fm_index_type >::mem_type

MEM coordinates are either uint32_4 or uint64_4.

Definition at line 388 of file mem.h.

template<typename fm_index_type >
typedef MEMRange<coord_type> nvbio::MEMFilter< device_tag, fm_index_type >::rank_type

rank coordinates are either uint32_4 or uint64_4

Definition at line 387 of file mem.h.

template<typename fm_index_type >
typedef device_tag nvbio::MEMFilter< device_tag, fm_index_type >::system_tag

the backend system

Definition at line 381 of file mem.h.

Member Function Documentation

template<typename fm_index_type >
uint32 nvbio::MEMFilter< device_tag, fm_index_type >::first_hit ( const uint32  string_id) const

find the index of the first MEM hit corresponding to a given string

Definition at line 1477 of file mem_inl.h.

template<typename fm_index_type >
template<typename mems_iterator >
void nvbio::MEMFilter< device_tag, fm_index_type >::locate ( const uint64  begin,
const uint64  end,
mems_iterator  mems 
)

enumerate all mems in a given range

Template Parameters
mems_iteratora mem_type iterator
Parameters
beginthe beginning of the mems sequence to locate, in [0,n_mems)
endthe end of the mems sequence to locate, in [0,n_mems]

Definition at line 1499 of file mem_inl.h.

template<typename fm_index_type >
uint64 nvbio::MEMFilter< device_tag, fm_index_type >::n_hits ( ) const
inline

return the number of mems from the last rank query

Definition at line 432 of file mem.h.

template<typename fm_index_type >
uint64 nvbio::MEMFilter< device_tag, fm_index_type >::n_mems ( ) const
inline

return the number of mems from the last rank query

Definition at line 436 of file mem.h.

template<typename fm_index_type >
uint64 nvbio::MEMFilter< device_tag, fm_index_type >::n_ranges ( ) const
inline

return the number of MEM ranges

Definition at line 440 of file mem.h.

template<typename fm_index_type >
template<typename string_set_type >
uint64 nvbio::MEMFilter< device_tag, fm_index_type >::rank ( const fm_index_type &  f_index,
const fm_index_type &  r_index,
const string_set_type &  string_set,
const uint32  min_intv = 1u,
const uint32  max_intv = uint32(-1),
const uint32  min_span = 1u,
const uint32  split_len = uint32(-1),
const uint32  split_width = uint32(-1) 
)

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

Parameters
f_indexthe forward FM-index
r_indexthe reverse FM-index
string-setthe query string-set
min_intvthe minimum number of occurrences k of a k-MEM
max_intvthe maximum number of occurrences k of a k-MEM
min_spanthe minimum span length on the pattern of MEM
Returns
the total number of mems

Definition at line 1312 of file mem_inl.h.

Member Data Documentation

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

Definition at line 385 of file mem.h.

template<typename fm_index_type >
thrust::device_vector<uint8> nvbio::MEMFilter< device_tag, fm_index_type >::d_temp_storage

Definition at line 448 of file mem.h.

template<typename fm_index_type >
index_type nvbio::MEMFilter< device_tag, fm_index_type >::m_f_index

Definition at line 443 of file mem.h.

template<typename fm_index_type >
DeviceVectorArray<rank_type> nvbio::MEMFilter< device_tag, fm_index_type >::m_mem_ranges

Definition at line 446 of file mem.h.

template<typename fm_index_type >
uint64 nvbio::MEMFilter< device_tag, fm_index_type >::m_n_occurrences

Definition at line 445 of file mem.h.

template<typename fm_index_type >
uint32 nvbio::MEMFilter< device_tag, fm_index_type >::m_n_queries

Definition at line 442 of file mem.h.

template<typename fm_index_type >
index_type nvbio::MEMFilter< device_tag, fm_index_type >::m_r_index

Definition at line 444 of file mem.h.

template<typename fm_index_type >
thrust::device_vector<uint64> nvbio::MEMFilter< device_tag, fm_index_type >::m_slots

Definition at line 447 of file mem.h.


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