Repository navigation
update wrapper to specify the html file paths for cluster HTML output - #395
Open
amyjaynethompson wants to merge 2 commits into
Open
amyjaynethompson wants to merge 2 commits into
amyjaynethompson wants to merge 2 commits into
Conversation
pblowey
requested changes
Oct 23, 2026
Comment on lines
+99
to
+116
| # Step 3.5: Ammend paths in HTML for synchweb interactivity | ||
|
|
||
| for attachment in attachments: | ||
| html_path = pathlib.Path(attachment["file_path"]) / attachment["file_name"] | ||
| # pipeline-final is in file_path, but we want the /processed for data processing | ||
| parts = list(html_path.parts) | ||
| if "pipeline-final" in parts: | ||
| parts.remove("pipeline-final") | ||
| desired_path = pathlib.Path(*parts) | ||
| if attachment["file_name"] == "xia2.multiplex.html": | ||
| path_to_insert = desired_path.parent / "xia2-multiplex-working.phil" | ||
| self.fix_paths_in_html_output(html_path, path_to_insert) | ||
| elif attachment["file_name"] == "xia2.multiplex_clustering.html": | ||
| path_to_insert = ( | ||
| desired_path.parent.parent / "xia2-multiplex-working.phil" | ||
| ) | ||
| self.fix_paths_in_html_output(html_path, path_to_insert) | ||
|
|
Contributor
There was a problem hiding this comment.
This seems to be a long-winded way of getting to a file path, which I think will always be results_directory / xia2-multiplex-working.phil
I think it would be better to just have some logic when you are constructing the attachments list in the first place to look out for the two html files of interest and fix the paths then using results_directory / xia2-multiplex-working.phil
Contributor
Author
There was a problem hiding this comment.
I agree it was a bit long-winded - have simplified significantly in the recent commit.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The xia2.multiplex html output files (

xia2.multiplex.htmlandxia2.multiplex_clustering.html) contain within them a function that assembles a command that a user can copy-paste into a terminal to reprocess custom sub-groups. This happens when the user selects custom subgroups in either of these html files. The HTML derives this path from looking at the location of the file - this breaks down when using attachments on SynchWeb and the following results:In xia2 PR #953 , a variable was added to this HTML file that could overwrite the logic and specify a custom file path. In this PR, the multiplex wrapper edits this variable to point to the data in the processed directory. This means that the user could interact with these files on SynchWeb while remotely connected to Diamond, and copy paste the file path for reprocessing.