Commit 54380dbf by Eric Coissac

--no commit message

parent e43c4337
...@@ -5,11 +5,17 @@ ...@@ -5,11 +5,17 @@
# ./orgasm/build/lib.macosx-10.6-intel-2.7/ # ./orgasm/build/lib.macosx-10.6-intel-2.7/
# python orgasm-1.py GWM-261 COX1.fasta # python orgasm-1.py GWM-261 COX1.fasta
from orgasm.tango import tango, matchtoseed, cutLowCoverage, scaffold, coverageEstimate from orgasm.tango import tango, \
matchtoseed, \
cutLowCoverage, \
scaffold, \
coverageEstimate, \
insertFragment
from orgasm.indexer import _orgasm as indexer from orgasm.indexer import _orgasm as indexer
from orgasm.backtranslate.fasta import fasta from orgasm.backtranslate.fasta import fasta
from orgasm.assembler import Assembler from orgasm.assembler import Assembler
from orgasm.multialign import multiAlignReads, \
consensus
import sys import sys
if __name__ == '__main__': if __name__ == '__main__':
......
major = 0
minor = 0
serial= 'alpha'
version = "%2d.%02d %s" % (major,minor,serial)
...@@ -14,7 +14,7 @@ int main(int argc, char *argv[]) ...@@ -14,7 +14,7 @@ int main(int argc, char *argv[])
uint32_t icode; uint32_t icode;
char nuc[9]; char nuc[9];
int i; int i;
uint16_t mask; // uint16_t mask;
nuc[8]=0; nuc[8]=0;
......
...@@ -18,7 +18,7 @@ int main(int argc, char *argv[]) ...@@ -18,7 +18,7 @@ int main(int argc, char *argv[])
char cnuc[5]; char cnuc[5];
int i; int i;
uint16_t mask; // uint16_t mask;
nuc[4]=0; nuc[4]=0;
cnuc[4]=0; cnuc[4]=0;
......
...@@ -21,7 +21,7 @@ buffer_t *buildIndex(const char *forwardFileName, const char* reverseFileName, ...@@ -21,7 +21,7 @@ buffer_t *buildIndex(const char *forwardFileName, const char* reverseFileName,
char* indexFileName; char* indexFileName;
// uint32_t indexcount; // uint32_t indexcount;
uint32_t i; // uint32_t i;
buffer_t *reads; buffer_t *reads;
forward = fopen(forwardFileName,"r"); forward = fopen(forwardFileName,"r");
......
...@@ -38,14 +38,14 @@ void partialCompSortBuffer(buffer_t *buffer, ...@@ -38,14 +38,14 @@ void partialCompSortBuffer(buffer_t *buffer,
uint8_t word; uint8_t word;
uint32_t i; uint32_t i;
uint32_t swap; uint32_t swap;
uint32_t pairswap; // uint32_t pairswap;
uint32_t next; uint32_t next;
uint32_t first; uint32_t first;
uint32_t pair; // uint32_t pair;
uint32_t *pairp; // uint32_t *pairp;
uint32_t *swapp; uint32_t *swapp;
uint32_t cumsum=start; uint32_t cumsum=start;
uint32_t backtolastswap=FALSE; // uint32_t backtolastswap=FALSE;
int32_t shiftmax=0; int32_t shiftmax=0;
if (shift > shiftmax) shiftmax=shift; if (shift > shiftmax) shiftmax=shift;
......
...@@ -34,13 +34,13 @@ char * decode(buffer_t *buffer, uint32_t recordid, uint32_t begin, int32_t lengt ...@@ -34,13 +34,13 @@ char * decode(buffer_t *buffer, uint32_t recordid, uint32_t begin, int32_t lengt
uint32_t shift; uint32_t shift;
uint32_t i; uint32_t i;
uint32_t lcompact; uint32_t lcompact;
uint32_t mask; // uint32_t mask;
uint16_t *compactseq; uint16_t *compactseq;
if (dest==NULL) dest = internal; if (dest==NULL) dest = internal;
dest = (char*)PTR8(dest); dest = (char*)PTR8(dest);
idest = (uint16_t*)dest; idest = (uint64_t*)dest;
from = recordid * buffer->recordSize + ((begin >> 2) & 0xFFFFFFFE); from = recordid * buffer->recordSize + ((begin >> 2) & 0xFFFFFFFE);
shift = begin & 7; shift = begin & 7;
...@@ -66,7 +66,7 @@ char *decodeComp(buffer_t *buffer, uint32_t recordid, uint32_t begin, int32_t le ...@@ -66,7 +66,7 @@ char *decodeComp(buffer_t *buffer, uint32_t recordid, uint32_t begin, int32_t le
uint32_t shift; uint32_t shift;
int32_t i; int32_t i;
uint32_t lcompact; uint32_t lcompact;
uint32_t mask; // uint32_t mask;
uint16_t *compactseq; uint16_t *compactseq;
size_t lkey; size_t lkey;
char* key; char* key;
...@@ -76,7 +76,7 @@ char *decodeComp(buffer_t *buffer, uint32_t recordid, uint32_t begin, int32_t le ...@@ -76,7 +76,7 @@ char *decodeComp(buffer_t *buffer, uint32_t recordid, uint32_t begin, int32_t le
dest = (char*)PTR8(dest); dest = (char*)PTR8(dest);
dest2 = (char*)PTR8(internal2); dest2 = (char*)PTR8(internal2);
idest = (uint16_t*)dest; idest = (uint64_t*)dest;
from = buffer->readSize - begin; from = buffer->readSize - begin;
...@@ -103,7 +103,7 @@ char *decodeComp(buffer_t *buffer, uint32_t recordid, uint32_t begin, int32_t le ...@@ -103,7 +103,7 @@ char *decodeComp(buffer_t *buffer, uint32_t recordid, uint32_t begin, int32_t le
shift = (4 - (from & 3)) & 3; shift = (4 - (from & 3)) & 3;
ASSERT (shift <4,"There is a bug readsize = %d begin = %d shift=%d",buffer->readSize,begin,shift) ASSERT (shift <4,"There is a bug readsize = %zu begin = %d shift=%d",buffer->readSize,begin,shift)
lcompact = (length+shift) / 8 + (((length+shift) & 7) ? 1:0); lcompact = (length+shift) / 8 + (((length+shift) & 7) ? 1:0);
...@@ -149,13 +149,13 @@ char * decodeSequence(pnuc buffer, uint32_t begin, int32_t length, char *dest) ...@@ -149,13 +149,13 @@ char * decodeSequence(pnuc buffer, uint32_t begin, int32_t length, char *dest)
uint32_t shift; uint32_t shift;
uint32_t i; uint32_t i;
uint32_t lcompact; uint32_t lcompact;
uint32_t mask; // uint32_t mask;
uint16_t *compactseq; uint16_t *compactseq;
if (dest==NULL) dest = internal; if (dest==NULL) dest = internal;
dest = (char*)PTR8(dest); dest = (char*)PTR8(dest);
idest = (uint16_t*)dest; idest = (uint64_t*)dest;
from = ((begin >> 2) & 0xFFFFFFFE); from = ((begin >> 2) & 0xFFFFFFFE);
shift = begin & 7; shift = begin & 7;
......
...@@ -204,7 +204,7 @@ buffer_t * loadPairedFastq(FILE* forward, ...@@ -204,7 +204,7 @@ buffer_t * loadPairedFastq(FILE* forward,
char* bufferend; char* bufferend;
// uint32_t readLength; // uint32_t readLength;
uint32_t recordLength; uint32_t recordLength;
uint32_t nextprint; uint32_t nextprint=0;
uint32_t* encodedseqs; uint32_t* encodedseqs;
buffer_t* seqbuffer; buffer_t* seqbuffer;
...@@ -227,7 +227,7 @@ buffer_t * loadPairedFastq(FILE* forward, ...@@ -227,7 +227,7 @@ buffer_t * loadPairedFastq(FILE* forward,
seqbuffer = newBuffer(maxbuffersize,readLength,maxread); seqbuffer = newBuffer(maxbuffersize,readLength,maxread);
encodedseqs= (uint32_t*)(seqbuffer->records); encodedseqs= (uint32_t*)(seqbuffer->records);
printf("maximum reads : %d\n",seqbuffer->maxrecord); printf("maximum reads : %zu\n",seqbuffer->maxrecord);
while (readLength && (seqbuffer->readCount+2) <= seqbuffer->maxrecord) while (readLength && (seqbuffer->readCount+2) <= seqbuffer->maxrecord)
......
...@@ -14,7 +14,7 @@ void indexReverseComplement(buffer_t *reads) ...@@ -14,7 +14,7 @@ void indexReverseComplement(buffer_t *reads)
if (reads->complement) if (reads->complement)
FREE(reads->complement); FREE(reads->complement);
reads->complement=(int32_t*) MALLOC(sizeof(int32_t) * reads->readCount); reads->complement=(uint32_t*) MALLOC(sizeof(uint32_t) * reads->readCount);
for (i=0;i < reads->readCount; i++) for (i=0;i < reads->readCount; i++)
reads->complement[reads->order1[i]]=i; reads->complement[reads->order1[i]]=i;
......
...@@ -249,7 +249,7 @@ int32_t lookForForward(buffer_t *buffer, pnuc key, size_t length, int32_t* endof ...@@ -249,7 +249,7 @@ int32_t lookForForward(buffer_t *buffer, pnuc key, size_t length, int32_t* endof
int32_t end; int32_t end;
int32_t middle; int32_t middle;
int32_t comp; int32_t comp;
int32_t comp1; // int32_t comp1;
// I set the end of list flag to 0 // I set the end of list flag to 0
*endoflist=0; *endoflist=0;
...@@ -436,7 +436,7 @@ int32_t lookForReverse(buffer_t *buffer, pnuc key, size_t length, int32_t* endof ...@@ -436,7 +436,7 @@ int32_t lookForReverse(buffer_t *buffer, pnuc key, size_t length, int32_t* endof
int32_t nextReverse(buffer_t *buffer, int32_t current, size_t length, int32_t* endoflist) int32_t nextReverse(buffer_t *buffer, int32_t current, size_t length, int32_t* endoflist)
{ {
int32_t pos= current+1; int32_t pos= current+1;
int32_t lkey = CODELENGTH(buffer->readSize); // int32_t lkey = CODELENGTH(buffer->readSize);
pnuc key= (pnuc)((uint8_t*)(buffer->records) + buffer->recordSize * buffer->order1[current]); pnuc key= (pnuc)((uint8_t*)(buffer->records) + buffer->recordSize * buffer->order1[current]);
int32_t rshift= buffer->readSize & 3; int32_t rshift= buffer->readSize & 3;
int comp=cmpCompPrefix(buffer,buffer->order1[pos],key, length + ((rshift==0) ? 0:(4-rshift))); int comp=cmpCompPrefix(buffer,buffer->order1[pos],key, length + ((rshift==0) ? 0:(4-rshift)));
......
...@@ -132,6 +132,8 @@ void writeGeneralData(buffer_t *buffer,FILE* output); ...@@ -132,6 +132,8 @@ void writeGeneralData(buffer_t *buffer,FILE* output);
void loadSequences(buffer_t *buffer,FILE* input); void loadSequences(buffer_t *buffer,FILE* input);
void loadPairData(buffer_t *buffer,FILE* input); void loadPairData(buffer_t *buffer,FILE* input);
void loadGeneralData(buffer_t *buffer,FILE* input); void loadGeneralData(buffer_t *buffer,FILE* input);
uint32_t loadOrder1(buffer_t *buffer,FILE* input);
void fillOrdored(buffer_t *buffer); void fillOrdored(buffer_t *buffer);
void sortBuffer(buffer_t *buffer); void sortBuffer(buffer_t *buffer);
...@@ -162,5 +164,9 @@ extern uint32_t expanded8bitsnuc[]; ...@@ -162,5 +164,9 @@ extern uint32_t expanded8bitsnuc[];
pnuc encodeSequence(pnuc dest, char* src, uint32_t length); pnuc encodeSequence(pnuc dest, char* src, uint32_t length);
pnuc shiftKey(pnuc dest, pnuc key,uint32_t shift, uint32_t keyLength); pnuc shiftKey(pnuc dest, pnuc key,uint32_t shift, uint32_t keyLength);
void countLetterAt(buffer_t *buffer,uint32_t pos);
uint32_t minSuffix(buffer_t *buffer,uint32_t pos);
#endif /* ORGASM_H_ */ #endif /* ORGASM_H_ */
...@@ -143,7 +143,11 @@ if ((argc -= optind) == 2) ...@@ -143,7 +143,11 @@ if ((argc -= optind) == 2)
strcpy(reverseFileName,argv[optind]); strcpy(reverseFileName,argv[optind]);
} }
else else
{
errflag++; errflag++;
forwardFileName=NULL;
reverseFileName=NULL;
}
if (indexfiles == NULL) if (indexfiles == NULL)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment