NCBI C++ ToolKit
Public Member Functions | Private Member Functions | Private Attributes | List of all members
NAdapterSearch::CUnpairedAdapterDetector Class Reference

Search Toolkit Book for NAdapterSearch::CUnpairedAdapterDetector

This class assembles adapter sequence based on distribution of word counts. More...

#include <algo/sequence/adapter_search.hpp>

+ Inheritance diagram for NAdapterSearch::CUnpairedAdapterDetector:
+ Collaboration diagram for NAdapterSearch::CUnpairedAdapterDetector:

Public Member Functions

 CUnpairedAdapterDetector ()
 
virtual void AddExemplar (const char *seq, size_t len)
 Add sequence of a spot from an SRA run (single or paired-end read) More...
 
virtual string InferAdapterSeq () const
 returns IUPAC seq of the inferred adapter seq; empty if not found. More...
 
- Public Member Functions inherited from NAdapterSearch::IAdapterDetector
SParamsSetParams ()
 
const SParamsGetParams () const
 
virtual ~IAdapterDetector ()
 

Private Member Functions

TWord x_FindAdapterSeed () const
 Find a word that is likely adapter-specific, if any. More...
 
TWord x_GetAdjacent (TWord w, bool right) const
 if right, return most frequent word whose 11-prefix = 11-suffix of w; otherwise, return most frequent word whose 11-suffix = 11-prefix of w More...
 
void x_ExtendSeed (TWords &words, size_t top_count, bool right) const
 Extend the seed one way, as long as it satisfies extension thresholds. More...
 

Private Attributes

TCounts m_counts
 

Additional Inherited Members

- Protected Attributes inherited from NAdapterSearch::IAdapterDetector
SParams m_params
 

Detailed Description

This class assembles adapter sequence based on distribution of word counts.

Definition at line 170 of file adapter_search.hpp.

Constructor & Destructor Documentation

◆ CUnpairedAdapterDetector()

NAdapterSearch::CUnpairedAdapterDetector::CUnpairedAdapterDetector ( )
inline

Definition at line 173 of file adapter_search.hpp.

Member Function Documentation

◆ AddExemplar()

void NAdapterSearch::CUnpairedAdapterDetector::AddExemplar ( const char *  seq,
size_t  len 
)
virtual

Add sequence of a spot from an SRA run (single or paired-end read)

Implements NAdapterSearch::IAdapterDetector.

Definition at line 314 of file adapter_search.cpp.

References ITERATE, len, m_counts, and NAdapterSearch::s_Translate().

◆ InferAdapterSeq()

string NAdapterSearch::CUnpairedAdapterDetector::InferAdapterSeq ( ) const
virtual

returns IUPAC seq of the inferred adapter seq; empty if not found.

Implements NAdapterSearch::IAdapterDetector.

Definition at line 326 of file adapter_search.cpp.

References NAdapterSearch::s_AsIUPAC(), NAdapterSearch::s_IsHomopolymer(), and seed.

◆ x_ExtendSeed()

void NAdapterSearch::CUnpairedAdapterDetector::x_ExtendSeed ( TWords words,
size_t  top_count,
bool  right 
) const
private

Extend the seed one way, as long as it satisfies extension thresholds.

Definition at line 428 of file adapter_search.cpp.

◆ x_FindAdapterSeed()

NAdapterSearch::TWord NAdapterSearch::CUnpairedAdapterDetector::x_FindAdapterSeed ( ) const
private

Find a word that is likely adapter-specific, if any.

Definition at line 360 of file adapter_search.cpp.

References count, ERR_POST, Info(), log, n, NAdapterSearch::s_AsIUPAC(), and NAdapterSearch::s_IsLowComplexity().

◆ x_GetAdjacent()

NAdapterSearch::TWord NAdapterSearch::CUnpairedAdapterDetector::x_GetAdjacent ( TWord  w,
bool  right 
) const
private

if right, return most frequent word whose 11-prefix = 11-suffix of w; otherwise, return most frequent word whose 11-suffix = 11-prefix of w

Definition at line 407 of file adapter_search.cpp.

References count, and letter().

Member Data Documentation

◆ m_counts

TCounts NAdapterSearch::CUnpairedAdapterDetector::m_counts
private

Definition at line 194 of file adapter_search.hpp.

Referenced by AddExemplar().


The documentation for this class was generated from the following files:
Modified on Fri Sep 20 14:57:08 2024 by modify_doxy.py rev. 669887