Skip to content

Mitocheck analysis#79

Merged
axiomcura merged 33 commits intoWayScience:mainfrom
axiomcura:mitocheck-analysis
Mar 19, 2026
Merged

Mitocheck analysis#79
axiomcura merged 33 commits intoWayScience:mainfrom
axiomcura:mitocheck-analysis

Conversation

@axiomcura
Copy link
Copy Markdown
Member

@axiomcura axiomcura commented Mar 6, 2026

This PR adds the buscar results after applying the method to Mitocheck.

This will be merged once #75 is merged.

Note to reviewer

Most of the changes come from the analysis notebooks. The main parts that need review are:

  • metric.py
  • the 3.mitocheck-analysis folder

Please ignore the cfret analysis for now. I’m not sure why those results appeared after merging #75. I will submit another PR rerunning the cfret analysis to confirm whether any bugs or errors were introduced after the merge.

Also, please don’t focus too much on the 4.cpjump1-analysis folder, as that analysis is still in progress.

axiomcura and others added 27 commits February 12, 2026 11:27
…alysis.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…alysis.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…_base_on_moa.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…alysis.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…otypic-activity.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…ores.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@review-notebook-app
Copy link
Copy Markdown

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@axiomcura axiomcura requested a review from Copilot March 6, 2026 21:39
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds Mitocheck Buscar analysis outputs (notebooks/scripts + generated plots/tables) and updates core utility/metric code used by the analysis workflows.

Changes:

  • Extend shuffle_feature_profiles and add an ENSG→gene-symbol helper for Mitocheck preprocessing.
  • Refactor/extend buscar.metrics scoring + EMD threading controls used by downstream analyses.
  • Add Mitocheck analysis runner scripts plus converted notebooks and plot-generation R scripts/artifacts.

Reviewed changes

Copilot reviewed 30 out of 54 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
utils/data_utils.py Adds label shuffling option and ENSG→gene symbol API helper used in Mitocheck workflows.
r_buscar_env.yaml Expands environment with Python runtime + core Python deps used in Buscar workflows.
notebooks/4.cpjump1-analysis/nbconverted/5.cpjump_u2os_MoA_analysis.py Removes converted notebook script (analysis reshuffling/cleanup).
notebooks/4.cpjump1-analysis/nbconverted/3.calculate-on-off-scores.py Removes converted notebook script (analysis reshuffling/cleanup).
notebooks/4.cpjump1-analysis/nbconverted/2.run_buscar_rankings_base_on_moa.py Updates MoA ranking workflow to new shuffling + metrics API.
notebooks/4.cpjump1-analysis/nbconverted/2.assess-heterogeneity.py Removes converted notebook script (analysis reshuffling/cleanup).
notebooks/4.cpjump1-analysis/nbconverted/1.generate-on-off-signatures.py Minor notebook export tweaks and output changes.
notebooks/4.cpjump1-analysis/3.calculate-on-off-scores.ipynb Removes notebook.
notebooks/4.cpjump1-analysis/2.run_buscar_rankings_base_on_moa.ipynb Adds updated notebook version of MoA ranking run.
notebooks/4.cpjump1-analysis/2.assess-heterogeneity.ipynb Removes notebook.
notebooks/4.cpjump1-analysis/1.generate-on-off-signatures.ipynb Updates to use buscar.signatures.get_signatures and refreshes outputs.
notebooks/3.mitocheck-analysis/run-mitocheck-buscar.sh Adds a shell entrypoint to nbconvert + run Mitocheck Python analysis scripts.
notebooks/3.mitocheck-analysis/plots/run-mitocheck-plots.sh Adds a shell entrypoint to nbconvert + run Mitocheck R plotting scripts.
notebooks/3.mitocheck-analysis/plots/nbconverted/1.heat-map-on-off-scores.r Adds R script to render Mitocheck heatmaps.
notebooks/3.mitocheck-analysis/plots/nbconverted/2.gene-ranking-relationship.r Adds R script to quantify/correlate rank consistency across phenotypic states.
notebooks/3.mitocheck-analysis/plots/nbconverted/3.linear-modeling-ranking-and-proportion.r Adds R script for rank vs. phenotype-proportion modeling/plots.
notebooks/3.mitocheck-analysis/plots/all-plots/gene-ranking-relationships/profile_specificity_real.csv Adds generated summary table artifact.
notebooks/3.mitocheck-analysis/plots/all-plots/gene-ranking-relationships/profile_specificity_real_vs_shuffled.csv Adds generated comparison summary artifact.
notebooks/3.mitocheck-analysis/plots/all-plots/gene-ranking-relationships/kendall_w_real_permutation_summary.csv Adds generated Kendall’s W permutation summary artifact.
notebooks/3.mitocheck-analysis/plots/all-plots/gene-ranking-relationships/kendall_w_real_shuffled_permutation_summary.csv Adds generated real vs shuffled Kendall’s W summary artifact.
notebooks/3.mitocheck-analysis/nbconverted/0.explore-mitocheck-data.py Adds converted Mitocheck EDA script.
notebooks/3.mitocheck-analysis/nbconverted/1.buscar-analysis.py Adds converted Mitocheck Buscar analysis (including LOGO evaluation).
notebooks/3.mitocheck-analysis/1.buscar-analysis.ipynb Adds the Mitocheck analysis notebook source.
notebooks/2.cfret-analysis/4.assess-signature-significance.ipynb Notebook markdown/content adjustments.
notebooks/2.cfret-analysis/3.generate-pca-umap-components.ipynb Notebook output changes (cell counts).
notebooks/2.cfret-analysis/1.cfret-pilot-buscar-analysis.ipynb Notebook metadata version change.
notebooks/0.download-data/2.preprocessing.ipynb Uses ENSG→symbol conversion + stores mapping for Mitocheck.
buscar/metrics.py Refactors score computation and adds EMD threading + optional normalization behavior.
.pre-commit-config.yaml Updates Ruff pre-commit revision.
Comments suppressed due to low confidence (1)

