Skip to content
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

haddock3-traceback #668

Merged
merged 10 commits into from
Aug 23, 2023
Merged

haddock3-traceback #668

merged 10 commits into from
Aug 23, 2023

Conversation

mgiulini
Copy link
Contributor

@mgiulini mgiulini commented Jun 23, 2023

You are about to submit a new Pull Request. Before continuing make sure you read the contributing guidelines and that you comply with the following criteria:

  • You have sticked to Python. Please talk to us before adding other programming languages to HADDOCK3
  • Your PR is about CNS
  • Your code is well documented: proper docstrings and explanatory comments for those tricky parts
  • You structured the code into small functions as much as possible. You can use classes if there is a (state) purpose
  • Your code follows our coding style
  • You wrote tests for the new code
  • tox tests pass. Run tox command inside the repository folder
  • -test.cfg examples execute without errors. Inside examples/ run python run_tests.py -b
  • PR does not add any dependencies, unless permission granted by the HADDOCK team
  • PR does not break licensing
  • Your PR is about writing documentation for already existing code 🔥
  • Your PR is about writing tests for already existing code :godmode:

Closes #402 by tracking all the PDB files in a HADDOCK3 workflow.

Starting from the end of the workflow, this CLI gathers the information contained in the io.json file to understand name and rank of each model and, more importantly, the name of the parent model (ori_name attribute) that was used to generate the current structure. In order to do this, I added the ori_name attribute to all the modules, with the exception of the rigidbody module, in which the topology attribute is employed to guess the (typically two) ancestors.

Usage:
haddock3-traceback -r run_dir

Doubt: now the modules to be excluded from the traceback are listed here

ANA_MODULES = ["caprieval",
: do you think it is better to list the modules on which the traceback must act?

Important: for new modules that generate PDB files (such as Openmm #482 ), the attribute ori_name should be defined for a successful traceback.

Important 2.0: the traceback does not work on old HADDOCK3 runs (the attribute ori_name is not defined for all the modules).

@mgiulini mgiulini self-assigned this Jun 23, 2023
@codecov-commenter
Copy link

codecov-commenter commented Jun 23, 2023

Codecov Report

Patch coverage: 84.51% and project coverage change: +0.21% 🎉

Comparison is base (27321d5) 74.73% compared to head (aec97bb) 74.94%.
Report is 8 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #668      +/-   ##
==========================================
+ Coverage   74.73%   74.94%   +0.21%     
==========================================
  Files         111      113       +2     
  Lines        7642     7800     +158     
==========================================
+ Hits         5711     5846     +135     
- Misses       1931     1954      +23     
Files Changed Coverage Δ
...haddock/modules/analysis/seletopclusts/__init__.py 22.22% <0.00%> (-0.42%) ⬇️
src/haddock/modules/refinement/emref/__init__.py 20.00% <0.00%> (-1.22%) ⬇️
src/haddock/modules/refinement/flexref/__init__.py 22.53% <0.00%> (-1.35%) ⬇️
src/haddock/modules/refinement/mdref/__init__.py 20.00% <0.00%> (-1.22%) ⬇️
src/haddock/libs/libworkflow.py 30.48% <50.00%> (+0.48%) ⬆️
src/haddock/clis/cli_traceback.py 91.66% <91.66%> (ø)
tests/test_cli_traceback.py 96.87% <96.87%> (ø)

... and 2 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mgiulini mgiulini marked this pull request as ready for review June 26, 2023 12:39
# get the module folders from the run_dir input
all_steps = get_module_steps_folders(Path(run_dir))
log.info(f"All_steps: {', '.join(all_steps)}")
sel_step = [st for st in all_steps if st.split("_")[1] not in ANA_MODULES]
Copy link
Contributor

@VGPReys VGPReys Jun 26, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'_'.join(st.split("_")[1:])
Just to make sure if any module has an underscore character one day ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would not worry about it..

Copy link
Contributor

@VGPReys VGPReys left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have to try it out now.
I am not so familiar with the panda library, hence cannot clearly assess this part.

Copy link
Member

@rvhonorato rvhonorato left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

amazing addition! just a few comments

src/haddock/clis/cli_traceback.py Outdated Show resolved Hide resolved
src/haddock/clis/cli_traceback.py Outdated Show resolved Hide resolved
src/haddock/clis/cli_traceback.py Show resolved Hide resolved
@mgiulini
Copy link
Contributor Author

mgiulini commented Aug 7, 2023

hi @rvhonorato can you check this again and, in case it's Ok, approve it?

Copy link
Contributor

@VGPReys VGPReys left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice to put it directly after a Haddock3 run !
Almost wondering if it still has to be a separated client and not embedded in the analysis one

Copy link
Member

@amjjbonvin amjjbonvin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will trust on on it

@rvhonorato rvhonorato self-requested a review August 14, 2023 08:00
@mgiulini mgiulini merged commit dadd40b into main Aug 23, 2023
8 checks passed
@mgiulini mgiulini deleted the traceback branch August 23, 2023 15:32
@VGPReys VGPReys added the feature New feature request label Dec 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PDB traceback module
5 participants