Skip to content

NOT MERGE 478 qc plot on omega vs dndscv values comparison#479

Draft
FerriolCalvet wants to merge 14 commits into
devfrom
478-qc-plot-on-omega-vs-dndscv-values-comparison
Draft

NOT MERGE 478 qc plot on omega vs dndscv values comparison#479
FerriolCalvet wants to merge 14 commits into
devfrom
478-qc-plot-on-omega-vs-dndscv-values-comparison

Conversation

@FerriolCalvet

Copy link
Copy Markdown
Member

No description provided.

@FerriolCalvet FerriolCalvet changed the title 478 qc plot on omega vs dndscv values comparison NOT MERGE 478 qc plot on omega vs dndscv values comparison Jul 2, 2026
@efigb efigb linked an issue Jul 2, 2026 that may be closed by this pull request
@efigb efigb self-assigned this Jul 2, 2026
@efigb efigb added the plot For plotting related issues label Jul 2, 2026
@efigb

efigb commented Jul 6, 2026

Copy link
Copy Markdown
Collaborator

@FerriolCalvet I fixed all errors, tests seeem to work fine 🥳

Should I add someone as reviewer before proceeding with the PR?

@efigb

efigb commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

new related tasks:

  • add comparison omega vs omegagglobal same way we did for omega vs dndscv
  • store omega_vs_omegaglobal and omega_vs_dndscv outputs in the same parent directory qc/omega_qc together with omega_flagged output

Copilot AI left a comment

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.

Pull request overview

This PR extends the DeepCSA QC plotting workflow to add new omega comparison plots (omega vs dNdScv and omega vs omegaglobal) and wires dNdScv results into the plotting subworkflow, with corresponding output publishing updates.

Changes:

  • Plumb dNdScv combined results (all_dNdScv.cv.tsv) into PLOTTING_QC and add an omega-vs-dNdScv QC plotting step (conditional on params.dnds).
  • Add an omega-vs-omegaglobal QC plotting step and publish both new plot outputs under qc/omegaqc/....
  • Extend omega annotation QC outputs to emit a “flagged synonymous” debug TSV used for filtering/annotation in the new plots.

Reviewed changes

Copilot reviewed 6 out of 9 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
workflows/deepcsa.nf Adds a dndscv_table channel and passes it into the QC plotting subworkflow when dNdScv runs.
subworkflows/local/plotting_qc/main.nf Adds module includes and wiring for omega-vs-dNdScv and omega-vs-omegaglobal QC plots.
modules/local/plot/qc/omega_vs_omegaglobal/main.nf New Nextflow process wrapper for running omega_vs_omegaglobal_qc.py.
modules/local/plot/qc/omega_vs_dndscv/main.nf New Nextflow process wrapper for running omega_vs_dndscv_qc.py.
modules/local/plot/qc/annotate_omega/main.nf Updates emitted debug outputs from omega QC annotation to expose flagged synonymous genes.
conf/results_outputs.config Publishes new QC plot outputs to dedicated qc/omegaqc/... directories; updates omega flagged publish path.
bin/plot_explore_variability.py Adds a comment (no functional change).
bin/omega_vs_omegaglobal_qc.py New plotting script for omega vs omegaglobal comparison and correlation plots.
bin/omega_vs_dndscv_qc.py New plotting script for omega vs dNdScv comparison and correlation plots.

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

Comment thread subworkflows/local/plotting_qc/main.nf Outdated
Comment on lines +13 to +18
path("*flagged_annotated.tsv") , emit: all_omegas_annotated
path("debug.*flagged*.tsv") , optional: true, emit: flagged_cases
path("debug.syn_flagged_gene.tsv") , optional: true, emit: flagged_synonymous_cases
path("*.tsv") , optional: true, emit: files
path("*.png") , optional: true, emit: plots
path "versions.yml" , topic: versions

@m-huertasp m-huertasp left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Hola!!

I think it is a very nice job, Bet! I know it is fun when you start understanding a bit more how everything is connected.
I've added some comments, they have some questions in them just to understand what you want exactly. I've also tested the problem Copilot indicated and it is true. In fact, it might be the most important thing to tackle. But it should be quite simple.

If you need some help with something, tell me!

Comment thread bin/omega_vs_dndscv_qc.py
Comment on lines +129 to +130
sample_groups = flagged_genes_df['cohort'].unique().tolist()

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I understand that the idea of this line is to get the name of the sample groups that you'll use later to generate the plot, right? Is the idea to plot only groups in which there is at least one flagged gene or you want to plot them all? Because by getting the groups from the flagged_genes_df you are getting only those with at least one flagged gene.

If you want to plot all, maybe you can get the groups from the omega_df or the dndscv_df??

Comment thread bin/omega_vs_dndscv_qc.py
Comment on lines +91 to +92
ax.legend(bbox_to_anchor=(1.05, 1), loc='upper left')
ax.legend().remove()

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

From what I understand, a legend is generated by line 71 (because you set a hue and you don't add legend=False):

sns.scatterplot(data=impact_subset, x='dnds_omega', y='dnds_dndscv', hue='gene', ax=ax)

Then you try to reposition the legend to end up removing it.

If you don't want a legend, the best thing would be to add the legend=False at line 71, no?
It is not really important, just to know what you wanted 😄

except Exception as e:
print("Error in the process", e)

# pca plot for mutdensity and mutdensity adjusted

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Is there going to be a plot here??

Comment thread subworkflows/local/plotting_qc/main.nf Outdated
Make this plot conditional (similar to the dNdScv plot) and emit an empty channel when not applicable.

Co-authored-by: Copilot Autofix powered by AI <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

plot For plotting related issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

QC plot on omega vs dndscv values comparison

4 participants