gnFilter Class Reference

#include <gnFilter.h>

Inheritance diagram for gnFilter:

Inheritance graph
[legend]
Collaboration diagram for gnFilter:

Collaboration graph
[legend]
List of all members.

Public Types

enum  gnFilterType {
  alphabetCharacterFilterType, numberCharacterFilterType, proteinSeqFilterType, basicDNASeqFilterType,
  fullDNASeqFilterType, basicRNASeqFilterType, fullRNASeqFilterType, DNAtoRNAFilterType,
  RNAtoDNAFilterType, DNAComplementFilterType, RNAComplementFilterType
}

Public Member Functions

gnFilterClone () const
void Filter (string &seq) const
 Filters the given string.

void Filter (gnSeqC **seq, gnSeqI &len) const
 Filter the given character array.

gnSeqC Filter (const gnSeqC ch) const
 Filter the given character.

gnSeqC GetDefaultChar () const
gnSeqC GetRDefaultChar () const
 gnFilter (const gnFilter &sf)
 gnFilter (const gnSeqC defaultChar, const gnSeqC rdefaultChar)
 gnFilter (const gnFilterType f_type)
 Creates a gnFilter for a predefined filter type.

 gnFilter ()
uint32 IsValid (const string &seq) const
uint32 IsValid (const gnSeqC *seq, const uint32 len) const
 IsValid() scans the supplied character array for invalid characters.

boolean IsValid (const gnSeqC ch) const
void MakeValid (string &seq) const
void MakeValid (gnSeqC *seq, const uint32 len) const
gnSeqC MakeValid (const gnSeqC ch) const
boolean RemovePair (const gnSeqC ch)
boolean RemoveSingle (const gnSeqC ch)
void ReverseFilter (string &seq) const
void ReverseFilter (gnSeqC **seq, gnSeqI &len) const
void SetDefaultChar (const gnSeqC ch1, const gnSeqC ch2)
void SetPair (const gnSeqC ch1, const gnSeqC ch2)
void SetSingle (const gnSeqC ch)
 ~gnFilter ()

Static Public Member Functions

const gnFilteralphabetCharacterFilter ()
const gnFilterbasicDNASeqFilter ()
const gnFilterbasicRNASeqFilter ()
const gnFilterDNAComplementFilter ()
const gnFilterDNAtoRNAFilter ()
const gnFilterfullDNASeqFilter ()
const gnFilterfullRNASeqFilter ()
const gnFilternumberCharacterFilter ()
const gnFilterproteinSeqFilter ()
const gnFilterRNAComplementFilter ()
const gnFilterRNAtoDNAFilter ()

Private Member Functions

void CreateAlphabetCharacterFilter ()
void CreateBasicDNAFilter ()
void CreateBasicRNAFilter ()
void CreateDNAComplementFilter ()
void CreateDNAtoRNAFilter ()
void CreateFullDNAFilter ()
void CreateFullRNAFilter ()
void CreateNumberCharacterFilter ()
void CreateProteinFilter ()
void CreateRNAComplementFilter ()
void CreateRNAtoDNAFilter ()

Private Attributes

gnSeqC m_defaultChar
gnSeqC m_pairArray [GNSEQC_MAX]
gnSeqC m_rDefaultChar

Member Enumeration Documentation

enum gnFilter::gnFilterType
 

Enumeration values:
alphabetCharacterFilterType 
numberCharacterFilterType 
proteinSeqFilterType 
basicDNASeqFilterType 
fullDNASeqFilterType 
basicRNASeqFilterType 
fullRNASeqFilterType 
DNAtoRNAFilterType 
RNAtoDNAFilterType 
DNAComplementFilterType 
RNAComplementFilterType 

Definition at line 41 of file gnFilter.h.


Constructor & Destructor Documentation

gnFilter::gnFilter  ) 
 

Definition at line 75 of file gnFilter.cpp.

References gnSeqC, GNSEQC_MAX, m_rDefaultChar, and NO_REVCOMP_CHAR.

Referenced by alphabetCharacterFilter(), basicDNASeqFilter(), basicRNASeqFilter(), Clone(), DNAComplementFilter(), DNAtoRNAFilter(), fullDNASeqFilter(), fullRNASeqFilter(), numberCharacterFilter(), proteinSeqFilter(), RNAComplementFilter(), and RNAtoDNAFilter().

gnFilter::gnFilter const gnFilterType  f_type  ) 
 

