def start_data_set(self, dataset, fasta): "Called when starting to format results of particular dataset." self.seq_dict, self.seq_indices, self.seq_names = _read_fasta(fasta) type, name = dataset dir = os.path.join(self.tmpdir, type) ensure_dir_exists(dir) self._close_current() filename = '%s_pred.txt' % name result_file = os.path.join(dir, filename) tar_name = os.path.join(type, filename) self.f = open(result_file, 'w') self.result_files.append((result_file, tar_name))
def start_data_set(self, dataset, fasta): "Called when starting to format results of particular dataset." # need sequences for their lengths later on... self.seq_dict, self.seq_indices, self.seq_names = _read_fasta(fasta) data_set, _t = dataset print >> self.f, ">dataset\n%s\n>instances" % data_set