00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef __SEQ_PROPERTIES_HPP__
00025 #define __SEQ_PROPERTIES_HPP__
00026
00030 #include <functional>
00031 #include <cctype>
00032 #include <Sequence/Comparisons.hpp>
00033
00034 namespace Sequence
00035 {
00036 struct ambiguousNucleotide : public std::unary_function<char,bool>
00039 {
00040 inline bool operator()(const char & c) const
00045 {
00046 const char ch = char(std::toupper(c));
00047 return (ch != 'A' &&
00048 ch != 'G' &&
00049 ch != 'T' &&
00050 ch != 'C' );
00051 }
00052 };
00053
00054 struct invalidPolyChar : public std::unary_function<char,bool>
00061 {
00062 inline bool operator()(const char & nucleotide) const
00069 {
00070 const char ch = char(std::toupper(nucleotide));
00071 return ( ch != 'A' &&
00072 ch != 'G' &&
00073 ch != 'C' &&
00074 ch != 'T' &&
00075 ch != 'N' &&
00076 ch != '-' &&
00077 ch != '.' );
00078 }
00079 };
00080
00081 }
00082
00083 #endif