Creates a gnFilter for a predefined filter type.

Used by the static sequence constructors to avoid the "static initialization order fiasco"

Parameters:
f_type The type of filter to create.
See also:
gnFilterType

Definition at line 99 of file gnFilter.cpp.

References alphabetCharacterFilterType, basicDNASeqFilterType, basicRNASeqFilterType, CreateAlphabetCharacterFilter(), CreateBasicDNAFilter(), CreateBasicRNAFilter(), CreateDNAComplementFilter(), CreateDNAtoRNAFilter(), CreateFullDNAFilter(), CreateFullRNAFilter(), CreateNumberCharacterFilter(), CreateProteinFilter(), CreateRNAComplementFilter(), CreateRNAtoDNAFilter(), DNAComplementFilterType, DNAtoRNAFilterType, fullDNASeqFilterType, fullRNASeqFilterType, gnSeqC, GNSEQC_MAX, NO_REVCOMP_CHAR, numberCharacterFilterType, proteinSeqFilterType, RNAComplementFilterType, and RNAtoDNAFilterType.

gnFilter::gnFilter const gnSeqC  defaultChar,
const gnSeqC  rdefaultChar
 

Definition at line 82 of file gnFilter.cpp.

References gnSeqC, GNSEQC_MAX, m_rDefaultChar, and NO_REVCOMP_CHAR.

gnFilter::gnFilter const gnFilter sf  ) 
 

Definition at line 90 of file gnFilter.cpp.

References gnSeqC, GNSEQC_MAX, m_defaultChar, gnBaseFilter::m_name, m_pairArray, and m_rDefaultChar.

gnFilter::~gnFilter  ) 
 

Definition at line 140 of file gnFilter.cpp.


Member Function Documentation

const gnFilter * gnFilter::alphabetCharacterFilter  )  [static]
 

Definition at line 17 of file gnFilter.cpp.

References alphabetCharacterFilterType, and gnFilter().

const gnFilter * gnFilter::basicDNASeqFilter  )  [static]
 

Definition at line 33 of file gnFilter.cpp.

References basicDNASeqFilterType, and gnFilter().

const gnFilter * gnFilter::basicRNASeqFilter  )  [static]
 

Definition at line 43 of file gnFilter.cpp.

References basicRNASeqFilterType, and gnFilter().

gnFilter * gnFilter::Clone  )  const [inline, virtual]
 

Implements gnBaseFilter.

Definition at line 128 of file gnFilter.h.

References gnFilter().

void gnFilter::CreateAlphabetCharacterFilter  )  [private]
 

Definition at line 222 of file gnFilter.cpp.

References SetDefaultChar(), gnBaseFilter::SetName(), and SetPair().

Referenced by gnFilter().

void gnFilter::CreateBasicDNAFilter  )  [private]
 

Definition at line 350 of file gnFilter.cpp.

References SetDefaultChar(), gnBaseFilter::SetName(), and SetSingle().

Referenced by gnFilter().

void gnFilter::CreateBasicRNAFilter  )  [private]
 

Definition at line 406 of file gnFilter.cpp.

References SetDefaultChar(), gnBaseFilter::SetName(), and SetSingle().

Referenced by gnFilter().

void gnFilter::CreateDNAComplementFilter  )  [private]
 

Definition at line 532 of file gnFilter.cpp.

References SetDefaultChar(), gnBaseFilter::SetName(), SetPair(), and SetSingle().

Referenced by gnFilter().

void gnFilter::CreateDNAtoRNAFilter  )  [private]
 

Definition at line 460 of file gnFilter.cpp.

References SetDefaultChar(), gnBaseFilter::SetName(), SetPair(), and SetSingle().

Referenced by gnFilter().

void gnFilter::CreateFullDNAFilter  )  [private]
 

Definition at line 368 of file gnFilter.cpp.

References SetDefaultChar(), gnBaseFilter::SetName(), and SetSingle().

Referenced by gnFilter().

void gnFilter::CreateFullRNAFilter  )  [private]
 

Definition at line 422 of file gnFilter.cpp.

References SetDefaultChar(), gnBaseFilter::SetName(), and SetSingle().

Referenced by gnFilter().

void gnFilter::CreateNumberCharacterFilter  )  [private]
 

Definition at line 254 of file gnFilter.cpp.

References SetDefaultChar(), gnBaseFilter::SetName(), and SetSingle().

