kevinblighe / EnhancedVolcano

Publication-ready volcano plots with enhanced colouring and labeling
399 stars 81 forks source link

Custom pval col #75

Closed andreagrioni closed 3 years ago

andreagrioni commented 3 years ago

Hi Kevin,

Thank you for your work.

This pull request adds a new parameter pCutoffCol.

pCutoffCol allows the user to select a specific column as an alternative to y when looking for statistically significant genes. e.g. Limma toptable function provides both P-Value and adjusted P-value (FDR). The user may want to highlight statistically significant genes based on the FDR, but keeping the column y (P-Value) for the volcano plot.

[pull_test.zip](https://github.com/kevinblighe/EnhancedVolcano/files/6292019/pull_test.zip)
EnhancedVolcano(subtest,
                lab = subtest %>% pull('EntrezGeneSymbol'),
                x = 'logFC',
                y = 'P.Value',
                #pCutoffCol='adj.P.Val',
                pCutoff=5e-2,
                FCcutoff=0,
                col=c('black', 'black', 'black', 'red3'),
                legendLabels=c('Not sig.','Not sig.',
                               'Not sig.', 'FDR'),
                ylim = c(0, -log10(10e-12)),
                xlim = c(-1.5, 1.5),
                title="Volcano Plot",
                subtitle="genes highlighted by P-Value"
                )
kevinblighe commented 3 years ago

Thanks @andreagrioni ! I just did a round of updates for all of my packages, so, this will have to wait until the next time. I will take a look, but it may be some time.

kevinblighe commented 3 years ago

Hi, I see what this is doing - thanks. I will be able to implement it over the weekend. I had thought about how best to introduce this functionality, but you seem to have done it for me! Will give credit where it is due.

andreagrioni commented 3 years ago

Hi Kevin,

Thank you for considering this implementation. I am using EnhancedVolcano quite often and I like it a lot!

On Fri, 14 May 2021 at 22:27, Kevin Blighe @.***> wrote:

Hi, I see what this is doing - thanks. I will be able to implement it over the weekend. I had thought about how best to introduce this functionality, but you seem to have done it for me! Will give credit where it is due.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/kevinblighe/EnhancedVolcano/pull/75#issuecomment-841483700, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALGSFMQGSLQCFYVKY5JLZF3TNWBULANCNFSM42XXLP2A .

-- Andrea Grioni, PhD Senior Data Scientist, QSI BMD Novartis Institute for Biomedical Research Novartis Campus, Fabrikstrasse 10, 4056, Basel-Stadt, Switzerland

@.***