Question: Log2FC data type error in EnhansedVolcano package
0
gravatar for sauuyer
12 days ago by
sauuyer10
sauuyer10 wrote:

Hello,

When running function EnhancedVolcano(): I am receiving the error that, log2FC is not numeric, though type(log2FC) returns "double."

Here is the format of the function:

EnhancedVolcano(df, lab = 'Gene', x = 'log2FC', y = 'pvalue', xlim = c(-5, 8))

The format of df is:

Gene, log2FC, pvalue 12953, 0.888282, 5.66e-12 ...

Any ideas why this function is not liking our data input for x?

ADD COMMENTlink modified 11 days ago • written 12 days ago by sauuyer10

Just FYI: you should add the package name as a tag so that the package maintainer is notified when you post a question about their package.

ADD REPLYlink written 12 days ago by Steve Lianoglou12k

I think you'll have to provide an example, otherwise its impossible to recreate your problem. Just running EnhancedVolcano with numbers like yours does not give this error.

ADD REPLYlink written 11 days ago by Nicolas Huber0
Answer: Log2FC data type error in EnhansedVolcano package
0
gravatar for Kevin Blighe
11 days ago by
Kevin Blighe200
Kevin Blighe200 wrote:

Hey, I developed this package, which is the same as the function name. Can you paste the output of str(df) ?; and also quote the version of the package that you are using? - thanks.

In particular, your 'log2FC' column is failing this simple QC check: https://github.com/kevinblighe/EnhancedVolcano/blob/master/R/EnhancedVolcano.R#L78

Kevin

ADD COMMENTlink written 11 days ago by Kevin Blighe200
1

Hi Kevin,

Thanks for your response. I have been able to produce a volcano plot, by adding data.frame(df), even through it already seemed to be a data.frame.

Here is the output you have requested:

str(df) 'data.frame': 27179 obs. of 2 variables: $ log2FC: num 0.881 0.64 -1.27 -1.295 1.158 ... $ pvalue: num 5.67e-12 7.46e-12 3.16e-11 3.16e-11 4.83e-10 ...

I have run my original script again, and it is now working even without the data.frame(df) coercion.

ADD REPLYlink written 11 days ago by sauuyer10
Answer: Log2FC data type error in EnhansedVolcano package
0
gravatar for sauuyer
11 days ago by
sauuyer10
sauuyer10 wrote:

I was able to resolve this issue. The problem was caused by the data format being imported directly as a csv containing pvalue and log2fc values, rather than going through the data alterations detailed in the bioconductor tutorial (here). This post (here) was a great help in figuring this out.

Forcing the df to be a data.frame within the equation has fixed all of the errors.

EnhancedVolcano(data.frame(df), lab = rownames(df), x = 'log2FC', y = 'pvalue', xlim = c(-1.5, 1.5), ylim = c(0, max(-log10(df[,'pvalue']))), title = 'Your title here' )

ADD COMMENTlink written 11 days ago by sauuyer10

Okay, great. If your original data was in a tibble format, that will be supported in the next release of the package.

ADD REPLYlink written 11 days ago by Kevin Blighe200
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 189 users visited in the last hour