Referenced by gnFilter().

void gnFilter::CreateProteinFilter  )  [private]
 

Definition at line 270 of file gnFilter.cpp.

References SetDefaultChar(), gnBaseFilter::SetName(), and SetSingle().

Referenced by gnFilter().

void gnFilter::CreateRNAComplementFilter  )  [private]
 

Definition at line 570 of file gnFilter.cpp.

References SetDefaultChar(), gnBaseFilter::SetName(), SetPair(), and SetSingle().

Referenced by gnFilter().

void gnFilter::CreateRNAtoDNAFilter  )  [private]
 

Definition at line 496 of file gnFilter.cpp.

References SetDefaultChar(), gnBaseFilter::SetName(), SetPair(), and SetSingle().

Referenced by gnFilter().

const gnFilter * gnFilter::DNAComplementFilter  )  [static]
 

Definition at line 63 of file gnFilter.cpp.

References DNAComplementFilterType, and gnFilter().

Referenced by gnContigSpec::SeqRead().

const gnFilter * gnFilter::DNAtoRNAFilter  )  [static]
 

Definition at line 53 of file gnFilter.cpp.

References DNAtoRNAFilterType, and gnFilter().

void gnFilter::Filter string &  seq  )  const [virtual]
 

Filters the given string.

Parameters:
seq The string to filter

Implements gnBaseFilter.

Definition at line 186 of file gnFilter.cpp.

References gnSeqI, IsValid(), and uint32.

void gnFilter::Filter gnSeqC **  seq,
gnSeqI len
const [inline, virtual]
 

Filter the given character array.

Parameters:
seq A pointer to the character array
len the length of the character array to filter
Returns:
The filtered character

Implements gnBaseFilter.

Definition at line 145 of file gnFilter.cpp.

References gnSeqC, gnSeqI, IsValid(), and uint32.

gnSeqC gnFilter::Filter const gnSeqC  ch  )  const [inline, virtual]
 

Filter the given character.

Parameters:
ch The character to filter
Returns:
The filtered character

Implements gnBaseFilter.

Definition at line 145 of file gnFilter.h.

References gnSeqC, NO_REVCOMP_CHAR, and uint.

const gnFilter * gnFilter::fullDNASeqFilter  )  [static]
 

Definition at line 38 of file gnFilter.cpp.

References fullDNASeqFilterType, and gnFilter().

Referenced by gnABISource::gnABISource(), and gnDNXSource::gnDNXSource().

const gnFilter * gnFilter::fullRNASeqFilter  )  [static]
 

Definition at line 48 of file gnFilter.cpp.

References fullRNASeqFilterType, and gnFilter().

gnSeqC gnFilter::GetDefaultChar  )  const [inline]
 

Definition at line 190 of file gnFilter.h.

References gnSeqC.

gnSeqC gnFilter::GetRDefaultChar  )  const [inline]
 

Definition at line 195 of file gnFilter.h.

References gnSeqC, and m_rDefaultChar.

uint32 gnFilter::IsValid const string &  seq  )  const [inline]
 

Definition at line 172 of file gnFilter.h.

References gnSeqC, IsValid(), and uint32.

uint32 gnFilter::IsValid const gnSeqC seq,
const uint32  len
const [inline]
 

IsValid() scans the supplied character array for invalid characters.

Parameters:
seq The sequence to scan. This is a generic character array.
len The length of the sequence to scan.
Returns:
The index of the first invalid character, or len if none exists

Definition at line 152 of file gnFilter.h.

References gnSeqC, IsValid(), and uint32.

boolean gnFilter::IsValid const gnSeqC  ch  )  const [inline]
 

Definition at line 135 of file gnFilter.h.

References gnSeqC, NO_REVCOMP_CHAR, and uint.

Referenced by Filter(), IsValid(), gnSEQSource::ParseStream(), gnRAWSource::ParseStream(), gnGBKSource::ParseStream(), gnFASSource::ParseStream(), gnSEQSource::SeqRead(), gnGBKSource::SeqRead(), gnFASSource::SeqRead(), gnSEQSource::SeqStartPos(), gnGBKSource::SeqStartPos(), and gnFASSource::SeqStartPos().

void gnFilter::MakeValid string &  seq  )  const [inline]
 

Definition at line 177 of file gnFilter.h.

References gnSeqC, and MakeValid().

void gnFilter::MakeValid gnSeqC seq,
const uint32  len
const [inline]
 

