Entering edit mode
3.3 years ago
michelle.piquet ▴ 60
I'm trying to make a volcano plot with the differential expression file generated from cellranger for single cell analysis.
I uploaded the file into RStudio and ran the following code...
EnhancedVolcano(res, lab = rownames(results), x = 'Log2foldchange', y = 'pvalue', xlim = c(-8,8), title = 'Macrophage', pCutoff = 10e-16, FCcutoff = 1.5, pointSize = 3.0, labSize = 3.0)
and received the following error...
Error in EnhancedVolcano(x, lab = rownames(x), x = "Log2foldchange", y = "pvalue", : Log2foldchange is not numeric!
I then ran:
is.numeric(results$gene.Log2foldchange.pvalue) and got TRUE.
Any guidance as to what to do?
colnames(res)? Probably your colnames do not match what you've given as
colnames(results)  "gene.Log2foldchange.pvalue"
Provide example data or paste the output of
So where are the
I started again from the beginning.
I loaded my data with:
Then tried the volcano plot code and I'm still getting the same error.
Please check your column names:
vs how you supplying to the function:
Indeed, for your data, this should work:
Thanks to everyone who has been providing feedback here...
Why are you checking with
is.numeric(res$gene.Log2foldchange.pvalue)? Instead, you should be checking
It is indeed
FALSE, how do I change it?
It is also FALSE when then column does not exist. Are you sure your columns that store p and FC are named
Yes, they are stored the way they are named.
res$Log2foldchange <- as.numeric(res$Log2foldchange)
I did and ran the same code as before and get the same error.
I upload a new data set and and now I get
TRUEstill get the same error.
Are you sure the table is in "x" ??
Because earlier you stored it in res!!
It should be
Check the x and y names if they are matching to the res table!!
I ran this code and it works but doesn't show the gene names.
That is because the rownames of your data-frame, called
gene_list, are not set. I can see this via the output of
Also, if you type
rownames(gene_list)and press return / enter, you will not see any gene names.
You need to use:
Why have you included the
aes()function, by the way? - that will not do anything.
Can you please go through the entire vignette for EnhancedVolcano so that you can begin to understand how to use the package. I developed the package and wrote the vignette myself: http://bioconductor.org/packages/release/bioc/vignettes/EnhancedVolcano/inst/doc/EnhancedVolcano.html