Skip to content

[ENH] Add interaction map visualization utility using heatmap#293

Closed
xPREMy wants to merge 3 commits into
gc-os-ai:mainfrom
xPREMy:feature/interaction-map-plot
Closed

[ENH] Add interaction map visualization utility using heatmap#293
xPREMy wants to merge 3 commits into
gc-os-ai:mainfrom
xPREMy:feature/interaction-map-plot

Conversation

@xPREMy

@xPREMy xPREMy commented Apr 5, 2026

Copy link
Copy Markdown

Reference Issues/PRs

issue #283

What does this implement/fix? Explain your changes.

This PR introduces visualization utilities for AptaTrans interaction maps and restructures related tests.
Specifically, it:

  • Adds _plot.py to utils, which implements robust functionality to visualize single-nucleotide and single-amino-acid resolution interaction maps.
  • Restructures the tests by moving test_plot.py into the utils/tests/ directory to keep plotting tests clean and collocated with the utilities.
  • Updates pipeline.py to integrate the new plotting utility into the core analytical pipeline, enabling proper tensor mapping and visualization outputs.

What should a reviewer concentrate their feedback on?

  • The visual styling and accuracy of the heatmap plots generated by utils/_plot.py.
  • The integration points in pipeline.py to ensure it passes data structures appropriately to the plotting function.
  • The test coverage and assertions in utils/tests/test_plot.py.

Did you add any tests for the change?

  • Yes, test_plot.py has been added/updated and run across the pipeline changes.

Any other comments?

PR checklist

  • The PR title starts with either [ENH], [MNT], [DOC], or [BUG]. [BUG] - bugfix, [MNT] - CI, test framework, [ENH] - adding or improving code, [DOC] - writing or improving documentation or docstrings.
  • Added/modified tests
  • Used pre-commit hooks when committing to ensure that code is compliant with hooks. Install hooks with pre-commit install.
    To run hooks independent of commit, execute pre-commit run --all-files

@xPREMy xPREMy changed the title Add interaction map visualization utility using heatmap [ENH] Add interaction map visualization utility using heatmap Apr 5, 2026
@satvshr satvshr requested a review from NennoMP April 5, 2026 09:47
@siddharth7113

Copy link
Copy Markdown
Collaborator

Hi, Please ensure pre-commit in installed and only if you have ran the check, please mark it in the PR.

Used pre-commit hooks when committing to ensure that code is compliant with hooks. Install hooks with pre-commit install.
To run hooks independent of commit, execute pre-commit run --all-files

@xPREMy

xPREMy commented Apr 6, 2026

Copy link
Copy Markdown
Author

Apologies, I’ve now rerun pre-commit, and the issues should be resolved. Would you mind reviewing it again?

@siddharth7113

Copy link
Copy Markdown
Collaborator

Please ensure your tests are passing before requesting a re-review.

@xPREMy

xPREMy commented Apr 8, 2026

Copy link
Copy Markdown
Author

I now have ran all the tests. would you please check again.

@NennoMP

NennoMP commented Apr 10, 2026

Copy link
Copy Markdown
Collaborator

@xPREMy Couple of issues:

  • (i) The TODO comment explicitly mentioned that an idea was to leave the untouched interaction map as is, rather than plot it. Before starting a PR, it would have made sense to at least have a discussion with maintainers within the corresponding issue.
  • (ii) In my opinion, if we really want to add a plotting functionality, it should be within pyaptamer.aptatrans. The interaction map is unique so AptaTrans, so I would not put a method used by just one algorithm in utils.
  • (iii) Most importantly, plotting should be implemented as a refactored version of the original authors' code (see method get_interaction_map at link).

Related to point (ii), I also don't see the plotting method being called and/or made available within the AptaTrans pipeline. Basically, the user is not able to use it via the pipeline right now, am I missing something?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants