示例#1
0
文件: fasta.py 项目: mke21/genomegit
 def hash(self):
     """
     Function to calculate md5 hash of a big file
     """
     BLOCKSIZE = 65536
     hasher = hashprot()
     with open(self.path, 'rb') as fin:
         buf = fin.read(BLOCKSIZE)
         while len(buf) > 0:
             hasher.update(buf)
             buf = fin.read(BLOCKSIZE)
     return hasher.hexdigest() 
示例#2
0
文件: fasta.py 项目: mke21/genomegit
 def hash(self):
     hasher = hashprot(self.seq)
     #for i in self.chunks():
     #    hasher.update(i)
     return hasher.hexdigest()
示例#3
0
文件: fasta.py 项目: mke21/genomegit
 def refhash(self):
     hasher = hashprot(self.refseq)
     return hasher.hexdigest()