# Download the data from github (click the "raw" button, save as a text file called "results.txt"). | |
# https://gist.github.com/stephenturner/806e31fce55a8b7175af | |
res <- read.table("results.txt", header=TRUE) | |
head(res) | |
# Make a basic volcano plot | |
with(res, plot(log2FoldChange, -log10(pvalue), pch=20, main="Volcano plot", xlim=c(-2.5,2))) | |
# Add colored points: red if padj<0.05, orange of log2FC>1, green if both) | |
with(subset(res, padj<.05 ), points(log2FoldChange, -log10(pvalue), pch=20, col="red")) | |
with(subset(res, abs(log2FoldChange)>1), points(log2FoldChange, -log10(pvalue), pch=20, col="orange")) | |
with(subset(res, padj<.05 & abs(log2FoldChange)>1), points(log2FoldChange, -log10(pvalue), pch=20, col="green")) | |
# Label points with the textxy function from the calibrate plot | |
library(calibrate) | |
with(subset(res, padj<.05 & abs(log2FoldChange)>1), textxy(log2FoldChange, -log10(pvalue), labs=Gene, cex=.8)) |
go to the git hub using this link https://gist.github.com/stephenturner/806e31fce55a8b7175af
download the Results file, it will be a Text File.
open Excel and then open the results file within excel and save it as .CSV format. its important to know where u have saved the file, which
means u should know the path. for example if you save it in desktop
then use this command
res <- read.csv(File = "C:\Users\name\Desktop\Results.csv", Header = T, Sep",")
head(res)
it should work!
Hello! I have a problem in highlighting the significant genes. When I am using your data set, everything goes fine. But when I am trying with my data set I color the whole volcano plot red/orange. I have named everything exactly as here but still doesn't work. I checked my data set and it does contain genes with p.adj.values<.05. Do you have any idea why is this happening?
Btw we have tried with both csv and txt files, with two different computers, two different people but always the same annoying result!
Thanks
When labeling points, is there a way to keep the labels from overlapping?
when I install your package and I try to get the exact file, I get the following error
res <- read.gist("806e31fce55a8b7175af", header=TRUE)
Error: could not find function "read.gist"