(file)
| 10 | |
| 11 | |
| 12 | def load_protein(file): |
| 13 | try: |
| 14 | data_object = protein.from_pdb_string(open(file).read()).to_dict() |
| 15 | except ValueError as err: |
| 16 | print("Fail to load pdb %s." % os.path.basename(file), err) |
| 17 | return |
| 18 | |
| 19 | file = os.path.basename(file) |
| 20 | name, ext = os.path.splitext(file) |
| 21 | output_fname = os.path.join(output_dir, name+".pkl") |
| 22 | with open(output_fname, "wb") as f: |
| 23 | pickle.dump(data_object, f, protocol=pickle.HIGHEST_PROTOCOL) |
| 24 | |
| 25 | |
| 26 | parser = argparse.ArgumentParser() |
no test coverage detected