Skip to content

Commit 829bc26

Browse files
committed
Pass upstream mtz file to pipedream
1 parent 7734694 commit 829bc26

1 file changed

Lines changed: 34 additions & 1 deletion

File tree

src/dlstbx/wrapper/pipedream_xchem.py

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def run(self):
3535

3636
dimple_pdb = dataset_dir / "dimple.pdb"
3737
dimple_mtz = dataset_dir / "dimple.mtz"
38-
upstream_mtz = dataset_dir / params.get("upstream_mtz")
38+
upstream_mtz = dataset_dir / f"{dtag}.free.mtz"
3939

4040
self.log.info(f"Processing dtag: {dtag}")
4141

@@ -299,6 +299,39 @@ def save_dataset_metadata(
299299
with open(json_file, "w", encoding="utf-8") as f:
300300
json.dump(data, f, indent=2)
301301

302+
# def send_attachments_to_ispyb(self, pipeline_directory, final_directory):
303+
# for f in pipeline_directory.iterdir():
304+
# if f.stem.endswith("final"):
305+
# file_type = "Result"
306+
# importance_rank = 1
307+
# elif f.suffix == ".html":
308+
# file_type = "Result"
309+
# importance_rank = 1
310+
# elif f.suffix == ".png":
311+
# file_type = "Result"
312+
# importance_rank = 1
313+
# elif f.suffix == ".json":
314+
# file_type = "Result"
315+
# importance_rank = 1
316+
# elif f.suffix == ".log":
317+
# file_type = "Log"
318+
# importance_rank = 2
319+
# else:
320+
# continue
321+
# try:
322+
# shutil.copy(pipeline_directory / f.name, final_directory)
323+
# result_dict = {
324+
# "file_path": str(final_directory),
325+
# "file_name": f.name,
326+
# "file_type": file_type,
327+
# "importance_rank": importance_rank,
328+
# }
329+
# self.record_result_individual_file(result_dict)
330+
# self.log.info(f"Uploaded {f.name} as an attachment")
331+
332+
# except Exception:
333+
# self.log.warning(f"Could not attach {f.name} to ISPyB", exc_info=True)
334+
302335
def update_data_source(self, db_dict, dtag, database_path):
303336
sql = (
304337
"UPDATE mainTable SET "

0 commit comments

Comments
 (0)