Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

gnFilter Class Reference

#include <gnFilter.h>

Inheritance diagram for gnFilter:

gnBaseFilter gnClone List of all members.

Public Types

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

Public Member Functions

 gnFilter ()
 gnFilter (const gnFilterType f_type)
 Creates a gnFilter for a predefined filter type.

 gnFilter (const gnSeqC defaultChar, const gnSeqC rdefaultChar)
 gnFilter (const gnFilter &sf)
 ~gnFilter ()
gnFilter * Clone () const
boolean IsValid (const gnSeqC ch) const
gnSeqC MakeValid (const gnSeqC ch) const
gnSeqC Filter (const gnSeqC ch) const
 Filter the given character.

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

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

void ReverseFilter (gnSeqC **seq, gnSeqI &len) const
uint32 IsValid (const string &seq) const
void MakeValid (string &seq) const
void Filter (string &seq) const
 Filters the given string.

void ReverseFilter (string &seq) const
void SetDefaultChar (const gnSeqC ch1, const gnSeqC ch2)
gnSeqC GetDefaultChar () const
gnSeqC GetRDefaultChar () const
void SetSingle (const gnSeqC ch)
void SetPair (const gnSeqC ch1, const gnSeqC ch2)
boolean RemovePair (const gnSeqC ch)
boolean RemoveSingle (const gnSeqC ch)
virtual string GetName () const
 Gets the name of this filter.

virtual void SetName (string name)
 Sets the name of this filter.


Static Public Member Functions

const gnFilter * alphabetCharacterFilter ()
const gnFilter * numberCharacterFilter ()
const gnFilter * proteinSeqFilter ()
const gnFilter * basicDNASeqFilter ()
const gnFilter * fullDNASeqFilter ()
const gnFilter * basicRNASeqFilter ()
const gnFilter * fullRNASeqFilter ()
const gnFilter * DNAtoRNAFilter ()
const gnFilter * RNAtoDNAFilter ()
const gnFilter * DNAComplementFilter ()
const gnFilter * RNAComplementFilter ()

Protected Attributes

string m_name

Private Member Functions

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

Private Attributes

gnSeqC m_pairArray [GNSEQC_MAX]
gnSeqC m_defaultChar
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_defaultChar, m_pairArray, 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, m_pairArray, 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_defaultChar, m_pairArray, 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 gnFilter().

const gnFilter * gnFilter::basicDNASeqFilter   [static]
 

Definition at line 33 of file gnFilter.cpp.

References gnFilter().

const gnFilter * gnFilter::basicRNASeqFilter   [static]
 

Definition at line 43 of file gnFilter.cpp.

References 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 317 of file gnFilter.cpp.

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

Referenced by gnFilter().

void gnFilter::CreateBasicRNAFilter   [private]
 

Definition at line 373 of file gnFilter.cpp.

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

Referenced by gnFilter().

void gnFilter::CreateDNAComplementFilter   [private]
 

Definition at line 499 of file gnFilter.cpp.

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

Referenced by gnFilter().

void gnFilter::CreateDNAtoRNAFilter   [private]
 

Definition at line 427 of file gnFilter.cpp.

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

Referenced by gnFilter().

void gnFilter::CreateFullDNAFilter   [private]
 

Definition at line 335 of file gnFilter.cpp.

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

Referenced by gnFilter().

void gnFilter::CreateFullRNAFilter   [private]
 

Definition at line 389 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 537 of file gnFilter.cpp.

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

Referenced by gnFilter().

void gnFilter::CreateRNAtoDNAFilter   [private]
 

Definition at line 463 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 gnFilter().

Referenced by gnContigSpec::SeqRead().

const gnFilter * gnFilter::DNAtoRNAFilter   [static]
 

Definition at line 53 of file gnFilter.cpp.

References 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(), m_pairArray, 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 Array< T >::data, gnSeqC, gnSeqI, IsValid(), m_pairArray, 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, m_defaultChar, m_pairArray, and NO_REVCOMP_CHAR.

const gnFilter * gnFilter::fullDNASeqFilter   [static]
 

Definition at line 38 of file gnFilter.cpp.

References gnFilter().

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

const gnFilter * gnFilter::fullRNASeqFilter   [static]
 

Definition at line 48 of file gnFilter.cpp.

References gnFilter().

