-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
asap-docking
| Correctly save multipose docking results
#1009
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, see comments.
provenance=self.provenance(), | ||
probability=( | ||
posed_ligands[0].tags[ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't this vary by ligand? Or are they all going to be homogenous?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(sorry for the delay) what are you referring to by "this"? the poses are ordered by the POSIT score such that the first pose is the one with the best POSIT probability.
input_pairs.append(set) | ||
|
||
# create hashable dict of input pairs | ||
input_pair_dict = { | ||
input_pair.unique_name: input_pair for input_pair in input_pairs | ||
} | ||
|
||
# split results by input pair | ||
from collections import defaultdict | ||
|
||
results_dict = defaultdict(list) | ||
for input_pair, posed_ligand in zip(input_pairs, posed_ligands): | ||
results_dict[input_pair.unique_name].append(posed_ligand) | ||
|
||
# return results split by input pair | ||
for input_pair_name, posed_ligands in results_dict.items(): | ||
docking_result = POSITDockingResults( | ||
input_pair=input_pair, | ||
posed_ligand=posed_ligand, | ||
probability=prob, | ||
input_pair=input_pair_dict[input_pair_name], | ||
posed_ligand=Ligand.from_single_conformers(posed_ligands), | ||
provenance=self.provenance(), | ||
probability=( | ||
posed_ligands[0].tags[ | ||
DockingResultCols.DOCKING_CONFIDENCE_POSIT.value | ||
] | ||
if len(posed_ligands) == 1 | ||
else None | ||
), | ||
pose_id=( | ||
posed_ligands[0].tags["Pose_ID"] | ||
if len(posed_ligands) == 1 | ||
else None | ||
), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we move this more complicated logic into the branch above to avoid performance penalty when not using a MultiStructure
input and also to make the non-Multi case clearer?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I've fixed this sufficiently?
for more information, see https://pre-commit.ci
Description
Updates the POSIT docker to use the updates from #692 to handle writing multipose posit results.
Fixes #988
Todos
Notable points that this PR has either accomplished or will accomplish.
Status
Developers certificate of origin