require(ggplot2)
png("")
##Highlight genes that have an absolute fold change > 2 and a p-value < Bonferroni cut-off
a <- read.table("",header=TRUE,sep="\t",)
P.Value <- c(a$P.Value)
FC <- c(a$FC)
df <- data.frame(P.Value, FC)
df$threshold = as.factor(abs(df$FC) > 1 & df$P.Value < 0.05)
##Construct the plot object
g = ggplot(data=df, aes(x=FC, y=-log10(P.Value), colour=threshold)) +
geom_point(alpha=0.4, size=1.75) +
opts(legend.position = "none") +
xlim(c(-5, 5)) + ylim(c(0, 5)) +
xlab("log2 fold change") + ylab("-log10 p-value")
g
dev.off()
png("")
##Highlight genes that have an absolute fold change > 2 and a p-value < Bonferroni cut-off
a <- read.table("",header=TRUE,sep="\t",)
P.Value <- c(a$P.Value)
FC <- c(a$FC)
df <- data.frame(P.Value, FC)
df$threshold = as.factor(abs(df$FC) > 1 & df$P.Value < 0.05)
##Construct the plot object
g = ggplot(data=df, aes(x=FC, y=-log10(P.Value), colour=threshold)) +
geom_point(alpha=0.4, size=1.75) +
opts(legend.position = "none") +
xlim(c(-5, 5)) + ylim(c(0, 5)) +
xlab("log2 fold change") + ylab("-log10 p-value")
g
dev.off()