UCLouvain-CBIO / scp

Single cell proteomics data processing
https://uclouvain-cbio.github.io/scp/index.html
19 stars 2 forks source link

Small issue in scplainer: volcano plot #55

Closed shimin-chen closed 4 days ago

shimin-chen commented 5 months ago

Hello,

I am trying the scplainer workflow on my own data. I noticed that when using scpVolcanoPlot() to create a volcano plot, the group order provided to scpDifferentialAnalysis() is not always retained in the volcano plot.

For example, in the code below, up-regulated peptides in Group1 should appear on the right side of the volcano plot. However, depending on the group name, sometimes the first category provided to the scpDifferentialAnalysis() ends up on the left side of the volcano plot, which creates some confusion when interpreting the plot. Although it is easy to find out the actual order of groups by making a peptide intensity plot, it would be more convenient if the volcano plot always has a fixed order (i.e. first category is always on the right and second category always on the left).

daRes <- scpDifferentialAnalysis( sce, contrast = list(c("SampleType", "Group1", "Group2")) ) scpVolcanoPlot(daRes)

cvanderaa commented 5 months ago

Hello @shimin-chen,

Thank you for your feedback. I agree with you that this is confusing. On top of your commet, I think we could also improve either the title of the plot (currently "Group1_vs_Group2") or the annotations of the x axis. For instance, we could explicit the direction of the change for each group using "Group1 <--0--> Group 2".

shimin-chen commented 5 months ago

Hello Christophe,

Thank you for your response. Yes, having the annotation would be even more helpful.

Thank you for your work in developing the scp package and scplainer workflow!

shimin-chen commented 1 week ago

Hello Christophe,

It looks like the direction annotation has been added in the latest version of scp (UCLouvain-CBIO/scp@32022fb). Thanks for doing that! Oddly though, the direction of the annotation seems a bit off. In my analysis, after double-checking using the method here, it can be confirmed that the direction annotation on the volcano plot should be reversed. The direction of change is actually the same order as the plot title (Group1_vs_Group2), so the annotation should be "Group1 <--log2(Fold change)--> Group2". Currently, it is "Group2 <--log2(Fold change)--> Group 1".

Thanks, Shimin

cvanderaa commented 6 days ago

Hello Shimin,

I'm happy you saw that I "solved" the annotation issue in the latest version. Well at least I tried to solve it, but as you correctly noticed, I inverted the annotation axis... :sweat: So this should be fixed now in this PR. You can install the latest version using:

BiocManager::install("UCLouvain-CBIO/scp", ref = "issue55")

Could you confirm this provides what you expected?

Once again, thank you very much for checking this out and helping me debugging scplainer!

shimin-chen commented 5 days ago

Hi Christophe,

Thank you so much for coming up with the solution so quickly! Yes, I can confirm that it is working as expected now.

Thanks for the continuous technical support and development!