notebooks/4.cpjump1-analysis/nbconverted/2.run_buscar_rankings_base_on_moa.py:377

  • measure_phenotypic_activity is invoked with emd_n_threads, but the function signature uses n_threads. As written, this will raise TypeError: unexpected keyword argument 'emd_n_threads'. Update the call site to use n_threads (or align the API if emd_n_threads is intended).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

@axiomcura axiomcura requested a review from wli51 March 16, 2026 22:04
Copy link
Copy Markdown
Contributor

@wli51 wli51 left a comment

Choose a reason for hiding this comment

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

Great work and nice looking results. LGTM!

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

what is the dashed line meaning here?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

these roc for cpjump looked a lot better!

@axiomcura
Copy link
Copy Markdown
Member Author

thanks for the review @wli51

@axiomcura axiomcura merged commit 2c578a6 into WayScience:main Mar 19, 2026
@axiomcura axiomcura deleted the mitocheck-analysis branch March 19, 2026 23:42
axiomcura added a commit to axiomcura/buscar that referenced this pull request Mar 31, 2026
* removed cluster refinement module

* removed heterogeneity

* updated metrics

* created buscar module (separated notebook utils and buscar software)

* updated test module

* updated imports to reflect module changs

* ignore vscode cached files

* updated metrics

* Update notebooks/2.cfret-analysis/nbconverted/1.cfret-pilot-buscar-analysis.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update notebooks/2.cfret-analysis/nbconverted/1.cfret-pilot-buscar-analysis.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update buscar/metrics.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update notebooks/4.cpjump1-analysis/nbconverted/4.run_buscar_rankings_base_on_moa.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update notebooks/2.cfret-analysis/nbconverted/1.cfret-pilot-buscar-analysis.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update buscar/metrics.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update notebooks/1.compound-prioritization/nbconverted/4.measure-phenotypic-activity.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update notebooks/4.cpjump1-analysis/nbconverted/3.calculate-on-off-scores.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* applied copilot's changes

* update processing module

* reran buscar on cfret data

* reran nbconvert

* removed pdf

* update cpjump1 analysis module

* updates

* added mitocheck analysis module

* added label shuffling method

* mitocheck buscar ranking analysis

* removed cpjump analysis folder, this should be in another PR

* fixed bugs

* fix bugs and updates

* updated plots

* fixes and updates

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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