Definition at line 162 of file gnFilter.h.

References gnSeqC, MakeValid(), and uint32.

gnSeqC gnFilter::MakeValid const gnSeqC  ch  )  const [inline]
 

Definition at line 140 of file gnFilter.h.

References gnSeqC, NO_REVCOMP_CHAR, and uint.

Referenced by MakeValid().

const gnFilter * gnFilter::numberCharacterFilter  )  [static]
 

Definition at line 22 of file gnFilter.cpp.

References gnFilter(), and numberCharacterFilterType.

const gnFilter * gnFilter::proteinSeqFilter  )  [static]
 

Definition at line 28 of file gnFilter.cpp.

References gnFilter(), and proteinSeqFilterType.

Referenced by gnFASSource::gnFASSource(), gnGBKSource::gnGBKSource(), and gnSEQSource::gnSEQSource().

boolean gnFilter::RemovePair const gnSeqC  ch  )  [inline]
 

Definition at line 212 of file gnFilter.h.

References gnSeqC, NO_REVCOMP_CHAR, and uint.

boolean gnFilter::RemoveSingle const gnSeqC  ch  )  [inline]
 

Definition at line 219 of file gnFilter.h.

References gnSeqC, NO_REVCOMP_CHAR, and uint.

void gnFilter::ReverseFilter string &  seq  )  const
 

Definition at line 194 of file gnFilter.cpp.

References gnSeqC, NO_REVCOMP_CHAR, and uint32.

void gnFilter::ReverseFilter gnSeqC **  seq,
gnSeqI len
const
 

Definition at line 157 of file gnFilter.cpp.

References gnSeqC, gnSeqI, NO_REVCOMP_CHAR, and uint32.

Referenced by gnContigSpec::SeqRead().

const gnFilter * gnFilter::RNAComplementFilter  )  [static]
 

Definition at line 68 of file gnFilter.cpp.

References gnFilter(), and RNAComplementFilterType.

const gnFilter * gnFilter::RNAtoDNAFilter  )  [static]
 

Definition at line 58 of file gnFilter.cpp.

References gnFilter(), and RNAtoDNAFilterType.

void gnFilter::SetDefaultChar const gnSeqC  ch1,
const gnSeqC  ch2
[inline]
 

Definition at line 184 of file gnFilter.h.

References gnSeqC, and m_rDefaultChar.

Referenced by CreateAlphabetCharacterFilter(), CreateBasicDNAFilter(), CreateBasicRNAFilter(), CreateDNAComplementFilter(), CreateDNAtoRNAFilter(), CreateFullDNAFilter(), CreateFullRNAFilter(), CreateNumberCharacterFilter(), CreateProteinFilter(), CreateRNAComplementFilter(), and CreateRNAtoDNAFilter().

void gnFilter::SetPair const gnSeqC  ch1,
const gnSeqC  ch2
[inline]
 

Definition at line 206 of file gnFilter.h.

References gnSeqC, and uint.

Referenced by CreateAlphabetCharacterFilter(), CreateDNAComplementFilter(), CreateDNAtoRNAFilter(), CreateRNAComplementFilter(), and CreateRNAtoDNAFilter().

void gnFilter::SetSingle const gnSeqC  ch  )  [inline]
 

Definition at line 201 of file gnFilter.h.

References gnSeqC, and uint.

Referenced by CreateBasicDNAFilter(), CreateBasicRNAFilter(), CreateDNAComplementFilter(), CreateDNAtoRNAFilter(), CreateFullDNAFilter(), CreateFullRNAFilter(), CreateNumberCharacterFilter(), CreateProteinFilter(), CreateRNAComplementFilter(), and CreateRNAtoDNAFilter().


Member Data Documentation

gnSeqC gnFilter::m_defaultChar [private]
 

Definition at line 122 of file gnFilter.h.

Referenced by gnFilter().

gnSeqC gnFilter::m_pairArray[GNSEQC_MAX] [private]
 

Definition at line 121 of file gnFilter.h.

Referenced by gnFilter().

gnSeqC gnFilter::m_rDefaultChar [private]
 

Definition at line 123 of file gnFilter.h.

Referenced by GetRDefaultChar(), gnFilter(), and SetDefaultChar().


The documentation for this class was generated from the following files:
Generated on Mon Mar 28 06:00:58 2005 for libGenome by doxygen 1.3.6