kevinblighe / EnhancedVolcano

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

lab does not properly output labels when column name is input #117

Open rjferrer opened 1 year ago

rjferrer commented 1 year ago

Hi,

The documentation says the input for lab is a column name in the data table. But when I did this:

EnhancedVolcano(res, lab = "X_1", x = 'log2FoldChange', y = 'padj')

The output is like this:

Screen Shot 2023-06-15 at 1 06 22 PM

This is the structure of my data table:

Screen Shot 2023-06-15 at 1 05 33 PM
allaway commented 1 year ago

I also have this issue with the latest BioC release.

allaway commented 1 year ago

FYI, a simple fix is to do something like this (in your example):

EnhancedVolcano(res,
lab = res$X_1,
x = 'log2FoldChange',
y = 'padj')

Note that this might not work in all situations, e.g. if there are parameters in EnhancedVolcano that filter out some of the rows...I have just started using it so not sure about this.