Conversation
…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>
|
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
There was a problem hiding this comment.
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_profilesand add an ENSG→gene-symbol helper for Mitocheck preprocessing. - Refactor/extend
buscar.metricsscoring + 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_activityis invoked withemd_n_threads, but the function signature usesn_threads. As written, this will raiseTypeError: unexpected keyword argument 'emd_n_threads'. Update the call site to usen_threads(or align the API ifemd_n_threadsis 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.
wli51
left a comment
There was a problem hiding this comment.
Great work and nice looking results. LGTM!
notebooks/3.mitocheck-analysis/nbconverted/1.buscar-analysis.py
Outdated
Show resolved
Hide resolved
notebooks/3.mitocheck-analysis/nbconverted/1.buscar-analysis.py
Outdated
Show resolved
Hide resolved
...mitocheck-analysis/plots/all-plots/rank-and-proportion/on_score_vs_proportion_by_profile.png
Show resolved
Hide resolved
There was a problem hiding this comment.
what is the dashed line meaning here?
There was a problem hiding this comment.
these roc for cpjump looked a lot better!
|
thanks for the review @wli51 |
* 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>
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:
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.