Commit d1d26b90 by Eric Coissac

Simplify the code

parent 8f0462c4
......@@ -8,14 +8,6 @@ cdef class FastaFormat:
self.headerFormater = HeaderFormat(True,
tags,
printNAKeys)
# def __cinit(self):
# self.sequenceBufferLength=1000
# self.sequenceBuffer = malloc(self.sequenceBufferLength)
#
# def __dealloc__(self)
# free(self.sequenceBuffer)
@cython.boundscheck(False)
def __call__(self, dict data):
......@@ -30,28 +22,7 @@ cdef class FastaFormat:
brawseq = b'\n'.join(lines)
return "%s\n%s" % (self.headerFormater(data),bytes2str(brawseq))
# cdef char* crowseq = <char*> brawseq
# cdef size_t needed_size = lseq + 1
#
# needed_size += needed_size/ 50
#
# if needed_size > self.sequenceBufferLength:
# self.sequenceBufferLength=needed_size
# self.sequenceBuffer = realloc(self.sequenceBuffer,
# self.sequenceBufferLength
# )
#
#
# for i in range(0,lseq,60):
# if i+60 <= lseq:
# fasta[k:(k+60)]=seq[i:(i+60)]
# fasta[k+60]='\n'
# k+=61
# else:
# fasta[k:(k+lseq-i)]=seq[i:lseq]
# k+=lseq-i
......
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