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()
def hash(self): hasher = hashprot(self.seq) #for i in self.chunks(): # hasher.update(i) return hasher.hexdigest()
def refhash(self): hasher = hashprot(self.refseq) return hasher.hexdigest()