INNER CODE UNIT · Python
read_instruction_file
hahnlab/CAFE5 · scripts/cfg_maker.py:47
def read_instruction_file(self):
with open(self.instr_path, 'r') as instr_file:
for idx, line in enumerate(instr_file):
line = line.rstrip()
if not line.startswith('#'):
tokens = line.split()
self.instructions_list.append(tokens)
self.n_runs = len(self.instructions_list)
def cfg_writer(self):
for r in xrange(self.n_runs):
with open(self.output_path + 'config_file_' + str(r) + '.cfg', 'w') as config_file:
config_file.write('[CAFExp folder]\ncafexp = ' + self.cafexp_path)
config_file.write('\n\n[input files]\ngene families = ')
input_dict = self.dictionize_lists(self.input_args, self.input_values)