gnSeqC gnFilter::GetDefaultChar   const [inline]
 

Definition at line 190 of file gnFilter.h.

References gnSeqC, and m_defaultChar.

string gnBaseFilter::GetName   const [inline, virtual, inherited]
 

Gets the name of this filter.

Returns:
the filter name

Definition at line 65 of file gnBaseFilter.h.

References gnBaseFilter::m_name.

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 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 IsValid(), and uint32.

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

Definition at line 135 of file gnFilter.h.

References m_pairArray, and NO_REVCOMP_CHAR.

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 MakeValid().

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

Definition at line 162 of file gnFilter.h.

References MakeValid(), and uint32.

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

Definition at line 140 of file gnFilter.h.

References gnSeqC, m_defaultChar, m_pairArray, and NO_REVCOMP_CHAR.

Referenced by MakeValid().

const gnFilter * gnFilter::numberCharacterFilter   [static]
 

Definition at line 22 of file gnFilter.cpp.

References gnFilter().

const gnFilter * gnFilter::proteinSeqFilter   [static]
 

Definition at line 28 of file gnFilter.cpp.

References gnFilter().

boolean gnFilter::RemovePair const gnSeqC    ch [inline]
 

Definition at line 212 of file gnFilter.h.

References m_pairArray, and NO_REVCOMP_CHAR.

boolean gnFilter::RemoveSingle const gnSeqC    ch [inline]
 

Definition at line 219 of file gnFilter.h.

References m_pairArray, and NO_REVCOMP_CHAR.

void gnFilter::ReverseFilter string &    seq const
 

Definition at line 194 of file gnFilter.cpp.

References gnSeqC, m_pairArray, NO_REVCOMP_CHAR, and uint32.

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

Definition at line 157 of file gnFilter.cpp.

References gnSeqC, m_pairArray, NO_REVCOMP_CHAR, and uint32.

Referenced by gnContigSpec::SeqRead().

const gnFilter * gnFilter::RNAComplementFilter   [static]
 

Definition at line 68 of file gnFilter.cpp.

References gnFilter().

const gnFilter * gnFilter::RNAtoDNAFilter   [static]
 

Definition at line 58 of file gnFilter.cpp.

References gnFilter().

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

Definition at line 184 of file gnFilter.h.

References m_defaultChar, and m_rDefaultChar.

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

void gnBaseFilter::SetName string    name [inline, virtual, inherited]
 

Sets the name of this filter.

Parameters:
name the new filter name

Definition at line 70 of file gnBaseFilter.h.

References gnBaseFilter::m_name.

Referenced by CreateAlphabetCharacterFilter(), CreateBasicDNAFilter(), CreateBasicRNAFilter(), CreateDNAComplementFilter(), gnTranslator::CreateDNAProteinTranslator(), CreateDNAtoRNAFilter(), CreateFullDNAFilter(), CreateFullRNAFilter(), CreateNumberCharacterFilter(), gnTranslator::CreateProteinDNATranslator(), CreateProteinFilter(), gnTranslator::CreateProteinRNATranslator(), CreateRNAComplementFilter(), gnTranslator::CreateRNAProteinTranslator(), and CreateRNAtoDNAFilter().

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

Definition at line 206 of file gnFilter.h.

References m_pairArray.

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

void gnFilter::SetSingle const gnSeqC    ch [inline]
 

Definition at line 201 of file gnFilter.h.

References m_pairArray.

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 Filter(), GetDefaultChar(), gnFilter(), MakeValid(), and SetDefaultChar().

string gnBaseFilter::m_name [protected, inherited]
 

Definition at line 60 of file gnBaseFilter.h.

Referenced by gnBaseFilter::GetName(), gnFastTranslator::gnFastTranslator(), gnFilter(), gnPosSpecificTranslator::gnPosSpecificTranslator(), gnTranslator::gnTranslator(), and gnBaseFilter::SetName().

gnSeqC gnFilter::m_pairArray[GNSEQC_MAX] [private]
 

Definition at line 121 of file gnFilter.h.

Referenced by Filter(), gnFilter(), IsValid(), MakeValid(), RemovePair(), RemoveSingle(), ReverseFilter(), SetPair(), and SetSingle().

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 Fri May 9 12:57:58 2003 for libGenome by doxygen1.3-rc3