9 #include <xercesc/dom/DOM.hpp>
10 #include <xercesc/dom/DOMDocument.hpp>
11 #include <xercesc/dom/DOMDocumentType.hpp>
12 #include <xercesc/dom/DOMElement.hpp>
13 #include <xercesc/dom/DOMImplementation.hpp>
14 #include <xercesc/dom/DOMImplementationLS.hpp>
15 #include <xercesc/dom/DOMNodeIterator.hpp>
16 #include <xercesc/dom/DOMNodeList.hpp>
17 #include <xercesc/dom/DOMText.hpp>
18 #include <xercesc/parsers/XercesDOMParser.hpp>
19 #include <xercesc/util/XMLUni.hpp>
37 return g_probe_collection;
41 return g_results_manager;
46 return g_string_cache;
52 void ArbStringCache::open() {
57 WriteCacheFile = fopen(pTmpFileName,
"wb");
58 ReadCacheFile = fopen(pTmpFileName,
"rb");
59 IsOpen = WriteCacheFile && ReadCacheFile;
69 void ArbStringCache::close() {
71 fclose(ReadCacheFile);
76 fclose(WriteCacheFile);
78 WriteCacheFile =
NULp;
92 bool ArbStringCache::allocReadBuffer(
int nLength)
const {
93 if (nLength + 1 > ReadBufferLength) {
98 ReadBufferLength = nLength + 1;
99 ReadBuffer =
new char[ReadBufferLength];
109 WriteCacheFile =
NULp;
110 ReadCacheFile =
NULp;
112 ReadBufferLength = 0;
126 bool bSaved = saveString(pString, strlen(pString), rCachedString);
136 if (IsOpen && pString) {
137 rCachedString.
Len = nLength;
139 fgetpos(WriteCacheFile, &rCachedString.
Pos);
140 fwrite(pString, nLength *
sizeof(
char), 1, WriteCacheFile);
151 bool bLoaded =
false;
154 (rCachedString.
Len > 0) &&
155 allocReadBuffer(rCachedString.
Len))
157 fpos_t nPos = rCachedString.
Pos;
158 fsetpos(ReadCacheFile, &nPos);
160 size_t read = fread(ReadBuffer,
sizeof(
char), rCachedString.
Len, ReadCacheFile);
161 if (read ==
size_t(rCachedString.
Len)) {
162 ReadBuffer[rCachedString.
Len] =
'\0';
164 rString = ReadBuffer;
186 int ArbProbeMatchWeighting::toIndex(
char nC)
const {
227 double ArbProbeMatchWeighting::positionalWeight(
int nPos,
int nLength)
const {
228 double dS = -(::log(10) / Width);
229 double dP = ((2.0 * nPos - nLength) / nLength) - Bias;
230 double dWeight = ::exp(dS * dP * dP);
241 for (
int cx = 0 ; cx < 4 ; cx++) {
242 for (
int cy = 0 ; cy < 4 ; cy++) {
243 PenaltyMatrix[cy][cx] = rCopy.PenaltyMatrix[cy][cx];
254 float aDefaultValues[16] = {
309 for (
int cx = 0 ; cx < 4 ; cx++) {
310 for (
int cy = 0 ; cy < 4 ; cy++) {
311 PenaltyMatrix[cy][cx] = aValues[cz];
321 bool bInitialised =
false;
323 if (pCSValues && pCSWidth && pCSBias) {
326 float aValues[16] = {
333 int nItems = ::sscanf(pCSValues,
338 aValues, aValues + 1, aValues + 2, aValues + 3,
339 aValues + 4, aValues + 5, aValues + 6, aValues + 7,
340 aValues + 8, aValues + 9, aValues + 10, aValues + 11,
341 aValues + 12, aValues + 13, aValues + 14, aValues + 15);
343 nItems += ::sscanf(pCSWidth,
"%f", &dWidth);
344 nItems += ::sscanf(pCSBias,
"%f", &dBias);
346 if (nItems == (16 + 2)) {
361 for (
int cx = 0 ; cx < 4 ; cx++) {
362 for (
int cy = 0 ; cy < 4 ; cy++) {
363 aValues[cz] = PenaltyMatrix[cy][cx];
378 ::fprintf(hFile,
"%s<match_weighting width=\"%g\" bias=\"%g\">\n", pPrefix, Width, Bias);
379 ::fprintf(hFile,
"%s <penalty_matrix values=\"", pPrefix);
381 for (
int cx = 0 ; cx < 4 ; cx++) {
382 for (
int cy = 0 ; cy < 4 ; cy++) {
384 ::fprintf(hFile,
"%g", PenaltyMatrix[cy][cx]);
389 ::fprintf(hFile,
" %g", PenaltyMatrix[cy][cx]);
394 ::fprintf(hFile,
"\"/>\n");
395 ::fprintf(hFile,
"%s</match_weighting>\n", pPrefix);
401 double dWeight = -1.0;
403 if (pSequenceA && pSequenceB) {
404 int nLengthA = strlen(pSequenceA);
405 int nLengthB = strlen(pSequenceB);
406 int nLength = (nLengthA < nLengthB) ? nLengthA : nLengthB;
408 const char *pA = pSequenceA;
409 const char *pB = pSequenceB;
413 for (
int cn = 0 ; cn < nLength ; cn++) {
430 dWeight += PenaltyMatrix[toIndex(*pA)][toIndex(*pB)] * positionalWeight(cn, nLength);
452 double dWeight = -1.0;
454 if (pProbeSequence && pMatchResult) {
456 int nLengthResult = strlen(pMatchResult);
457 int nLength = strlen(pProbeSequence);
459 const char *pS = pProbeSequence;
460 const char *pR = pMatchResult;
463 if (nLength <= nLengthResult) {
464 nMatchLength = nLength;
467 nMatchLength = nLengthResult;
472 for (cn = 0 ; cn < nMatchLength ; cn++) {
512 dWeight += PenaltyMatrix[toIndex(*pS)][toIndex(cB)] * positionalWeight(cn, nLength);
524 int nNoMatch = toIndex(
'U');
526 for (; cn < nLength ; cn++) {
527 dWeight += PenaltyMatrix[toIndex(*pS)][nNoMatch] * positionalWeight(cn, nLength);
587 ::fprintf(hFile,
"%s<probe seq=\"%s\" name=\"%s\"/>\n", pPrefix,
Sequence.c_str(), Name.c_str());
609 DisplayName = Name +
":" +
Sequence;
615 size_t nProbe_Length =
Sequence.length();
619 if (nAllowedMistaches > 20) {
620 nAllowedMistaches = 20;
623 return nAllowedMistaches;
630 void ArbProbeCollection::flush() {
633 for (Iter = ProbeList.begin() ; Iter != ProbeList.end() ; ++Iter) {
649 for (Iter = rList.begin() ; Iter != rList.end() ; ++Iter) {
653 ProbeList.push_back(pProbe);
693 MatchWeighting(rCopy.MatchWeighting)
696 copy(rCopy.ProbeList);
712 copy(rCopy.ProbeList);
714 MatchWeighting = rCopy.MatchWeighting;
723 bool bHasName =
false;
728 pNameStr = XMLString::transcode(pName);
730 XMLString::release(&pNameStr);
738 static bool isElement(DOMNode *pNode, DOMElement*& pElement,
const char *pName) {
739 bool bIsElement =
false;
742 short nNodeType = pNode->getNodeType();
744 if (nNodeType == DOMNode::ELEMENT_NODE) {
745 pElement =
dynamic_cast<xercesc::DOMElement*
>(pNode);
762 bool bOpened =
false;
766 if (pFileAndPath && pFileAndPath[0]) {
767 struct stat FileStatus;
768 int nResult = ::stat(pFileAndPath, &FileStatus);
770 if ((nResult == 0) && !S_ISDIR(FileStatus.st_mode)) {
779 Parser.setValidationScheme(XercesDOMParser::Val_Never);
780 Parser.setDoNamespaces(
false);
781 Parser.setDoSchema(
false);
782 Parser.setLoadExternalDTD(
false);
785 Parser.parse(pFileAndPath);
787 DOMDocument *pDoc = Parser.getDocument();
788 DOMElement *pRoot = pDoc->getDocumentElement();
791 char *pNameAttr =
NULp;
792 XMLCh *pNameAttrStr = XMLString::transcode(
"name");
793 DOMNodeList *pPC_Children;
795 bool bHasProbeList =
false;
796 bool bHasMatchWeighting =
false;
798 pNameAttr = XMLString::transcode(pRoot->getAttribute(pNameAttrStr));
800 XMLString::release(&pNameAttr);
802 pPC_Children = pRoot->getChildNodes();
803 nPC_Count = pPC_Children->getLength();
805 for (XMLSize_t cx = 0 ; cx < nPC_Count ; ++cx) {
806 DOMNode *pPC_Node = pPC_Children->item(cx);
807 DOMElement *pPC_Element =
NULp;
809 if (
isElement(pPC_Node, pPC_Element,
"probe_list")) {
810 DOMNodeList *pPL_Children;
814 pSeqAttrStr = XMLString::transcode(
"seq");
815 pPL_Children = pPC_Element->getChildNodes();
816 nPL_Count = pPL_Children->getLength();
818 for (XMLSize_t cy = 0 ; cy < nPL_Count ; ++cy) {
819 DOMNode *pPL_Node = pPL_Children->item(cy);
820 DOMElement *pPL_Element =
NULp;
821 char *pSeqAttr =
NULp;
823 if (
isElement(pPL_Node, pPL_Element,
"probe")) {
824 pNameAttr = XMLString::transcode(pPL_Element->getAttribute(pNameAttrStr));
825 pSeqAttr = XMLString::transcode(pPL_Element->getAttribute(pSeqAttrStr));
827 add(pNameAttr, pSeqAttr);
829 XMLString::release(&pNameAttr);
830 XMLString::release(&pSeqAttr);
832 bHasProbeList =
true;
836 else if (
isElement(pPC_Node, pPC_Element,
"match_weighting")) {
837 DOMNodeList *pMW_Children;
839 XMLCh *pWidthAttrStr = XMLString::transcode(
"width");
840 XMLCh *pBiasAttrStr = XMLString::transcode(
"bias");
841 char *pWidthStr = XMLString::transcode(pPC_Element->getAttribute(pWidthAttrStr));
842 char *pBiasStr = XMLString::transcode(pPC_Element->getAttribute(pBiasAttrStr));
844 pMW_Children = pPC_Element->getChildNodes();
845 nMW_Count = pMW_Children->getLength();
847 for (XMLSize_t cy = 0 ; cy < nMW_Count ; ++cy) {
848 DOMNode *pPM_Node = pMW_Children->item(cy);
849 DOMElement *pPM_Element =
NULp;
851 if (
isElement(pPM_Node, pPM_Element,
"penalty_matrix")) {
852 XMLCh *pValuesAttrStr = XMLString::transcode(
"values");
853 char *pValuesAttr = XMLString::transcode(pPM_Element->getAttribute(pValuesAttrStr));
855 if (MatchWeighting.
initialise(pValuesAttr, pWidthStr, pBiasStr)) {
856 bHasMatchWeighting =
true;
859 rErrorMessage =
"Too few penalty_matrix values";
862 XMLString::release(&pValuesAttrStr);
863 XMLString::release(&pValuesAttr);
867 XMLString::release(&pWidthAttrStr);
868 XMLString::release(&pBiasAttrStr);
869 XMLString::release(&pWidthStr);
870 XMLString::release(&pBiasStr);
874 XMLString::release(&pNameAttrStr);
876 bOpened = bHasProbeList && bHasMatchWeighting;
878 if (!bHasProbeList) {
879 rErrorMessage +=
"\nprobe_list missing or empty";
882 if (!bHasMatchWeighting) {
883 rErrorMessage +=
"\nmatch_weighting missing or empty";
891 catch (xercesc::DOMException& e1) {
892 char *
message = xercesc::XMLString::transcode(e1.getMessage());
894 rErrorMessage =
"Error parsing file: ";
897 XMLString::release(&message);
899 catch (xercesc::XMLException& e2) {
900 char *
message = xercesc::XMLString::transcode(e2.getMessage());
902 rErrorMessage =
"Error parsing file: ";
905 XMLString::release(&message);
909 XMLPlatformUtils::Terminate();
911 else if (nResult == EACCES) {
912 rErrorMessage =
"Search permission is denied";
914 else if (nResult == EIO) {
915 rErrorMessage =
"Error reading from the file system";
917 else if (nResult == ELOOP) {
918 rErrorMessage =
"Loop exists in symbolic links";
920 else if (nResult == ENAMETOOLONG) {
921 rErrorMessage =
"Path name too long";
923 else if (nResult == ENOENT) {
924 rErrorMessage =
"Component of path existing file or missing";
926 else if (nResult == ENOTDIR) {
927 rErrorMessage =
"Component of path not a directory";
929 else if (nResult == EOVERFLOW) {
934 rErrorMessage =
"Please select a file to load";
946 FILE *hFile = ::fopen(pFileAndPath,
"wt");
951 ::fprintf(hFile,
"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n");
952 ::fprintf(hFile,
"<!DOCTYPE probe_collection>\n");
953 ::fprintf(hFile,
"<probe_collection name=\"%s\">\n", Name.c_str());
954 ::fprintf(hFile,
" <probe_list>\n");
956 for (Iter = ProbeList.begin() ; Iter != ProbeList.end() ; ++Iter) {
964 ::fprintf(hFile,
" </probe_list>\n");
966 MatchWeighting.
writeXML(hFile,
" ");
968 ::fprintf(hFile,
"</probe_collection>\n");
1006 if (found != ProbeList.end()) {
1016 bool bAdded =
false;
1018 if (pSequence && (strlen(pSequence) >= ArbMIN_PROBE_LENGTH)) {
1022 ProbeList.push_back(pNewProbe);
1024 if (ppProbe) *ppProbe = pNewProbe;
1035 bool bReplaced =
false;
1037 if (oldSequence && pSequence && (strlen(pSequence) >= ArbMIN_PROBE_LENGTH)) {
1039 if (found != ProbeList.end()) {
1041 *found =
new ArbProbe(pName, pSequence);
1043 if (ppProbe) *ppProbe = *found;
1057 bool bRemoved =
false;
1063 for (Iter = ProbeList.begin() ; Iter != ProbeList.end() ; ++Iter) {
1066 if (pTestProbe && pTestProbe->
sequence() == rSequence) {
1067 ProbeList.erase(Iter);
1084 bool bClear =
false;
1086 if (ProbeList.size() > 0) {
1132 g_string_cache.
saveString(pResult, nSplitPoint, CachedResultA);
1133 g_string_cache.
saveString(pResult + nSplitPoint, CachedResultB);
1149 CachedResultA(rCopy.CachedResultA),
1150 CachedResultB(rCopy.CachedResultB)
1152 Probe = rCopy.Probe;
1153 Weight = rCopy.Weight;
1154 Padding = rCopy.Padding;
1155 Index = rCopy.Index;
1173 Probe = rCopy.Probe;
1174 CachedResultA = rCopy.CachedResultA;
1175 CachedResultB = rCopy.CachedResultB;
1176 Padding = rCopy.Padding;
1177 Weight = rCopy.Weight;
1189 rHeadline =
"---error--probe-----------------";
1195 char sBuffer[64] = {0};
1199 sprintf(sBuffer,
"%8g %22.22s ", Weight, Probe ? Probe->
name().c_str() :
"");
1212 g_string_cache.
loadString(sResultA, CachedResultA);
1213 g_string_cache.
loadString(sResultB, CachedResultB);
1215 sResult.append(sResultA);
1218 sResult.append(Padding,
' ');
1221 sResult.append(sResultB);
1228 void ArbMatchResultSet::flush() {
1231 for (Iter = ResultMap.begin() ; Iter != ResultMap.end() ; ++Iter) {
1240 CommentList.clear();
1251 for (Iter = rMap.begin() ; Iter != rMap.end() ; ++Iter) {
1265 CommentList.clear();
1270 ArbMatchResultSet::ArbMatchResultSet()
1283 ArbMatchResultSet::ArbMatchResultSet(
const ArbProbe *pProbe)
1293 initialise(pProbe, 0);
1298 ArbMatchResultSet::ArbMatchResultSet(
const ArbMatchResultSet& rCopy)
1300 Headline(rCopy.Headline.c_str()),
1302 CommentList(rCopy.CommentList)
1308 initialise(rCopy.Probe, rCopy.Index);
1309 copy(rCopy.ResultMap);
1311 EndFullName = rCopy.EndFullName;
1316 ArbMatchResultSet::~ArbMatchResultSet() {
1326 void ArbMatchResultSet::initialise(
const ArbProbe *pProbe,
int nIndex) {
1340 const char *pFullName,
1341 const char *pMatchPart,
1342 const char *pResult,
1345 bool bAdded =
false;
1347 if (pResult && pName && pFullName && pMatchPart && Probe && Probe->sequence().length() > 0) {
1349 const char *pMatchStart = pMatchPart;
1350 bool bContinue =
true;
1355 switch (*pMatchStart) {
1377 dWeight = rMatchWeighting.
matchWeightResult(Probe->sequence().c_str(), pMatchStart);
1378 pMatchResult =
new ArbMatchResult(Probe, pResult, EndFullName, dWeight);
1381 pMatchResult->
index(Index);
1393 bool ArbMatchResultSet::isMatched(
const ArbStringList& rCladeList,
1394 bool& bPartialMatch,
1396 double dCladeMarkedThreshold,
1397 double dCladePartiallyMarkedThreshold)
const
1399 bool bMatched =
false;
1400 int nCladeSize = rCladeList.size();
1402 if (nCladeSize > 0) {
1403 int nMatchedSize = (
int)(nCladeSize * dCladeMarkedThreshold + 0.5);
1404 int nPartiallyMatchedSize = (
int)(nCladeSize * dCladePartiallyMarkedThreshold + 0.5);
1405 int nMatchedCount = 0;
1410 if (isMatched(rName, dThreshold)) {
1415 bMatched = (nMatchedCount >= nMatchedSize);
1416 bPartialMatch =
false;
1421 bPartialMatch = (nMatchedCount >= nPartiallyMatchedSize);
1422 bMatched = bPartialMatch;
1431 bool ArbMatchResultSet::isMatched(
const std::string& rName,
double dThreshold)
const {
1432 bool bMatched =
false;
1436 if (Iter != ResultMap.end()) {
1439 bMatched = pResult->
weight() <= dThreshold;
1447 bool ArbMatchResultSet::addComment(
const char *pComment) {
1448 bool bAdded =
false;
1450 if (pComment && Probe && Probe->sequence().length() > 0) {
1461 void ArbMatchResultSet::findMaximumWeight(
double& dMaximumWeight)
const {
1464 for (Iter = ResultMap.begin() ; Iter != ResultMap.end() ; ++Iter) {
1467 if (pResult && dMaximumWeight < pResult->
weight()) {
1468 dMaximumWeight = pResult->
weight();
1478 for (Iter = ResultMap.begin() ; Iter != ResultMap.end() ; ++Iter) {
1482 pResult->
padding(nMaxFullName - EndFullName);
1492 void ArbMatchResultsManager::flush() {
1495 for (Iter = ResultsMap.begin() ; Iter != ResultsMap.end() ; ++Iter) {
1499 pMatchResult->
free();
1508 void ArbMatchResultsManager::initFileName() {
1513 ResultsFileName = pTmpFileName;
1527 MaximumWeight = 0.0;
1535 ResultSetMap(rCopy.ResultSetMap),
1538 MaximumWeight = rCopy.MaximumWeight;
1546 ResultSetMap.clear();
1549 if (ResultsFileName.length() > 0) {
1550 unlink(ResultsFileName.c_str());
1562 ResultSetMap.clear();
1565 if (ResultsFileName.length() > 0) {
1566 unlink(ResultsFileName.c_str());
1578 ArbMatchResultSet *pResultSet =
NULp;
1584 ResultSetMap[pProbe->
sequence()] = ArbMatchResultSet();
1596 const ArbMatchResultSet *pResultSet =
NULp;
1598 if (pProbeSequence) {
1601 if (Iter != ResultSetMap.end()) {
1602 pResultSet = &((*Iter).second);
1617 MaximumWeight = 0.0;
1619 for (Iter = ResultSetMap.begin() ; Iter != ResultSetMap.end() ; ++Iter) {
1620 ArbMatchResultSet& rMatchResultSet = (*Iter).second;
1622 rMatchResultSet.findMaximumWeight(MaximumWeight);
1624 for (IterR = rMatchResultSet.resultMap().begin() ; IterR != rMatchResultSet.resultMap().end() ; ++IterR) {
1628 pMatchResult->
lock();
1639 bool bAborted =
false;
1648 int nMaxFullName = 0;
1651 for (Iter = ResultSetMap.begin() ; (Iter != ResultSetMap.end()) && !bAborted ; ++Iter) {
1652 ArbMatchResultSet& rMatchResultSet = (*Iter).second;
1654 if (rMatchResultSet.endFullName() > nMaxFullName) {
1657 sHeadline += rMatchResultSet.headline();
1658 nMaxFullName = rMatchResultSet.endFullName();
1662 if (pCallback(pContext, sHeadline.c_str(),
true, nItem, nItems)) {
1666 for (Iter = ResultSetMap.begin() ; (Iter != ResultSetMap.end()) && !bAborted ; ++Iter) {
1667 ArbMatchResultSet& rMatchResultSet = (*Iter).second;
1669 rMatchResultSet.enumerateResults(rResultsMap, nMaxFullName);
1673 for (CommentIter = rMatchResultSet.commentList().begin() ;
1674 CommentIter != rMatchResultSet.commentList().begin() ;
1679 if (pCallback(pContext, rComment.c_str(),
true, nItem, nItems)) {
1688 nItems = rResultsMap.size();
1690 for (ResIter = rResultsMap.begin() ; (ResIter != rResultsMap.end()) && !bAborted ; ++ResIter) {
1698 if (pCallback(pContext, sResult.c_str(),
false, nItem, nItems)) {
1715 return ResultsFileName.c_str();
1727 sCommand += ResultsFileName;
1730 execl(
"/bin/sh", sCommand.c_str(), (
char *)
NULp);
ArbMatchResultSet * addResultSet(const ArbProbe *pProbe)
bool operator()(const ArbProbe *probe)
virtual ~ArbProbeCollection()
return string(buffer, length)
void writeXML(FILE *hFile, const char *pPrefix) const
static void Initialize(GLwDrawingAreaWidget req, GLwDrawingAreaWidget neww, ArgList args, Cardinal *num_args)
ArbProbePtrList::const_iterator ArbProbePtrListConstIter
static bool isElement(DOMNode *pNode, DOMElement *&pElement, const char *pName)
std::map< std::string, ArbMatchResultSet >::iterator ArbMatchResultSetByStringMapIter
ArbProbeMatchWeighting & operator=(const ArbProbeMatchWeighting &rCopy)
void initialise(const float aValues[16], float dWidth, float dBias)
static bool elementHasName(DOMElement *pElement, const char *pName)
void writeXML(FILE *hFile, const char *pPrefix) const
int allowedMismatches() const
double matchWeight(const char *pSequenceA, const char *pSequenceB) const
bool saveString(const char *pString, ArbCachedString &rCachedString)
bool openXML(const char *pFileAndPath, std::string &rErrorMessage)
bool loadString(std::string &rString, const ArbCachedString &rCachedString) const
void weightAndResult(std::string &rDest) const
static ArbStringCache & get_string_cache()
char * GB_create_tempfile(const char *name)
static int weight[maxsites+1]
void getParameters(float aValues[16], float &dWidth, float &dBias) const
void name(const char *pName)
hasSequence(std::string seq_)
ArbProbeCollection & get_probe_collection()
void setParameters(const float aValues[16], float dWidth, float dBias)
bool remove(const char *pSequence)
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)
const size_t ArbMIN_PROBE_LENGTH
bool replace(const char *oldSequence, const char *pName, const char *pSequence, const ArbProbe **ppProbe=NULp)
void message(char *errortext)
std::pair< const std::string, ArbMatchResult * > ArbMatchResultPtrStringPair
ArbMatchResultPtrByStringMultiMap::iterator ArbMatchResultPtrByStringMultiMapIter
std::list< std::string > ArbStringList
ArbMatchResultsManager & get_results_manager()
virtual ~ArbProbeMatchWeighting()
ArbMatchResultPtrByStringMultiMap::const_iterator ArbMatchResultPtrByStringMultiMapConstIter
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()
char * GB_unique_filename(const char *name_prefix, const char *suffix)
std::map< std::string, ArbMatchResultSet >::const_iterator ArbMatchResultSetByStringMapConstIter
std::list< ArbProbe * > ArbProbePtrList
static void copy(double **i, double **j)
ArbProbeCollection & operator=(const ArbProbeCollection &rCopy)
bool equals(const copy< T > &t1, const copy< T > &t2)
ArbProbePtrList::iterator ArbProbePtrListIter
const std::string & sequence() const
ArbMatchResultPtrByDoubleMultiMap::iterator ArbMatchResultPtrByDoubleMultiMapIter
ArbMatchResult & operator=(const ArbMatchResult &rCopy)
virtual ~ArbStringCache()
std::pair< const double, ArbMatchResult * > ArbMatchResultPtrDoublePair
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
void setParameters(const float aValues[16], float dWidth, float dBias)
std::multimap< double, ArbMatchResult * > ArbMatchResultPtrByDoubleMultiMap
std::multimap< std::string, ArbMatchResult * > ArbMatchResultPtrByStringMultiMap
const std::string & name() 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
std::list< std::string >::const_iterator ArbStringListConstIter