Date: Thu, 12 Jun 2008 19:29:45 GMT From: Fernan Aguero <fernan@iib.unsam.edu.ar> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/124525: [NEW PORT] biology/ssaha Message-ID: <200806121929.m5CJTj90015608@www.freebsd.org> Resent-Message-ID: <200806121930.m5CJU6gs002094@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 124525 >Category: ports >Synopsis: [NEW PORT] biology/ssaha >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Thu Jun 12 19:30:06 UTC 2008 >Closed-Date: >Last-Modified: >Originator: Fernan Aguero >Release: 6.3 >Organization: UNSAM >Environment: >Description: >How-To-Repeat: >Fix: Patch attached with submission follows: # This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # ssaha/ # ssaha/Makefile # ssaha/distinfo # ssaha/files # ssaha/files/patch-makefile # ssaha/files/patch-GlobalDefinitions.h # ssaha/files/patch-HashTable.cpp # ssaha/files/patch-SSAHAMain.h # ssaha/files/patch-SequenceEncoder.cpp # ssaha/files/patch-HashTablePacked.cpp # ssaha/files/patch-HashTablePacked.h # ssaha/files/patch-HashTableTranslated.cpp # ssaha/files/patch-MatchAligner.cpp # ssaha/files/patch-MatchAligner.h # ssaha/files/patch-testQueryManager.cpp # ssaha/files/patch-MatchStore.h # ssaha/files/patch-MatchStoreGapped.h # ssaha/files/patch-README # ssaha/files/patch-MatchStoreUngapped.h # ssaha/files/patch-QueryManager.cpp # ssaha/files/patch-QueryManager.h # ssaha/files/patch-SSAHAMain.cpp # ssaha/files/patch-SequenceReader.cpp # ssaha/files/patch-SequenceReader.h # ssaha/files/patch-SequenceReaderFasta.cpp # ssaha/files/patch-SequenceReaderFasta.h # ssaha/files/patch-SequenceReaderFilter.h # ssaha/files/patch-SequenceReaderLocal.cpp # ssaha/files/patch-SequenceReaderMulti.cpp # ssaha/files/patch-SequenceReaderMulti.h # ssaha/files/patch-SequenceReaderString.h # ssaha/files/patch-testHashTableNoOverlap.cpp # ssaha/files/patch-GlobalDefinitions.cpp # ssaha/files/patch-HashTableGeneric.cpp # ssaha/files/patch-testSequenceReaderFasta.cpp # ssaha/pkg-plist # ssaha/pkg-descr # echo c - ssaha/ mkdir -p ssaha/ > /dev/null 2>&1 echo x - ssaha/Makefile sed 's/^X//' >ssaha/Makefile << 'END-of-ssaha/Makefile' X# New ports collection makefile for: ssaha X# Date created: 12.Jun.2008 X# Whom: Fernan Aguero <fernan@iib.unsam.edu.ar> X# X# $FreeBSD$ X# X XPORTNAME= ssaha XPORTVERSION= 3.1c XCATEGORIES= biology XMASTER_SITES= http://www.sanger.ac.uk/Software/analysis/${PORTNAME:U}/ XDISTNAME= ${PORTNAME}_v${PORTVERSION:S/.//} X XMAINTAINER= fernan@iib.unsam.edu.ar XCOMMENT= Very fast matching and alignment of DNA sequences X XNO_WRKSUBDIR= yes X XUSE_GMAKE= yes XMAKEFILE= makefile XBUILD_WRKSRC= ${WRKDIR}/Binary XALL_TARGET= ssaha X XDATA_FILES= test.fasta test_extract.fasta test_filter.fail \ X test_filter.fastq test_protein.fasta README X Xdo-install: X ${INSTALL_PROGRAM} ${BUILD_WRKSRC}/ssaha ${PREFIX}/bin X @${MKDIR} ${DATADIR} X ${INSTALL_SCRIPT} ${BUILD_WRKSRC}/testSSAHA.csh ${DATADIR} X.for file in ${DATA_FILES} X (cd ${BUILD_WRKSRC} && ${INSTALL_DATA} ${file} ${DATADIR}) X.endfor X X.include <bsd.port.mk> END-of-ssaha/Makefile echo x - ssaha/distinfo sed 's/^X//' >ssaha/distinfo << 'END-of-ssaha/distinfo' XMD5 (ssaha_v31c.tar.gz) = 0260a0cce67c5c465f5b54a45b3f65ae XSHA256 (ssaha_v31c.tar.gz) = 63fa38ccd2725db6ba10881f8cc94d899afd2eba9c2f6436223d9284c5abfced XSIZE (ssaha_v31c.tar.gz) = 251510 END-of-ssaha/distinfo echo c - ssaha/files mkdir -p ssaha/files > /dev/null 2>&1 echo x - ssaha/files/patch-makefile sed 's/^X//' >ssaha/files/patch-makefile << 'END-of-ssaha/files/patch-makefile' X--- ./Binary/makefile.orig 2008-06-12 16:00:19.000000000 -0300 X+++ ./Binary/makefile 2008-06-12 16:00:43.000000000 -0300 X@@ -11,10 +11,10 @@ X # copy of the SSAHA directory structure you should be able to make files X # straight away. X # X-# SSAHA_TOP_DIR=$(SSAHA_DIR?$(SSAHA_DIR):$(PWD)/../) X+SSAHA_TOP_DIR=$(PWD)/../ X # Above is a nice idea, but syntax doesn't work for all versions of make X # so must define CURRENT_SSAHA_VERSION, eg in your .cshrc file - TC 14.3.01 X-SSAHA_TOP_DIR=$(CURRENT_SSAHA_VERSION) X+# SSAHA_TOP_DIR=$(CURRENT_SSAHA_VERSION) X X GLOBAL_DIR=${SSAHA_TOP_DIR}/Global X SEQ_DIR=${SSAHA_TOP_DIR}/SequenceReader END-of-ssaha/files/patch-makefile echo x - ssaha/files/patch-GlobalDefinitions.h sed 's/^X//' >ssaha/files/patch-GlobalDefinitions.h << 'END-of-ssaha/files/patch-GlobalDefinitions.h' X--- ./Global/GlobalDefinitions.h.orig 2004-03-01 13:51:28.000000000 -0300 X+++ ./Global/GlobalDefinitions.h 2008-06-12 15:39:31.000000000 -0300 X@@ -726,8 +726,6 @@ X template <typename T> class Allocator X { X public: X- typedef T MyType; X- X Allocator( T** ptr, const string& name, ostream& monStream=cerr ) : X ptr_(ptr), name_(name), size_(0), isAllocated_(false), X monStream_( monStream ) X@@ -788,32 +786,34 @@ X X virtual void allocate( unsigned long size ) X { X- size_=size; X- (*ptr_)=new T[size_]; X- isAllocated_=true; X+ Allocator<T>::size_=size; X+ (*Allocator<T>::ptr_)=new T[Allocator<T>::size_]; X+ Allocator<T>::isAllocated_=true; X } X X virtual void allocateAndZero( unsigned long size ) X { X const unsigned char zero(0); X allocate(size); X- memset( (void*)(*ptr_), zero, size_*sizeof(MyType) ); X+ memset( (void*)(*Allocator<T>::ptr_), zero, Allocator<T>::size_*sizeof(T) ); X } X virtual void load( unsigned long size ) X { X allocate(size); X- loadFromFile( name_, (char*)(*ptr_), size_*sizeof(MyType), monStream_ ); X+ loadFromFile( Allocator<T>::name_, (char*)(*Allocator<T>::ptr_), X+ Allocator<T>::size_*sizeof(T), Allocator<T>::monStream_ ); X } X virtual void save() X { X- saveToFile( name_, (char*)(*ptr_), size_*sizeof(MyType), monStream_ ); X+ saveToFile( Allocator<T>::name_, (char*)(*Allocator<T>::ptr_), X+ Allocator<T>::size_*sizeof(T), Allocator<T>::monStream_ ); X } X X virtual void deallocate() X { X- if (!isAllocated_) return; X- delete [] (*ptr_); X- isAllocated_=false; X+ if (!Allocator<T>::isAllocated_) return; X+ delete [] (*Allocator<T>::ptr_); X+ Allocator<T>::isAllocated_=false; X } X protected: X }; X@@ -892,7 +892,7 @@ X if (isAllocated_) return; X mode_ = MemoryMapper::createMap; X size_ = size; X- (*ptr_) = (T*) linkToMap(mode_,name_,size_*sizeof(MyType)); X+ (*ptr_) = (T*) linkToMap(mode_,name_,size_*sizeof(T)); X isAllocated_ = true; X } X X@@ -908,7 +908,7 @@ X if (isAllocated_) return; X mode_ = MemoryMapper::readMap; X size_ = size; X- (*ptr_) = (T*) linkToMap(mode_,name_,size_*sizeof(MyType)); X+ (*ptr_) = (T*) linkToMap(mode_,name_,size_*sizeof(T)); X isAllocated_ = true; X } X X@@ -921,7 +921,7 @@ X virtual void deallocate() X { X if (!isAllocated_) return; X- if(munmap((caddr_t)(*ptr_), size_*sizeof(MyType)) < 0) X+ if(munmap((caddr_t)(*ptr_), size_*sizeof(T)) < 0) X perror("unmap error"); // don't throw - called from destructor! X close(fileDesc_); X if (mode_.deleteFileOnExit) shm_unlink(name_.c_str()); END-of-ssaha/files/patch-GlobalDefinitions.h echo x - ssaha/files/patch-HashTable.cpp sed 's/^X//' >ssaha/files/patch-HashTable.cpp << 'END-of-ssaha/files/patch-HashTable.cpp' X--- ./HashTable/HashTable.cpp.orig 2004-03-01 13:51:28.000000000 -0300 X+++ ./HashTable/HashTable.cpp 2008-06-12 15:39:31.000000000 -0300 X@@ -265,7 +265,7 @@ X void HashTable::countWords( SequenceAdapter& thisSeq ) X { X X- for ( int j(0) ; j < thisSeq.size() ; ++ j ) X+ for ( WordSequence::size_type j(0) ; j < thisSeq.size() ; ++ j ) X { X // only count words that have not been flagged X pWordPositionInHitList_[(thisSeq[j]&(~gCursedWord))] X@@ -284,7 +284,7 @@ X // NB We stop at the last but one element of the X // sequence (as the last isn't a full word) X X- for ( int j(0) ; j < thisSeq.size() ; ++ j ) X+ for ( WordSequence::size_type j(0) ; j < thisSeq.size() ; ++ j ) X { X thisWord = thisSeq[j]; X // only hash words that have not been flagged END-of-ssaha/files/patch-HashTable.cpp echo x - ssaha/files/patch-SSAHAMain.h sed 's/^X//' >ssaha/files/patch-SSAHAMain.h << 'END-of-ssaha/files/patch-SSAHAMain.h' X--- ./Global/SSAHAMain.h.orig 2004-03-01 13:51:28.000000000 -0300 X+++ ./Global/SSAHAMain.h 2008-06-12 15:39:31.000000000 -0300 X@@ -131,7 +131,7 @@ X -1, // int queryEnd; X -1, // int wordLength; X -1, // int stepLength; X- 100000, // int maxToStore; X+ 10000, // int maxToStore; X 1, // int minToPrint; X -1, // int maxGap; X 0, // int maxInsert; X@@ -174,6 +174,7 @@ X X CommandLineArg( const string& nameLong, const string& nameShort ) : X nameLong_( nameLong ), nameShort_( nameShort ) {} X+ virtual ~CommandLineArg() {}; // base class with virtual functions requires virtual constructor X // Is the current argument equal to 'my' argument name? X virtual bool isThisMe( const string& argName ) X { END-of-ssaha/files/patch-SSAHAMain.h echo x - ssaha/files/patch-SequenceEncoder.cpp sed 's/^X//' >ssaha/files/patch-SequenceEncoder.cpp << 'END-of-ssaha/files/patch-SequenceEncoder.cpp' X--- ./SequenceReader/SequenceEncoder.cpp.orig 2004-03-01 13:51:29.000000000 -0300 X+++ ./SequenceReader/SequenceEncoder.cpp 2008-06-12 15:39:31.000000000 -0300 X@@ -54,10 +54,10 @@ X ostream& monitoringStream): X monitoringStream_( monitoringStream ), X tt_(tt), sourceData_( sourceData ), bitsPerSymbol_(bitsPerSymbol), X+ symbolMask_((1<<bitsPerSymbol)-1), X pState_( new SequenceReaderModeIgnore( monitoringStream ) ), X wordFlag_(0), X- doubleBitShift_(bitsPerSymbol<<1), X- symbolMask_((1<<bitsPerSymbol)-1) X+ doubleBitShift_(bitsPerSymbol<<1) X // numSymbolPairs_(wordLength>>1), X // oddNumSymbols_(wordLength%1==1), X { X@@ -71,13 +71,13 @@ X ett_( rhs.ett_ ), X sourceData_( rhs.sourceData_ ), X bitsPerSymbol_( rhs.bitsPerSymbol_ ), X+ symbolMask_(rhs.symbolMask_), X wordLength_( rhs.wordLength_ ), X // pSeq_( rhs.pSeq_ ),// don't want 2 encoders linking to same seq X pState_( rhs.pState_->clone() ), X wordFlag_(0), X // numSymbolPairs_(rhs.numSymbolPairs_), X // oddNumSymbols_(rhs.oddNumSymbols_), X- symbolMask_(rhs.symbolMask_), X doubleBitShift_(rhs.doubleBitShift_) X { X monitoringStream_ << "copy constructing SequenceEncoder" << endl; X@@ -218,7 +218,7 @@ X { X pTemp = (uchar*)p; X // cout << basesInLast << " doing odd char at end " << *pTemp << endl; X- encodeChar( *p, thisWord, wordFlag_, basesInLast ); X+ encodeChar( *pTemp, thisWord, wordFlag_, basesInLast ); X } X X pSeq_->setNumBasesInLast(basesInLast); X@@ -453,7 +453,7 @@ X X for( ; i!=lastWord ; ++i ) X { X- if (toCarry!=~0) X+ if (toCarry!=(Word)~0) X (*pCodon++) = ( ((*i)&gCursedWord)|lastWordFlag ) X ? flaggedChar X : ( toCarry | (((*i) >> (4*gCodonBits + 2*gBaseBits))&maskBase )); X@@ -488,7 +488,7 @@ X X for( ; i!=lastWord ; ++i ) X { X- if (toCarry!=~0) X+ if (toCarry!=(Word)~0) X (*pCodon++) = ( ((*i)&gCursedWord)|lastWordFlag ) X ? flaggedChar X : ( toCarry | (((*i) >> (4*gCodonBits + gBaseBits))&mask2Bases )); X@@ -610,7 +610,7 @@ X do X { X i--; X- if (toCarry!=~0) X+ if (toCarry!=(Word)~0) X (*pCodon++) = ( ((*i)&gCursedWord)|lastWordFlag ) X ? flaggedChar X : ( toCarry | ( ((*i) & mask2Bases ) << gBaseBits ) ); X@@ -650,7 +650,7 @@ X do X { X i--; X- if (toCarry!=~0) X+ if (toCarry!=(Word)~0) X (*pCodon++) = ( ((*i)&gCursedWord)|lastWordFlag ) X ? flaggedChar X : ( toCarry | ( ((*i) & maskBase ) << (2*gBaseBits) ) ); END-of-ssaha/files/patch-SequenceEncoder.cpp echo x - ssaha/files/patch-HashTablePacked.cpp sed 's/^X//' >ssaha/files/patch-HashTablePacked.cpp << 'END-of-ssaha/files/patch-HashTablePacked.cpp' X--- ./HashTable/HashTablePacked.cpp.orig 2004-03-01 13:51:29.000000000 -0300 X+++ ./HashTable/HashTablePacked.cpp 2008-06-12 15:39:31.000000000 -0300 X@@ -132,7 +132,7 @@ X void HashTablePacked::countWords( SequenceAdapter& thisSeq ) X { X X- for ( int j(0) ; j < thisSeq.size() ; ++ j ) X+ for ( WordSequence::size_type j(0) ; j < thisSeq.size() ; ++ j ) X { X // only count words that have not been flagged X pWordPositionInHitList_[(thisSeq[j]&(~gCursedWord))] X@@ -151,7 +151,7 @@ X // NB We stop at the last but one element of the X // sequence (as the last isn't a full word) X X- for ( int j(0) ; j < thisSeq.size() ; ++ j ) X+ for ( WordSequence::size_type j(0) ; j < thisSeq.size() ; ++ j ) X { X thisWord = thisSeq[j]; X X@@ -200,7 +200,7 @@ X for ( WordSequence::const_iterator thisWord(seq.begin()); X thisWord != last ; ++thisWord ) X { X- int oldSize(packedHits.size()); // %%%%%% X+// int oldSize(packedHits.size()); // %%%%%% X matchWordDeluxe( *thisWord, packedHits, baseOffset ); X // cout << printResidue(*thisWord, wordLength_) << " " X // << packedHits.size()-oldSize; END-of-ssaha/files/patch-HashTablePacked.cpp echo x - ssaha/files/patch-HashTablePacked.h sed 's/^X//' >ssaha/files/patch-HashTablePacked.h << 'END-of-ssaha/files/patch-HashTablePacked.h' X--- ./HashTable/HashTablePacked.h.orig 2004-03-01 13:51:29.000000000 -0300 X+++ ./HashTable/HashTablePacked.h 2008-06-12 15:39:31.000000000 -0300 X@@ -236,11 +236,11 @@ X HashTableView<PositionPacked,HashTablePacked> X (monitoringStream, name, hitListAllocator, arrayAllocator), X wordNum_(0), X+ numRepeats_(0), X+ substituteThreshold_(0), X pMatchSequence_(&HashTablePacked::matchSequenceStandard), X pMatchWord_(&HashTablePacked::matchWordStandard), X pGenerateSubstitutes_(&generateSubstitutesDNA), X- numRepeats_(0), X- substituteThreshold_(0), X sorter_(4,(sizeof(PositionPacked)*8)/4) X { X hitListFormat_ = g32BitPacked; END-of-ssaha/files/patch-HashTablePacked.h echo x - ssaha/files/patch-HashTableTranslated.cpp sed 's/^X//' >ssaha/files/patch-HashTableTranslated.cpp << 'END-of-ssaha/files/patch-HashTableTranslated.cpp' X--- ./HashTable/HashTableTranslated.cpp.orig 2004-03-01 13:51:29.000000000 -0300 X+++ ./HashTable/HashTableTranslated.cpp 2008-06-12 15:39:31.000000000 -0300 X@@ -50,9 +50,9 @@ X Allocator<PositionPacked>& hitListAllocator, X Allocator<PositionInHitList>& arrayAllocator X ): X- queryFrame_(0), X HashTablePacked( monitoringStream, name, X- hitListAllocator, arrayAllocator ) X+ hitListAllocator, arrayAllocator ), X+ queryFrame_(0) X { X hitListFormat_ = g32BitPackedProtein; X bitsPerSymbol_ = gResidueBits; X@@ -135,12 +135,12 @@ X Allocator<PositionPacked>& hitListAllocator, X Allocator<PositionInHitList>& arrayAllocator X ): X+ HashTablePacked( monitoringStream, name, X+ hitListAllocator, arrayAllocator ), X+ codonEncoder_(5), X queryFrame_(0), X queryMult_(1), X- codonEncoder_(5), X- pMatchSequence_( &HashTablePackedProtein::matchSequenceProtein ), X- HashTablePacked( monitoringStream, name, X- hitListAllocator, arrayAllocator ) X+ pMatchSequence_( &HashTablePackedProtein::matchSequenceProtein ) X { X hitListFormat_ = g32BitPackedProtein; X bitsPerSymbol_ = gResidueBits; X@@ -249,14 +249,14 @@ X Allocator<PositionPacked>& hitListAllocator, X Allocator<PositionInHitList>& arrayAllocator X ) : X+ HashTableGeneric( monitoringStream, name, arrayAllocator ), X hashFwd_( monitoringStream, name+(string)"_fwd", X hitListAllocator, arrayAllocator ), X hashRev_( monitoringStream, name+(string)"_rev", X hitListAllocator, arrayAllocator ), X pHash_(&hashFwd_), X codonEncoder_(5), X- pMatchSequence_( &HashTableTranslated::matchSequenceProtein ), X- HashTableGeneric( monitoringStream, name, arrayAllocator ) X+ pMatchSequence_( &HashTableTranslated::matchSequenceProtein ) X { X bitsPerSymbol_=gResidueBits; X hitListFormat_ = gTranslated; X@@ -344,8 +344,8 @@ X X // Change encoding mode X SequenceReaderModeFlagReplace mode('X'); X- assert(ttCodon['X']==ttProtein['X']); X- assert(ttCodon['X']!=nv); X+ assert(ttCodon[(int)'X']==ttProtein[(int)'X']); X+ assert(ttCodon[(int)'X']!=nv); X codonEncoder_.changeMode( &mode ); X X X@@ -418,7 +418,7 @@ X seq->link( translatedSeq ); X X // NB sequences are numbered 1...n not 0...n-1 X- for ( unsigned int i(1); i <= numSeqs ; i++ ) X+ for ( int i(1); i <= numSeqs ; i++ ) X { X // cout << "hashing sequence " << i << endl; X if( sequenceReader.getNextSequence( thisSeq, eDNAWordSizeForHashing) == -1 ) X@@ -520,7 +520,7 @@ X int HashTableTranslated::getHitTypeSize( void ) const X { X assert(1==0); X- return NULL; X+ return 0; X } X void HashTableTranslated::allocateHitList( unsigned long size ) X { END-of-ssaha/files/patch-HashTableTranslated.cpp echo x - ssaha/files/patch-MatchAligner.cpp sed 's/^X//' >ssaha/files/patch-MatchAligner.cpp << 'END-of-ssaha/files/patch-MatchAligner.cpp' X--- ./QueryManager/MatchAligner.cpp.orig 2004-03-01 13:51:29.000000000 -0300 X+++ ./QueryManager/MatchAligner.cpp 2008-06-12 15:39:31.000000000 -0300 X@@ -53,13 +53,13 @@ X bool reverseQueryCoords, X bool doAlignment, X ostream& outputStream ): X+ pAlign_(pAlign), X+ outputStream_(outputStream), X querySource_(querySource), X subjectSource_(subjectSource), X- pAlign_(pAlign), X // numCols_(numCols), X reverseQueryCoords_(reverseQueryCoords), X- doAlignment_(doAlignment), X- outputStream_(outputStream) X+ doAlignment_(doAlignment) X { X } // ~MatchTaskAlign::MatchTaskAlign X X@@ -194,10 +194,10 @@ X int bandExtension, X ScoreTable* pTable, X ostream& outputStream ) : X+ outputStream_(outputStream), X numCols_(numCols), X bandExtension_(bandExtension), X- pTable_(pTable), X- outputStream_(outputStream) X+ pTable_(pTable) X { X pBufSeq1_= new char [numCols+1]; X pBufSeq2_= new char [numCols+1]; X@@ -563,17 +563,17 @@ X // cout << int ( ttDNA[ *(pChar++ ] << 4 X // | (ttDNA[ *(pChar++) ] << 2) X // | ttDNA[ *(pChar++) ] ) << endl; X- if ( (ttDNA[ *(pChar) ]==nv) X- || (ttDNA[ *(pChar+1) ]==nv) X- || (ttDNA[ *(pChar+2) ]==nv) ) X+ if ( (ttDNA[ (int) *(pChar) ]==nv) X+ || (ttDNA[ (int) *(pChar+1) ]==nv) X+ || (ttDNA[ (int) *(pChar+2) ]==nv) ) X { X *i='X'; X } // ~if X else X { X- *i= gResidueNames[ ttCodon[ ttDNA[ *(pChar) ] << 4 X- | ttDNA[ *(pChar+1) ] << 2 X- | ttDNA[ *(pChar+2) ] ] ]; X+ *i= gResidueNames[ ttCodon[ ttDNA[ (int) *(pChar) ] << 4 X+ | ttDNA[ (int) *(pChar+1) ] << 2 X+ | ttDNA[ (int) *(pChar+2) ] ] ]; X } // ~else X X } // ~for i X@@ -983,7 +983,7 @@ X X void print( PathMatrix<PathType>& p ) X { X- for (int i(0); i< p.front().size(); i++) X+ for (size_t i(0); i< p.front().size(); i++) X { X for (vector<vector<PathType> >::iterator j(p.begin()); X j!=p.end();++j) X@@ -1249,16 +1249,16 @@ X bandWidth_(p2Size-p1Size+1), X bandLength_(p1Size+1), X colSize_(p2Size-p1Size+1+(2*bandExtension_)), X- fillCell_(), X finalFrame1_(p1FinalFrame), X finalFrame2_(p2FinalFrame), X numFrames1_((p1Trans[1]==NULL)?1:gNumReadingFrames), X numFrames2_((p2Trans[1]==NULL)?1:gNumReadingFrames), X+ fillCell_(), X+ getScore_(scoreTable), X v1_(colSize_, veryBadScore3D ), X v2_(colSize_, veryBadScore3D ), X pLast_(&v1_), X- pCurrent_(&v2_), X- getScore_(scoreTable) X+ pCurrent_(&v2_) X { X X p1_[0] = p1Trans[0]; X@@ -1287,7 +1287,7 @@ X { X X // ScoreType lastScore, prevFrameScore1, prevFrameScore2; X- int i,j,k,l; X+ int i,j; X X matrix.resize(bandLength_, vector<PathType3D>(colSize_) ); X END-of-ssaha/files/patch-MatchAligner.cpp echo x - ssaha/files/patch-MatchAligner.h sed 's/^X//' >ssaha/files/patch-MatchAligner.h << 'END-of-ssaha/files/patch-MatchAligner.h' X--- ./QueryManager/MatchAligner.h.orig 2004-03-01 13:51:29.000000000 -0300 X+++ ./QueryManager/MatchAligner.h 2008-06-12 15:39:31.000000000 -0300 X@@ -315,13 +315,13 @@ X X static char getCodon( const char* pChar ) X { X- return ( ( (ttDNA[ *pChar ] ==nv) X- || (ttDNA[ *(pChar+1) ] ==nv) X- || (ttDNA[ *(pChar+2) ] ==nv) ) X+ return ( ( (ttDNA[ (int) *pChar ] ==nv) X+ || (ttDNA[ (int) *(pChar+1) ] ==nv) X+ || (ttDNA[ (int) *(pChar+2) ] ==nv) ) X ? 'X' X- : gResidueNames[ ttCodon[ ttDNA[ *(pChar) ] << 4 X- | ttDNA[ *(pChar+1) ] << 2 X- | ttDNA[ *(pChar+2) ] ] ] ); X+ : gResidueNames[ ttCodon[ ttDNA[ (int) *(pChar) ] << 4 X+ | ttDNA[ (int) *(pChar+1) ] << 2 X+ | ttDNA[ (int) *(pChar+2) ] ] ] ); X } // ~getCodon X X X@@ -519,8 +519,8 @@ X : public vector<vector<PATH_TYPE> > X { X public: X- typedef pair<vector<vector<PATH_TYPE> >::iterator, X- vector<PATH_TYPE>::iterator> CellIterator; X+ typedef pair<typename vector<vector<PATH_TYPE> >::iterator, X+ typename vector<PATH_TYPE>::iterator> CellIterator; X X template<class MATRIX_FILLER> ScoreType fillIn( MATRIX_FILLER& doMatrix ) X { END-of-ssaha/files/patch-MatchAligner.h echo x - ssaha/files/patch-testQueryManager.cpp sed 's/^X//' >ssaha/files/patch-testQueryManager.cpp << 'END-of-ssaha/files/patch-testQueryManager.cpp' X--- ./QueryManager/testQueryManager.cpp.orig 2004-03-01 13:51:29.000000000 -0300 X+++ ./QueryManager/testQueryManager.cpp 2008-06-12 15:39:31.000000000 -0300 X@@ -53,7 +53,7 @@ X void reverseString( string& seq ) X { X string rc; X- for ( int i(0) ; i < seq.size() ; i++ ) X+ for ( unsigned int i(0) ; i < seq.size() ; i++ ) X { X if ( ( seq[i] == 'A' ) || (seq[i] == 'a') ) rc = 'T' + rc; X else if ( ( seq[i] == 'T' ) || (seq[i] == 't') ) rc = 'A' + rc; X@@ -165,7 +165,7 @@ X int numSeqs = 3; X int seqSize = 1000; X int wordLength = 7; X- int maxHits = 50; X+// int maxHits = 50; X X // Generate a random sequence of (numSeqs*seqSize) base pairs ... X // 1128 is the seed value for the random number generator END-of-ssaha/files/patch-testQueryManager.cpp echo x - ssaha/files/patch-MatchStore.h sed 's/^X//' >ssaha/files/patch-MatchStore.h << 'END-of-ssaha/files/patch-MatchStore.h' X--- ./QueryManager/MatchStore.h.orig 2004-03-01 13:51:29.000000000 -0300 X+++ ./QueryManager/MatchStore.h 2008-06-12 15:39:31.000000000 -0300 X@@ -93,20 +93,20 @@ X virtual SequenceNumber getSubjectNum( void ) const X { return subjectNum_; } X // virtual inline string getSubjectName( void ) const; X- virtual inline const char* getSubjectName( void ) const; X+ virtual const char* getSubjectName( void ) const; X virtual SequenceOffset getSubjectStart( void ) const X { return subjectStart_; } X virtual SequenceOffset getSubjectEnd( void ) const X { return subjectEnd_; } X X- virtual inline SequenceNumber getQueryNum( void ) const; X- virtual inline string getQueryName( void ) const; X+ virtual SequenceNumber getQueryNum( void ) const; X+ virtual string getQueryName( void ) const; X virtual SequenceOffset getQueryStart( void ) const X { return queryStart_; } X virtual SequenceOffset getQueryEnd( void ) const X { return queryEnd_; } X X- virtual inline int getQuerySize( void ) const; X+ virtual int getQuerySize( void ) const; X virtual int getNumBases(void ) const X { return numBases_; } X virtual bool isQueryForward( void ) const X@@ -127,7 +127,6 @@ X SequenceOffset subjectEnd, X bool isQueryForward, X bool isSubjectForward ): X- myStore_( myStore ), X subjectNum_( subjectNum ), X numBases_( numBases ), X queryStart_( queryStart ), X@@ -135,7 +134,8 @@ X subjectStart_( subjectStart ), X subjectEnd_( subjectEnd ), X isQueryForward_( isQueryForward ), X- isSubjectForward_( isSubjectForward ){} X+ isSubjectForward_( isSubjectForward ), X+ myStore_( myStore ) {} X X SequenceNumber subjectNum_; X SequenceOffset numBases_; X@@ -444,7 +444,7 @@ X ( X unsigned int maxToSort = 1<<30, X double partialThreshold = 0.0 X- ) : sorter_(), maxToSort_(maxToSort), partialThreshold_(partialThreshold) {} X+ ) : maxToSort_(maxToSort), partialThreshold_(partialThreshold), sorter_() {} X // TBD should be virtual??? X void operator()(MatchStore& store ) X { END-of-ssaha/files/patch-MatchStore.h echo x - ssaha/files/patch-MatchStoreGapped.h sed 's/^X//' >ssaha/files/patch-MatchStoreGapped.h << 'END-of-ssaha/files/patch-MatchStoreGapped.h' X--- ./QueryManager/MatchStoreGapped.h.orig 2004-03-01 13:51:29.000000000 -0300 X+++ ./QueryManager/MatchStoreGapped.h 2008-06-12 15:39:31.000000000 -0300 X@@ -57,7 +57,8 @@ X { X public: X MatchAlgorithm( int numRepeats ) : X- numRepeats_( numRepeats ), sortNeeded_(true) {} X+ sortNeeded_(true), numRepeats_( numRepeats ) {} X+ virtual ~MatchAlgorithm() {}; X void operator() X ( WordSequence& querySeq, X MatchAdder& addMatch, X@@ -82,10 +83,10 @@ X public: X MatchAlgorithmGapped X ( int maxGap, int maxInsert, int minToProcess, int numRepeats ): X+ MatchAlgorithm( numRepeats ), X maxGap_( maxGap ), X maxInsert_( maxInsert ), X- minToProcess_( minToProcess ), X- MatchAlgorithm( numRepeats ) X+ minToProcess_( minToProcess ) X {} X X virtual void generateMatches END-of-ssaha/files/patch-MatchStoreGapped.h echo x - ssaha/files/patch-README sed 's/^X//' >ssaha/files/patch-README << 'END-of-ssaha/files/patch-README' X--- ./Binary/README.orig 2004-08-25 11:35:58.000000000 -0300 X+++ ./Binary/README 2008-06-12 15:39:31.000000000 -0300 X@@ -34,6 +34,10 @@ X X Patched for linux/g++3.2.2 25/8/4 AWS. X X+This version was patched for Linux/GCC 4.0.2 and Mac OS X/GCC 4.0.1 by X+Conrad Halling on 26 January 2006. See http://www.bifx.org/SSAHA/index.html X+for more information. X+ X 1. To compile the main ssaha executable X X make ssaha END-of-ssaha/files/patch-README echo x - ssaha/files/patch-MatchStoreUngapped.h sed 's/^X//' >ssaha/files/patch-MatchStoreUngapped.h << 'END-of-ssaha/files/patch-MatchStoreUngapped.h' X--- ./QueryManager/MatchStoreUngapped.h.orig 2004-03-01 13:51:29.000000000 -0300 X+++ ./QueryManager/MatchStoreUngapped.h 2008-06-12 15:39:31.000000000 -0300 X@@ -60,8 +60,8 @@ X public: X MatchAlgorithmUngapped X ( int minToProcess, int numRepeats ): X- minToProcess_( minToProcess ), X- MatchAlgorithm( numRepeats ) X+ MatchAlgorithm( numRepeats ), X+ minToProcess_( minToProcess ) X {} X X virtual void generateMatches END-of-ssaha/files/patch-MatchStoreUngapped.h echo x - ssaha/files/patch-QueryManager.cpp sed 's/^X//' >ssaha/files/patch-QueryManager.cpp << 'END-of-ssaha/files/patch-QueryManager.cpp' X--- ./QueryManager/QueryManager.cpp.orig 2004-03-01 13:51:29.000000000 -0300 X+++ ./QueryManager/QueryManager.cpp 2008-06-12 15:39:31.000000000 -0300 X@@ -164,8 +164,8 @@ X // MatchPolicy member function definitions X X MatchPolicy::MatchPolicy( HashTableGeneric& subjectTable ) : X- subjectTable_( subjectTable ), X- queryWordLength_( subjectTable.getWordLength() ) X+ queryWordLength_( subjectTable.getWordLength() ), X+ subjectTable_( subjectTable ) X {} X X X@@ -203,8 +203,8 @@ X X MatchPolicyProteinProtein::MatchPolicyProteinProtein X ( HashTablePackedProtein& subjectTable ) : X-subjectTable_( subjectTable ), X-MatchPolicy( subjectTable ) X+MatchPolicy( subjectTable ), X+subjectTable_( subjectTable ) X { X X subjectTable_.setQueryProtein(); X@@ -386,9 +386,9 @@ X QueryManager::QueryManager X ( SequenceReader& querySeqs, X HashTableGeneric& subjectSeqs, ostream& monitoringStream ) : X- queryReader_( querySeqs ), X subjectTable_( subjectSeqs ), X- monitoringStream_( monitoringStream ) X+ monitoringStream_( monitoringStream ), X+ queryReader_( querySeqs ) X { X monitoringStream_ << "constructing QueryManager\n"; X X@@ -518,7 +518,7 @@ X X task( store ); X X- if ( queryReader_.getLastSequenceNumber() == queryEnd ) break; X+ if ( (int)queryReader_.getLastSequenceNumber() == queryEnd ) break; X X // clear the query sequence ready to read in next query X querySeqFwd.clear(); X@@ -530,7 +530,7 @@ X } // ~while X while ( numBasesInLast != -1 ); X X- if ( ( queryReader_.getLastSequenceNumber() < queryEnd ) X+ if ( ( (int)queryReader_.getLastSequenceNumber() < queryEnd ) X && ( queryEnd != - 1 ) ) X { X monitoringStream_ << "Info: requested final sequence (" << queryEnd END-of-ssaha/files/patch-QueryManager.cpp echo x - ssaha/files/patch-QueryManager.h sed 's/^X//' >ssaha/files/patch-QueryManager.h << 'END-of-ssaha/files/patch-QueryManager.h' X--- ./QueryManager/QueryManager.h.orig 2004-03-01 13:51:29.000000000 -0300 X+++ ./QueryManager/QueryManager.h 2008-06-12 15:39:31.000000000 -0300 X@@ -145,6 +145,7 @@ X // readFrame_(0), X pStore_(NULL), X subjectTable_( subjectTable ) {} X+ virtual ~MatchAdder() {}; X virtual void operator()( SequenceNumber subjectNum, X SequenceOffset numBases, X SequenceOffset queryStart, X@@ -172,7 +173,7 @@ X { X public: X MatchAdderImp( HashTableGeneric& subjectTable ) : X- lastSubjectNum_(0), name_(), MatchAdder( subjectTable ) {} X+ MatchAdder( subjectTable ), name_(), lastSubjectNum_(0) {} X virtual void operator()( SequenceNumber subjectNum, X SequenceOffset numBases, X SequenceOffset queryStart, END-of-ssaha/files/patch-QueryManager.h echo x - ssaha/files/patch-SSAHAMain.cpp sed 's/^X//' >ssaha/files/patch-SSAHAMain.cpp << 'END-of-ssaha/files/patch-SSAHAMain.cpp' X--- ./Global/SSAHAMain.cpp.orig 2004-03-01 14:12:38.000000000 -0300 X+++ ./Global/SSAHAMain.cpp 2008-06-12 15:39:31.000000000 -0300 X@@ -86,7 +86,8 @@ X Copyright (C) 2004 by Genome Research Limited\n\ X This software is released under the terms of version 2 of the GNU General\n\ X Public Licence, as published by the Free Software Foundation.\n\ X-This is SSAHA Version 3.2, released 1st March 2004.\n\n"; X+This is SSAHA Version 3.2, released 1st March 2004,\n\ X+patched 26 January 2006.\n\n"; X X Timer timeStamp; X X@@ -623,7 +624,7 @@ X { X pHashTable = new HashTablePacked( cerr, queryParams.saveName ); X if ( ( queryParams.wordLength <= 0 ) X- || ( queryParams.wordLength*gBaseBits > ( 8*sizeof(Word)) -1 ) ) X+ || ( (size_t) queryParams.wordLength*gBaseBits > ( 8*sizeof(Word)) -1 ) ) X { X cerr << "Warning: word length (" << queryParams.wordLength X << ") outside valid range (0 to " X@@ -656,7 +657,7 @@ X } // ~if X X if ( ( queryParams.wordLength <= 0 ) X- || ( queryParams.wordLength*gResidueBits > ( 8*sizeof(Word)) -1 ) ) X+ || ( (size_t) queryParams.wordLength*gResidueBits > ( 8*sizeof(Word)) -1 ) ) X { X cerr << "Warning: word length (" << queryParams.wordLength X << ") outside valid range (0 to " X@@ -782,7 +783,7 @@ X cerr << "Info: would expect " << expectedNumHits X << " hits per word for a random database of this size." << endl; X X- queryParams.maxStore=1+(int)(expectedNumHits*queryParams.maxStore); X+ queryParams.maxStore=(int)(expectedNumHits*queryParams.maxStore); X X cerr << "Info: will ignore hits on words that occur more than " X << queryParams.maxStore << " times in the database." << endl; X@@ -1151,7 +1152,7 @@ X } // ~if X dirent* dirEntry; X string entryName; X- while( dirEntry = readdir(pDir) ) X+ while( 0 != ( dirEntry = readdir(pDir) ) ) X { X entryName = (string) dirEntry->d_name; X if ((entryName == ".")||(entryName=="..")) continue; END-of-ssaha/files/patch-SSAHAMain.cpp echo x - ssaha/files/patch-SequenceReader.cpp sed 's/^X//' >ssaha/files/patch-SequenceReader.cpp << 'END-of-ssaha/files/patch-SequenceReader.cpp' X--- ./SequenceReader/SequenceReader.cpp.orig 2004-03-01 13:51:29.000000000 -0300 X+++ ./SequenceReader/SequenceReader.cpp 2008-06-12 15:39:31.000000000 -0300 X@@ -179,7 +179,7 @@ X X for ( ; i != reverseBuffer_.end() ; i++, j-- ) X { X- *i= reverseChar[ *j ]; X+ *i= reverseChar[ (int) *j ]; X // cout << "char: " << (int)*j << *j << " - " << (int)*i << *i << endl; X } X X@@ -356,7 +356,7 @@ X throw SSAHAException X ("Requested seq start exceeds requested seq end in SourceReaderIndex::extractSource"); X } // ~if X- else if (seqEnd>lastSourceSeq_.size() ) X+ else if (seqEnd>(int)lastSourceSeq_.size() ) X { X cout << seqEnd << " " << lastSourceSeq_.size() << endl; X throw SSAHAException END-of-ssaha/files/patch-SequenceReader.cpp echo x - ssaha/files/patch-SequenceReader.h sed 's/^X//' >ssaha/files/patch-SequenceReader.h << 'END-of-ssaha/files/patch-SequenceReader.h' X--- ./SequenceReader/SequenceReader.h.orig 2004-03-01 13:51:29.000000000 -0300 X+++ ./SequenceReader/SequenceReader.h 2008-06-12 15:39:31.000000000 -0300 X@@ -264,6 +264,8 @@ X pReader_( rhs.pReader_ ), X seqNum_( rhs.seqNum_ ) {} X X+ // A virtual destructor is required because this is a base class. X+ virtual ~SequenceReaderPrinter() {}; X X SequenceReaderPrinter& operator()( SequenceNumber inSeqNum ) X { END-of-ssaha/files/patch-SequenceReader.h echo x - ssaha/files/patch-SequenceReaderFasta.cpp sed 's/^X//' >ssaha/files/patch-SequenceReaderFasta.cpp << 'END-of-ssaha/files/patch-SequenceReaderFasta.cpp' X--- ./SequenceReader/SequenceReaderFasta.cpp.orig 2004-03-01 13:51:29.000000000 -0300 X+++ ./SequenceReader/SequenceReaderFasta.cpp 2008-06-12 15:39:31.000000000 -0300 X@@ -135,9 +135,9 @@ X seqStopChar_( rhs.seqStopChar_ ), X pInputFileStream_( new ifstream( rhs.fileName_.c_str() ) ), X fileName_( rhs.fileName_.c_str() ), X- seqPositions_( rhs.seqPositions_ ), X // lastSourceSeqNum_(0), X- pEncoder_( rhs.pEncoder_->clone() ) X+ pEncoder_( rhs.pEncoder_->clone() ), X+ seqPositions_( rhs.seqPositions_ ) X { X monitoringStream_ << "copy constructing SequenceReaderFile" << this X << endl; X@@ -603,7 +603,7 @@ X throw SSAHAException X ("Requested seq start exceeds requested seq end in SequenceReaderFile::extractSource"); X } // ~if X- else if (seqEnd>lastSourceSeq_.size() ) X+ else if (seqEnd>(SequenceOffset)lastSourceSeq_.size() ) X { X throw SSAHAException X ("Requested last byte exceeds end of seq in SequenceReaderFile::extractSource"); X@@ -628,7 +628,7 @@ X computeNumSequencesInFile(); // ensure have scanned to end of file X fileFile << fileName_ << endl; X SeqIndexInfo* pIndex = new SeqIndexInfo[seqPositions_.size()]; X- for (int i(0) ; i < seqPositions_.size() ; i++) X+ for (unsigned int i(0) ; i < seqPositions_.size() ; i++) X { X pIndex[i].fileNum=fileNumber; X pIndex[i].seqPos=seqPositions_[i]; END-of-ssaha/files/patch-SequenceReaderFasta.cpp echo x - ssaha/files/patch-SequenceReaderFasta.h sed 's/^X//' >ssaha/files/patch-SequenceReaderFasta.h << 'END-of-ssaha/files/patch-SequenceReaderFasta.h' X--- ./SequenceReader/SequenceReaderFasta.h.orig 2004-03-01 13:51:29.000000000 -0300 X+++ ./SequenceReader/SequenceReaderFasta.h 2008-06-12 15:39:31.000000000 -0300 X@@ -55,7 +55,7 @@ X { X public: X SequenceReaderFileState( SequenceNumber lsn, std::streampos fp ) : X- filePos_(fp), SequenceReaderState(lsn) {} X+ SequenceReaderState(lsn), filePos_(fp) {} X // no point in making this private as it's const X const std::streampos filePos_; X }; END-of-ssaha/files/patch-SequenceReaderFasta.h echo x - ssaha/files/patch-SequenceReaderFilter.h sed 's/^X//' >ssaha/files/patch-SequenceReaderFilter.h << 'END-of-ssaha/files/patch-SequenceReaderFilter.h' X--- ./SequenceReader/SequenceReaderFilter.h.orig 2004-03-01 13:51:30.000000000 -0300 X+++ ./SequenceReader/SequenceReaderFilter.h 2008-06-12 15:39:31.000000000 -0300 X@@ -80,7 +80,7 @@ X X size_t max( void ) const X { X- int max(0); X+ size_t max(0); X for (vector<vector<string*> >::const_iterator i(bins_.begin()); i!= bins_.end(); i++ ) X if (i->size()>max) max=i->size(); X return max; X@@ -109,7 +109,7 @@ X public: X SequenceReaderFilterState X ( SequenceNumber lsn, SequenceReader* ps ) : X- pState_(ps->saveState()), SequenceReaderState(lsn) {} X+ SequenceReaderState(lsn), pState_(ps->saveState()) {} X virtual ~SequenceReaderFilterState() {} //delete pState_; X // no point in making this private as it's const X // this is state info for *ps, whatever it is END-of-ssaha/files/patch-SequenceReaderFilter.h echo x - ssaha/files/patch-SequenceReaderLocal.cpp sed 's/^X//' >ssaha/files/patch-SequenceReaderLocal.cpp << 'END-of-ssaha/files/patch-SequenceReaderLocal.cpp' X--- ./SequenceReader/SequenceReaderLocal.cpp.orig 2004-03-01 13:51:30.000000000 -0300 X+++ ./SequenceReader/SequenceReaderLocal.cpp 2008-06-12 15:39:31.000000000 -0300 X@@ -46,10 +46,10 @@ X // and seqNames_ X SequenceReaderLocal::SequenceReaderLocal X ( SequenceReader& seqFile, int wordLength, ostream& monitoringStream ) : X-sourceData_( seqFile.getSourceDataType() ), X+SequenceReader( monitoringStream ), X wordLength_( wordLength ), X bitsPerSymbol_( seqFile.getBitsPerSymbol() ), X-SequenceReader( monitoringStream ) X+sourceData_( seqFile.getSourceDataType() ) X { X monitoringStream_ X << "constructing SequenceReaderLocal from SequenceReader" << endl; X@@ -72,10 +72,10 @@ X X SequenceReaderLocal::SequenceReaderLocal X ( int wordLength, int bitsPerSymbol, ostream& monitoringStream ) : X-sourceData_( gUnknownData ), X+SequenceReader( monitoringStream ), X wordLength_( wordLength ), X bitsPerSymbol_( bitsPerSymbol ), X-SequenceReader( monitoringStream ) X+sourceData_( gUnknownData ) X { X monitoringStream_ X << "constructing empty SequenceReaderLocal" << endl; END-of-ssaha/files/patch-SequenceReaderLocal.cpp echo x - ssaha/files/patch-SequenceReaderMulti.cpp sed 's/^X//' >ssaha/files/patch-SequenceReaderMulti.cpp << 'END-of-ssaha/files/patch-SequenceReaderMulti.cpp' X--- ./SequenceReader/SequenceReaderMulti.cpp.orig 2004-03-01 13:51:30.000000000 -0300 X+++ ./SequenceReader/SequenceReaderMulti.cpp 2008-06-12 15:39:31.000000000 -0300 X@@ -166,7 +166,7 @@ X { X if (thisReader_->allSeqsRead_) X { X- if ( currentSeqNum_ <= thisReader_->size_ ) X+ if ( currentSeqNum_ <= (SequenceNumber)thisReader_->size_ ) X { X // assert( thisReader_->ptr_->findSequence( currentSeqNum_ ) == true ); X lastSequenceNumber_ = --seqNum; // last read = 1 behind current X@@ -240,7 +240,7 @@ X for ( vector<SeqReaderInfo>::iterator i = allReaders_.begin(); X i != allReaders_.end(); i++ ) X { X- if ( seqNum <= i->size_ ) { thisReader_ = i; break; } // %%%%% X+ if ( seqNum <= (SequenceNumber)i->size_ ) { thisReader_ = i; break; } // %%%%% X seqNum -= i->size_; X } // ~for i X X@@ -276,7 +276,8 @@ X { X DEBUG_L2( "SequenceReaderMulti::getNextSequence" ); X X- int numInLast; X+ int numInLast = -1; // Initialized to avoid -Wall possibly used before initialized warning. X+ // The algorithm should be checked carefully. X X while X ( ( thisReader_ END-of-ssaha/files/patch-SequenceReaderMulti.cpp echo x - ssaha/files/patch-SequenceReaderMulti.h sed 's/^X//' >ssaha/files/patch-SequenceReaderMulti.h << 'END-of-ssaha/files/patch-SequenceReaderMulti.h' X--- ./SequenceReader/SequenceReaderMulti.h.orig 2004-03-01 13:51:30.000000000 -0300 X+++ ./SequenceReader/SequenceReaderMulti.h 2008-06-12 15:39:31.000000000 -0300 X@@ -81,8 +81,9 @@ X ( SequenceNumber lsn, X vector<SeqReaderInfo>::iterator tr, X SequenceReaderState* ps ) : X+ SequenceReaderState(lsn), X thisReader_(tr), X- pState_(ps), SequenceReaderState(lsn) {} X+ pState_(ps) {} X virtual ~SequenceReaderMultiState() {} //delete pState_; X // no point in making this private as it's const X const vector<SeqReaderInfo>::iterator thisReader_; END-of-ssaha/files/patch-SequenceReaderMulti.h echo x - ssaha/files/patch-SequenceReaderString.h sed 's/^X//' >ssaha/files/patch-SequenceReaderString.h << 'END-of-ssaha/files/patch-SequenceReaderString.h' X--- ./SequenceReader/SequenceReaderString.h.orig 2004-03-01 13:51:30.000000000 -0300 X+++ ./SequenceReader/SequenceReaderString.h 2008-06-12 15:39:31.000000000 -0300 X@@ -65,9 +65,9 @@ X // NB SequenceReaderStringBase takes ownership of *pEncoder X SequenceEncoder* pEncoder, X ostream& monitoringStream = cerr ) : X+ SequenceReader( monitoringStream ), X sequenceString_( sequenceString ), X- pEncoder_( pEncoder ), X- SequenceReader( monitoringStream ) X+ pEncoder_( pEncoder ) X { X monitoringStream_ << "constructing SequenceReaderStringBase" << endl; X } // constructor X@@ -78,9 +78,9 @@ X // TYPE NAME IN/OUT COMMENT X // Returns: TYPE COMMENT X SequenceReaderStringBase( const SequenceReaderStringBase& rhs ) : X+SequenceReader( rhs.monitoringStream_ ), X sequenceString_( rhs.sequenceString_ ), X-pEncoder_( rhs.pEncoder_->clone() ), X-SequenceReader( rhs.monitoringStream_ ) X+pEncoder_( rhs.pEncoder_->clone() ) X { X monitoringStream_ << "copy constructing SequenceReaderStringBase" << endl; X } // copy constructor END-of-ssaha/files/patch-SequenceReaderString.h echo x - ssaha/files/patch-testHashTableNoOverlap.cpp sed 's/^X//' >ssaha/files/patch-testHashTableNoOverlap.cpp << 'END-of-ssaha/files/patch-testHashTableNoOverlap.cpp' X--- ./HashTable/testHashTableNoOverlap.cpp.orig 2004-03-01 13:51:29.000000000 -0300 X+++ ./HashTable/testHashTableNoOverlap.cpp 2008-06-12 15:39:31.000000000 -0300 X@@ -70,10 +70,10 @@ X cout << " Test of class HashTable" << endl << endl; X cout << "*******************************************" << endl << endl; X X- int numSeqs = 10; X- int seqSize = 100; X- int wordLength = 10; X- int maxHits = 50; X+ unsigned int numSeqs = 10; X+ unsigned int seqSize = 100; X+ unsigned int wordLength = 10; X+ unsigned int maxHits = 50; X X // Generate a random sequence of (numSeqs*seqSize) base pairs ... X // 1128 is the seed value for the random number generator X@@ -116,7 +116,7 @@ X // so we are checking that all sequence data 'finds itself' in the hash X // table in the correct position X X- for ( int i(1) ; i <= numSeqs ; i++ ) X+ for ( unsigned int i(1) ; i <= numSeqs ; i++ ) X { // for each sequence in testReader ... X testReader.getNextSequence(seq,wordLength); X X@@ -131,7 +131,7 @@ X cout << seq.getNumBasesInLast() << "!!\n"; X // ... go through the Words in the sequence one by one and look X // for matches in the hash table X- for ( int j(0) ; j < (seqSize/wordLength) ; j++ ) X+ for ( unsigned int j(0) ; j < (seqSize/wordLength) ; j++ ) X { X cout << j << " " << printBase(seq[j],wordLength) << endl; X X@@ -146,7 +146,7 @@ X // ... and that the sequence number and offset for the hit are OK X X assert(hits[0].subjectNum == i ); X- assert(hits[0].diff == j*wordLength ); X+ assert((unsigned int)hits[0].diff == j*wordLength ); X assert(hits[0].queryPos == 1); X X hits.clear(); X@@ -157,12 +157,12 @@ X testHash.matchWord(seq,hits); X cout << hits.size() << "!!!!!\n"; X assert( hits.size() == (seqSize/wordLength) ); X- for ( int j(0) ; j < hits.size() ; j ++ ) X+ for ( unsigned int j(0) ; j < hits.size() ; j ++ ) X { X X assert(hits[j].subjectNum == i); X assert(hits[j].diff == 0); X- assert(hits[j].queryPos == 1 + ( j * wordLength ) ); X+ assert((unsigned int)hits[j].queryPos == 1 + ( j * wordLength ) ); X X } // ~for j X X@@ -194,7 +194,7 @@ X assert( testLoad.isInitialized() == true ); X X // and that word length matches original X- assert( testLoad.getWordLength() == wordLength ); X+ assert( (unsigned int)testLoad.getWordLength() == wordLength ); X X testLoad.setMaxNumHits( testHash.getMaxNumHits() ); X X@@ -208,7 +208,7 @@ X // and new hash tables, storing the resulting hits in hitsOrig and X // hitsCopy respectively. X X- for ( int i(0) ; i < numSeqs ; i++ ) X+ for ( unsigned int i(0) ; i < numSeqs ; i++ ) X { X X // ... check that the name strings match X@@ -258,7 +258,7 @@ X HashTable shiftHash(cout); X creator.createHashTable(shiftHash,shiftReader,wordLength,maxHits); X X- for ( int i(0) ; i < wordLength ; i++ ) X+ for ( unsigned int i(0) ; i < wordLength ; i++ ) X { X testSeq = testSeq.substr(1); // delete first character X { // braces ensure a new instance is created each time round loop X@@ -460,7 +460,7 @@ X SequenceEncoderCodon encoder; X encoder.setWordLength(wordLength); X X- for ( int i(1) ; i < hashTrans.getNumSequences() ; i++ ) X+ for ( unsigned int i(1) ; i < hashTrans.getNumSequences() ; i++ ) X { X X hashTrans.getSequenceName( s1, i ); X@@ -477,7 +477,7 @@ X assert(hashTrans.getSequenceSize(i)==hashTrans2.getSequenceSize(i)); X X assert( (((w1.size()-1) * gMaxBasesPerWord ) + w1.getNumBasesInLast()) X- == hashTrans.getSequenceSize(i)); X+ == (unsigned int)hashTrans.getSequenceSize(i)); X X X // Sequence should produce same (nonzero) num hits in fwd direction X@@ -573,19 +573,19 @@ X string s, s1; X Word w; X vector<Word> subs; X- int wl=15; X+ unsigned int wl=15; X X // test substitution for DNA X // X X- for (int i(0); i<wl; i++) s+="A"; X+ for ( unsigned int i(0); i<wl; i++) s+="A"; X X w = makeBase(s); X X generateSubstitutesDNA( w, subs, wl ); X assert(subs.size()==wl); X X- for (int i(0); i<wl ; i++) X+ for (unsigned int i(0); i<wl ; i++) X { X cout << printWord(subs[i],wl) << endl; X s1=s; X@@ -596,14 +596,14 @@ X // X s=""; subs.clear(); X X- for (int i(0); i<wl; i++) s+="C"; X+ for (unsigned int i(0); i<wl; i++) s+="C"; X X w = makeBase(s); X X generateSubstitutesDNA( w, subs, wl ); X assert(subs.size()==wl); X X- for (int i(0); i<wl ; i++) X+ for (unsigned int i(0); i<wl ; i++) X { X cout << printWord(subs[i],wl) << endl; X s1=s; X@@ -614,14 +614,14 @@ X // X s=""; subs.clear(); X X- for (int i(0); i<wl; i++) s+="G"; X+ for (unsigned int i(0); i<wl; i++) s+="G"; X X w = makeBase(s); X X generateSubstitutesDNA( w, subs, wl ); X assert(subs.size()==wl); X X- for (int i(0); i<wl ; i++) X+ for (unsigned int i(0); i<wl ; i++) X { X cout << printWord(subs[i],wl) << endl; X s1=s; X@@ -632,14 +632,14 @@ X // X s=""; subs.clear(); X X- for (int i(0); i<wl; i++) s+="T"; X+ for (unsigned int i(0); i<wl; i++) s+="T"; X X w = makeBase(s); X X generateSubstitutesDNA( w, subs, wl ); X assert(subs.size()==wl); X X- for (int i(0); i<wl ; i++) X+ for (unsigned int i(0); i<wl ; i++) X { X cout << printWord(subs[i],wl) << endl; X s1=s; END-of-ssaha/files/patch-testHashTableNoOverlap.cpp echo x - ssaha/files/patch-GlobalDefinitions.cpp sed 's/^X//' >ssaha/files/patch-GlobalDefinitions.cpp << 'END-of-ssaha/files/patch-GlobalDefinitions.cpp' X--- ./Global/GlobalDefinitions.cpp.orig 2004-03-01 13:51:28.000000000 -0300 X+++ ./Global/GlobalDefinitions.cpp 2008-06-12 15:39:31.000000000 -0300 X@@ -119,7 +119,7 @@ X MakeIntoWord::MakeIntoWord( int bitsPerSymbol, const char* tt ): X bitsPerSymbol_( bitsPerSymbol ), tt_( tt ) X { X- for ( unsigned int i(0) ; i < (1<<bitsPerSymbol_) ; ++i ) X+ for ( unsigned int i(0) ; i < ( unsigned int )(1<<bitsPerSymbol_) ; ++i ) X { X map_.insert( make_pair( (static_cast<char>(tolower(tt[i]))),i ) ); X map_.insert( make_pair( (static_cast<char>(toupper(tt[i]))),i ) ); END-of-ssaha/files/patch-GlobalDefinitions.cpp echo x - ssaha/files/patch-HashTableGeneric.cpp sed 's/^X//' >ssaha/files/patch-HashTableGeneric.cpp << 'END-of-ssaha/files/patch-HashTableGeneric.cpp' X--- ./HashTable/HashTableGeneric.cpp.orig 2005-06-21 05:48:27.000000000 -0300 X+++ ./HashTable/HashTableGeneric.cpp 2008-06-12 15:39:31.000000000 -0300 X@@ -63,18 +63,18 @@ X ( ostream& monitoringStream, X const string& name, X Allocator<PositionInHitList>& arrayAllocator ) : X- isInitialized_( false ), X- monitoringStream_( monitoringStream ), X name_( name ), X- bitsPerSymbol_( gBaseBits ), // default: may be overwritten in subclass ctor X+ isInitialized_( false ), X maxNumHits_( defaultMaxNumHits ), X+ bitsPerSymbol_( gBaseBits ), // default: may be overwritten in subclass ctor X hitListFormat_( gNotSpecified ), X+ monitoringStream_( monitoringStream ), X pArrayAllocator_ X ( arrayAllocator.clone(&pWordPositionInHitList_, X name+(string)".head", X monitoringStream_) ), X- pSequenceSizes_(NULL), X- pNameReader_(NULL) X+ pNameReader_(NULL), X+ pSequenceSizes_(NULL) X { X monitoringStream_ << "constructing HashTableGeneric\n"; X if (name_=="") X@@ -290,7 +290,7 @@ X WordSequence thisSeq; X X // NB sequences are numbered 1...n not 0...n-1 X- for ( unsigned int i(1); i <= numSeqs ; i++ ) X+ for ( int i(1); i <= numSeqs ; i++ ) X { X if( sequenceReader.getNextSequence( thisSeq, wordLength_) == -1 ) X { X@@ -973,10 +973,10 @@ X X SequenceAdapterWithOverlap::SequenceAdapterWithOverlap X ( int bitsPerSymbol, int wordLength, int stepLength ) : X+SequenceAdapter(), X bitsPerSymbol_( bitsPerSymbol ), X wordLength_( wordLength ), X-stepLength_( stepLength ), X-SequenceAdapter() X+stepLength_( stepLength ) X { X X maskLeft_ = new Word[ wordLength_ ]; END-of-ssaha/files/patch-HashTableGeneric.cpp echo x - ssaha/files/patch-testSequenceReaderFasta.cpp sed 's/^X//' >ssaha/files/patch-testSequenceReaderFasta.cpp << 'END-of-ssaha/files/patch-testSequenceReaderFasta.cpp' X--- ./SequenceReader/testSequenceReaderFasta.cpp.orig 2004-08-25 11:31:17.000000000 -0300 X+++ ./SequenceReader/testSequenceReaderFasta.cpp 2008-06-12 15:39:31.000000000 -0300 X@@ -49,12 +49,12 @@ X // ### Function Definitions ### X void capitalise( string& s ) X { X- for ( int i(0) ; i < s.size() ; ++i ) s[i] = toupper(s[i]); X+ for ( unsigned int i(0) ; i < s.size() ; ++i ) s[i] = toupper(s[i]); X } X void reverseString( string& seq ) X { X string rc; X- for ( int i(0) ; i < seq.size() ; i++ ) X+ for ( unsigned int i(0) ; i < seq.size() ; i++ ) X { X if ( ( seq[i] == 'A' ) || (seq[i] == 'a') ) rc = 'T' + rc; X else if ( ( seq[i] == 'T' ) || (seq[i] == 't') ) rc = 'A' + rc; X@@ -91,7 +91,7 @@ X cout << "Test " << ++numTests <<": test of function getNextSequence" X << endl << endl; X X- int numSeqs = 10; X+ unsigned int numSeqs = 10; X int seqSize = 57; X X // Generate a random sequence of (numSeqs*seqSize) base pairs ... X@@ -118,7 +118,7 @@ X X X X- for ( int i(0) ; i < numSeqs ; i++ ) X+ for ( unsigned int i(0) ; i < numSeqs ; i++ ) X { X X testReader.getNextSequence(w,wordLength); X@@ -188,7 +188,7 @@ X cout << "Test " << ++numTests <<": test of getSequence" X << endl << endl; X X- int toRead = 5; X+ unsigned int toRead = 5; X X w.clear(); X testReader.getSequence(w,toRead,wordLength); X@@ -242,7 +242,7 @@ X cout << "Test " << ++numTests <<": test of random access output functions" X << endl << endl; X X- for ( int i(1) ; i <= numSeqs; i++ ) X+ for ( unsigned int i(1) ; i <= numSeqs; i++ ) X { X cout << testReader.getName(i) << endl; X cout << testReader.getSideInfo(i) << endl; X@@ -275,7 +275,7 @@ X // add on the end of the expected sequence string for it to match actual. X // const string spareBases( wordLength - ( seqSize % wordLength ), 'A'); X X- for ( int i(0) ; i < numSeqs ; i++ ) X+ for ( unsigned int i(0) ; i < numSeqs ; i++ ) X { X X testReaderFastq.getNextSequence(w,wordLength); X@@ -403,7 +403,7 @@ X cout << "Test " << ++numTests <<": test of random access output functions" X << endl << endl; X X- for ( int i(1) ; i <= numSeqs; i++ ) X+ for ( unsigned int i(1) ; i <= numSeqs; i++ ) X { X cout << testReaderFastq.getName(i) << endl; X cout << testReaderFastq.getSideInfo(i) << endl; X@@ -466,7 +466,7 @@ X { X X testReader.rewind(); X- for ( int j(0) ; j < testReader.getNumSequencesInFile() ; j ++ ) X+ for ( unsigned int j(0) ; j < testReader.getNumSequencesInFile() ; j ++ ) X { X cout << i << " " << j << endl; X wSingle.clear(); wMulti.clear(); X@@ -772,7 +772,7 @@ X X for (int wordLength(9); wordLength <= 12; wordLength++) X { X- for (int i(0) ; i < fiftyAs.size(); i++) X+ for (unsigned int i(0) ; i < fiftyAs.size(); i++) X { X thisString=fiftyAs; X thisString[i]='X'; X@@ -793,7 +793,7 @@ X stringReader.changeMode(&ignore); X w.clear(); X numInLast = stringReader.getNextSequence(w,wordLength); X- assert(numInLast==(fiftyAs.size()-1)%wordLength); X+ assert(numInLast==(int)(fiftyAs.size()-1)%wordLength); X assert((w.size()-1)*wordLength+numInLast==fiftyAs.size()-1); X X for (WordSequence::iterator j(w.begin()); j!=w.end();j++) X@@ -810,7 +810,7 @@ X numInLast = stringReader.getNextSequence(w,wordLength); X cout << "blegh " << wordLength << " " << i << " " << fiftyAs.size() << " " << numInLast << " " << w.size() << endl; X X- assert(numInLast==fiftyAs.size()%wordLength); X+ assert(numInLast==(int)fiftyAs.size()%wordLength); X assert((w.size()-1)*wordLength+numInLast==fiftyAs.size()); X X for (WordSequence::iterator j(w.begin()); j!=w.end();j++) X@@ -828,7 +828,7 @@ X stringReader.changeMode(&tag); X w.clear(); X numInLast = stringReader.getNextSequence(w,wordLength); X- assert(numInLast==fiftyAs.size()%wordLength); X+ assert(numInLast==(int)fiftyAs.size()%wordLength); X assert((w.size()-1)*wordLength+numInLast==fiftyAs.size()); X X for (WordSequence::iterator j(w.begin()); j!=w.end();j++) X@@ -915,7 +915,7 @@ X cout << "actual: " << printResidue(W,wordLength) << endl; X X X- for ( int i(0),j(0); i < protString.size() ; i+=wordLength,j++ ) X+ for ( unsigned int i(0),j(0); i < protString.size() ; i+=wordLength,j++ ) X { X wordString = protString.substr(i, wordLength); X cout << wordString << " " << printResidue(W[j],wordLength) << endl; X@@ -1163,7 +1163,7 @@ X assert ( localReader.getNumSequencesInFile() X == testReader.getNumSequencesInFile() ); X X- for ( int j(0) ; j < testReader.getNumSequencesInFile() ; j ++ ) X+ for ( unsigned int j(0) ; j < testReader.getNumSequencesInFile() ; j ++ ) X { X wSingle.clear(); wMulti.clear(); X X@@ -1244,7 +1244,7 @@ X WordSequence seq; X string name; X X- for ( int i(1) ; i <= filterer.getNumSequencesInFile() ; i++ ) X+ for ( unsigned int i(1) ; i <= filterer.getNumSequencesInFile() ; i++ ) X { X filterer.getSequence(seq, i, 16); X filterer.getLastSequenceName(name); X@@ -1330,12 +1330,12 @@ X // assert(v1==v1i); X // assert(v2==v2i); X X- for ( int (i(j)) ; i <=seqSize ; i++ ) assert(v1[i-j]==data[i-1]); X- for ( int (i(j)) ; i <=seqSize ; i++ ) assert(v2[i-j]==data[i-1]); X- for ( int (i(j)) ; i <=seqSize ; i++ ) assert(v1m[i-j]==data[i-1]); X- for ( int (i(j)) ; i <=seqSize ; i++ ) assert(v2m[i-j]==data[i-1]); X- for ( int (i(j)) ; i <=seqSize ; i++ ) assert(v1i[i-j]==data[i-1]); X- for ( int (i(j)) ; i <=seqSize ; i++ ) assert(v2i[i-j]==data[i-1]); X+ for ( int i(j) ; i <=seqSize ; i++ ) assert(v1[i-j]==data[i-1]); X+ for ( int i(j) ; i <=seqSize ; i++ ) assert(v2[i-j]==data[i-1]); X+ for ( int i(j) ; i <=seqSize ; i++ ) assert(v1m[i-j]==data[i-1]); X+ for ( int i(j) ; i <=seqSize ; i++ ) assert(v2m[i-j]==data[i-1]); X+ for ( int i(j) ; i <=seqSize ; i++ ) assert(v1i[i-j]==data[i-1]); X+ for ( int i(j) ; i <=seqSize ; i++ ) assert(v2i[i-j]==data[i-1]); X X } X cout << "got through first bit" << endl; X@@ -1402,7 +1402,7 @@ X X string n1,n2; X X- for (int i(0);i<numSeqs; i++) X+ for (unsigned int i(0);i<(unsigned int)numSeqs; i++) X { X cout << "i: " << i << endl; X w1.clear(); w2.clear(); END-of-ssaha/files/patch-testSequenceReaderFasta.cpp echo x - ssaha/pkg-plist sed 's/^X//' >ssaha/pkg-plist << 'END-of-ssaha/pkg-plist' Xbin/ssaha X%%DATADIR%%/testSSAHA.csh X%%DATADIR%%/test.fasta X%%DATADIR%%/test_extract.fasta X%%DATADIR%%/test_filter.fail X%%DATADIR%%/test_filter.fastq X%%DATADIR%%/test_protein.fasta X%%DATADIR%%/README X@dirrmtry %%DATADIR%% END-of-ssaha/pkg-plist echo x - ssaha/pkg-descr sed 's/^X//' >ssaha/pkg-descr << 'END-of-ssaha/pkg-descr' XSSAHA is a software tool for very fast matching and alignment of DNA Xsequences. It stands for Sequence Search and Alignment by Hashing XAlgorithm. It achieves its fast search speed by converting sequence Xinformation into a `hash table' data structure, which can then be Xsearched very rapidly for matches. X XSSAHA: a fast search method for large DNA databases (2001). XNing Z, Cox AJ, Mullikin JC. Genome Res. 11: 1725-9. XPMID: 11591649 X XWWW: http://www.sanger.ac.uk/Software/analysis/SSAHA/ END-of-ssaha/pkg-descr exit >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200806121929.m5CJTj90015608>