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

Use tangermeme backend for tomtom #75

Merged
merged 18 commits into from
Nov 8, 2024
Merged

Use tangermeme backend for tomtom #75

merged 18 commits into from
Nov 8, 2024

Conversation

avantikalal
Copy link
Collaborator

@avantikalal avantikalal commented Oct 22, 2024

Replaced the TOMTOM executable from the MEME suite with the tomtom reimplementation in tangermeme v0.4. Tomtom no longer has to be installed in the environment to use run_modisco, which is a major source of user issues.

Specific changes:

  1. removed MEME suite installation in Dockerfile:
  2. Created a run_tomtom function in interpret.motifs. This takes a dictionary of motifs and a meme file, and compares the motifs to the reference motifs in the meme file.
  3. Added a test for run_tomtom in tests/test_interpret.py.
  4. Modified run_modisco to use run_tomtom for the tomtom part if a meme file is provided. This involved creating a new function _add_tomtom_to_modisco_report which is modified from modiscolite.
  5. Reran all the tutorials.

Fully addresses #55

@avantikalal avantikalal requested a review from suragnair November 8, 2024 02:00
@avantikalal avantikalal changed the title WIP: use tangermeme backend for tomtom Use tangermeme backend for tomtom Nov 8, 2024
top_n_matches: int,
) -> None:
"""
Modified from https://github.com/jmschrei/tfmodisco-lite/blob/main/modiscolite/report.py#L245
Copy link
Collaborator

Choose a reason for hiding this comment

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

Copy link
Collaborator

Choose a reason for hiding this comment

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

also, would it make more sense to put this function and run_modisco in a separate modisco.py file? Does not fit into score.py thematically I feel.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Makes sense, I'll make both changes.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

done

tests/test_interpret.py Show resolved Hide resolved
src/grelu/interpret/motifs.py Show resolved Hide resolved
@avantikalal avantikalal requested a review from suragnair November 8, 2024 19:25
@avantikalal avantikalal merged commit 92c23e9 into main Nov 8, 2024
2 checks passed
@avantikalal avantikalal deleted the tomtom-tangermeme branch November 8, 2024 20:47
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.

2 participants