7 #ifndef PROBE_COLLECTION_HXX
8 #define PROBE_COLLECTION_HXX
16 #ifndef _GLIBCXX_STRING
19 #ifndef _GLIBCXX_ITERATOR
28 #ifndef _GLIBCXX_CERRNO
31 #ifndef _GLIBCXX_CSTDLIB
34 #ifndef _GLIBCXX_CSTDIO
66 mutable FILE *ReadCacheFile;
67 mutable char *ReadBuffer;
68 mutable int ReadBufferLength;
73 bool allocReadBuffer(
int nLength)
const;
107 return RefCount == 0;
123 float PenaltyMatrix[4][4];
127 int toIndex(
char nC)
const;
128 double positionalWeight(
int nPos,
int nLength)
const;
140 void initialise(
const float aValues[16],
float dWidth,
float dBias);
141 bool initialise(
const char *pCSValues,
const char *pCSWidth,
const char *pCSBias);
146 void getParameters(
float aValues[16],
float& dWidth,
float& dBias)
const;
148 void writeXML(FILE *hFile,
const char *pPrefix)
const;
150 double matchWeight(
const char *pSequenceA,
const char *pSequenceB)
const;
151 double matchWeightResult(
const char *pProbeSequence,
const char *pMatchResult)
const;
167 ArbProbe(
const char *pName,
const char *pSequence);
171 void writeXML(FILE *hFile,
const char *pPrefix)
const;
199 mutable bool HasChanged;
213 bool saveXML(
const char *pFileAndPath)
const;
215 void setParameters(
const float aValues[16],
float dWidth,
float dBias);
216 void getParameters(
float aValues[16],
float& dWidth,
float& dBias)
const;
223 bool add(
const char *pName,
const char *pSequence,
const ArbProbe **ppProbe =
NULp);
224 bool replace(
const char *oldSequence,
const char *pName,
const char *pSequence,
const ArbProbe **ppProbe =
NULp);
225 bool remove(
const char *pSequence);
228 void name(
const char *pName);
259 void padding(
int nPadding)
const { Padding = nPadding; }
260 void index(
int nIndex)
const { Index = nIndex; }
305 ArbMatchResultSet(
const ArbProbe *pProbe);
307 ArbMatchResultSet(
const ArbMatchResultSet& rCopy);
309 virtual ~ArbMatchResultSet();
311 void initialise(
const ArbProbe *pProbe,
int nIndex);
313 bool add(
const char *pName,
314 const char *pFullName,
315 const char *pMatchPart,
319 bool addComment(
const char *pComment);
321 void findMaximumWeight(
double& dMaximumWeight)
const;
328 double dCladeMarkedThreshold,
329 double dCladePartiallyMarkedThreshold)
const;
331 bool isMatched(
const std::string& rName,
double dThreshold)
const;
335 return Probe && ResultMap.size() > 0;
340 void headline(
const char *pHeadline,
int nEndFullName) {
342 Headline = pHeadline;
343 EndFullName = nEndFullName;
385 double MaximumWeight;
399 const ArbMatchResultSet *
findResultSet(
const char *pProbeSequence)
const;
421 #error probe_collection.hxx included twice
422 #endif // PROBE_COLLECTION_HXX
ArbMatchResultSet * addResultSet(const ArbProbe *pProbe)
virtual ~ArbProbeCollection()
return string(buffer, length)
std::map< std::string, ArbMatchResultSet > ArbMatchResultSetByStringMap
const ArbProbePtrList & probeList() const
ArbMatchResultsManager & get_results_manager()
void writeXML(FILE *hFile, const char *pPrefix) const
double maximumWeight() const
ArbProbePtrList::const_iterator ArbProbePtrListConstIter
std::map< std::string, ArbMatchResultSet >::iterator ArbMatchResultSetByStringMapIter
ArbProbeMatchWeighting & operator=(const ArbProbeMatchWeighting &rCopy)
void initialise(const float aValues[16], float dWidth, float dBias)
void writeXML(FILE *hFile, const char *pPrefix) const
int allowedMismatches() const
const ArbMatchResultPtrByStringMultiMap & resultMap() const
std::map< int, std::string >::reverse_iterator ArbIntByStringMapRIter
double matchWeight(const char *pSequenceA, const char *pSequenceB) const
const ArbProbe * probe() const
bool saveString(const char *pString, ArbCachedString &rCachedString)
std::map< std::string, ArbMatchResultSet >::reverse_iterator ArbMatchResultSetByStringMapRIter
bool openXML(const char *pFileAndPath, std::string &rErrorMessage)
bool loadString(std::string &rString, const ArbCachedString &rCachedString) const
void weightAndResult(std::string &rDest) const
ArbProbeCollection & get_probe_collection()
std::map< int, std::string > ArbIntByStringMap
ArbRefCount(const ArbRefCount &)
void getParameters(float aValues[16], float &dWidth, float &dBias) const
void headline(const char *pHeadline, int nEndFullName)
void setParameters(const float aValues[16], float dWidth, float dBias)
const char * resultsFileName() const
int enumerate_results(ArbMatchResultsEnumCallback pCallback, void *pContext)
void index(int nIndex) const
bool add(const char *pName, const char *pSequence, const ArbProbe **ppProbe=NULp)
std::map< int, std::string >::const_iterator ArbIntByStringMapConstIter
std::map< int, std::string >::const_reverse_iterator ArbIntByStringMapConstRIter
bool replace(const char *oldSequence, const char *pName, const char *pSequence, const ArbProbe **ppProbe=NULp)
std::map< int, std::string >::iterator ArbIntByStringMapIter
ArbMatchResultPtrByStringMultiMap::iterator ArbMatchResultPtrByStringMultiMapIter
std::list< std::string > ArbStringList
virtual ~ArbProbeMatchWeighting()
ArbMatchResultPtrByStringMultiMap::const_iterator ArbMatchResultPtrByStringMultiMapConstIter
const std::string & displayName() const
const ArbMatchResultSet * findResultSet(const char *pProbeSequence) const
void result(std::string &sResult) const
void padding(int nPadding) const
const std::string & name() const
virtual ~ArbMatchResultsManager()
const ArbProbeMatchWeighting & matchWeighting() const
std::map< std::string, ArbMatchResultSet >::const_iterator ArbMatchResultSetByStringMapConstIter
std::pair< const std::string, ArbMatchResultSet > ArbMatchResultSetStringPair
std::list< ArbProbe * > ArbProbePtrList
static void copy(double **i, double **j)
ArbProbeCollection & operator=(const ArbProbeCollection &rCopy)
ArbProbePtrList::iterator ArbProbePtrListIter
const ArbMatchResultSetByStringMap & resultSetMap() const
const std::string & sequence() const
ArbMatchResultPtrByDoubleMultiMap::iterator ArbMatchResultPtrByDoubleMultiMapIter
ArbMatchResult & operator=(const ArbMatchResult &rCopy)
virtual ~ArbStringCache()
void openResultsFile() const
virtual ~ArbMatchResult()
static void addedHeadline(std::string &rHeadline)
void nameAndSequence(const char *pName, const char *pSequence)
void getParameters(float aValues[16], float &dWidth, float &dBias) const
const ArbStringList & commentList() const
void setParameters(const float aValues[16], float dWidth, float dBias)
std::multimap< double, ArbMatchResult * > ArbMatchResultPtrByDoubleMultiMap
std::pair< int, const std::string > ArbStringIntPair
std::multimap< std::string, ArbMatchResult * > ArbMatchResultPtrByStringMultiMap
const std::string & name() const
const ArbMatchResultPtrByStringMultiMap & resultsMap() const
bool saveXML(const char *pFileAndPath) const
double matchWeightResult(const char *pProbeSequence, const char *pMatchResult) const
bool(* ArbMatchResultsEnumCallback)(void *pContext, const char *pResult, bool bIsComment, int nItem, int nItems)
const ArbProbe * find(const char *pSequence) const
const std::string & headline() const
std::list< std::string >::const_iterator ArbStringListConstIter
std::map< std::string, ArbMatchResultSet >::const_reverse_iterator ArbMatchResultSetByStringMapConstRIter