I am trying to use EnhancedVolcano in R to plot the results from my rna-seq analysis. However, when I want to use
selectLab to label some genes that I want, I only got a weird number labeled on the final plot rather than the gene name...
Here is my code,
raw_data <- read.csv('Directory to raw data .csv file') mydata <- data.frame(gene = raw_data$gene_name, log2_fold_change = raw_data$log2FoldChange, adj_p = raw_data$padj) EnhancedVolcano(mydata, lab = mydata$gene, x = "log2_fold_change", y = "adj_p", xlim = c(-6,6), ylim = c(0,20), pointSize = 1, selectLab = c('NOX4'))
Here is the what it looks like in the final plot: https://drive.google.com/file/d/17Txw4QEIo1KSgZHJsa-Mn8OLO7ZZ4-Gp/view?usp=sharing
Here is a snippet of the head in my data file: https://drive.google.com/file/d/1yE9ffhmNg98X6wZmOVQZayEVLPKb6i0B/view?usp=sharing.
grepl("NOX4", mydata$gene), and it returned
TRUE on the "NOX4" index and
My code gives me correct results without using the
Any comments would be helpful.
Thanks in advance,