kevinblighe / EnhancedVolcano

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

How to use enhancedVolcano for proteomics data #84

Closed w2niva closed 3 years ago

w2niva commented 3 years ago

Hi, I have proteomics data which is in .csv format. In the file, I have different comparisons. I have fold change and p-values from my analysis and gene names in separate columns. I want to use enhancedVolcano to plot this data. However, I am not able to plot my data. Is there a way to convert my data into the data frame that enhancedVolcano would take? I was also trying to specify x = log2(prot_data$Abundance.Ratio...VI.....MI.), y = -log10(prot_data$Abundance.Ratio.P.Value...VI.....MI.); since log2 and log10 are not calculated in my dataset.

I am getting the following error:

Error in .subset2(x, i, exact = exact) : recursive indexing failed at level 2 4. (function(x, i, exact) if (is.matrix(i)) as.matrix(x)[[i]] else .subset2(x, i, exact = exact))(x, ..., exact = exact) 3. [[.data.frame(toptable, x) 2. toptable[[x]]

Please if there is anything that you ca help me with then that would be great. I really liked the tutorial and would be helpful if I could use this tool.

kevinblighe commented 3 years ago

Hi,

You should do the log2 transformation outside of EnhancedVolcano, and then just use x = 'prot_data$Abundance.Ratio...VI.....MI.'

For y, EnhancedVolcano does the -log10 transformation for you. So, you just need: y = 'prot_data$Abundance.Ratio.P.Value...VI.....MI.'

Also, these column names are quite 'messy'. I would tidy them to 'AbundanceRatio' and 'PValue', respectively.

Hopefully this resolves it!

Kevin