p 值的直方图
Histogram plot for p-value
我想绘制 p 值 pv.scf
。为什么我的直方图不反映我的 4 个 p 值?
> dput(pv.scf)
c(`211124_s_at` = 0.0003175435117273, `207029_at` = 0.00882067488788698,
`216974_at` = 0.586375149259342, `226534_at` = 0.651991817084333
)
# Plot the sorted raw P-values
png("SCF_Raw_PvaluePlot.png")
par(mfrow=c(1,2))
hist(pv.scf, cex=0.9, col=c("#c1a87d", "#7ef9ff", "#97b9ce", "#1f456e"), las=2, cex.axis=0.6, xlab="Probes", ylab="P-values", main="Raw P-values for KITLG gene\n")
names(c("211124_s_at", "207029_at", "216974_at", "226534_at"))
abline(v=.01,col=2,lwd=2)
hist(-log10(pv.scf), col=c("#c1a87d", "#7ef9ff", "#97b9ce", "#1f456e"), xlab="Probes", ylab="log10(p-values)", main="-log10(P-values) for KITLG gene between\nall groups", cex.main=0.9)
names(c("211124_s_at", "207029_at", "216974_at", "226534_at"))
abline(v= -log10(.01),col=2,lwd=2)
dev.off()
听起来您确实想要条形图而不是直方图。并非所有带有条形图的图都是一样的。试试这个
par(mfrow=c(1,2))
barplot(
pv.scf,
cex=0.9,
col=c("#c1a87d", "#7ef9ff", "#97b9ce", "#1f456e"),
las=2, cex.axis=0.6,
xlab="", ylab="P-values",
main="Raw P-values for KITLG gene\n",
names =c("211124_s_at", "207029_at", "216974_at", "226534_at"))
abline(v=.01,col=2,lwd=2)
barplot(
-log10(pv.scf),
col=c("#c1a87d", "#7ef9ff", "#97b9ce", "#1f456e"),
xlab="", ylab="log10(p-values)",
main="-log10(P-values) for KITLG gene between\nall groups",
cex.main=0.9,
las=2,
names =c("211124_s_at", "207029_at", "216974_at", "226534_at"))
abline(v= -log10(.01),col=2,lwd=2)
这导致
我想绘制 p 值 pv.scf
。为什么我的直方图不反映我的 4 个 p 值?
> dput(pv.scf)
c(`211124_s_at` = 0.0003175435117273, `207029_at` = 0.00882067488788698,
`216974_at` = 0.586375149259342, `226534_at` = 0.651991817084333
)
# Plot the sorted raw P-values
png("SCF_Raw_PvaluePlot.png")
par(mfrow=c(1,2))
hist(pv.scf, cex=0.9, col=c("#c1a87d", "#7ef9ff", "#97b9ce", "#1f456e"), las=2, cex.axis=0.6, xlab="Probes", ylab="P-values", main="Raw P-values for KITLG gene\n")
names(c("211124_s_at", "207029_at", "216974_at", "226534_at"))
abline(v=.01,col=2,lwd=2)
hist(-log10(pv.scf), col=c("#c1a87d", "#7ef9ff", "#97b9ce", "#1f456e"), xlab="Probes", ylab="log10(p-values)", main="-log10(P-values) for KITLG gene between\nall groups", cex.main=0.9)
names(c("211124_s_at", "207029_at", "216974_at", "226534_at"))
abline(v= -log10(.01),col=2,lwd=2)
dev.off()
听起来您确实想要条形图而不是直方图。并非所有带有条形图的图都是一样的。试试这个
par(mfrow=c(1,2))
barplot(
pv.scf,
cex=0.9,
col=c("#c1a87d", "#7ef9ff", "#97b9ce", "#1f456e"),
las=2, cex.axis=0.6,
xlab="", ylab="P-values",
main="Raw P-values for KITLG gene\n",
names =c("211124_s_at", "207029_at", "216974_at", "226534_at"))
abline(v=.01,col=2,lwd=2)
barplot(
-log10(pv.scf),
col=c("#c1a87d", "#7ef9ff", "#97b9ce", "#1f456e"),
xlab="", ylab="log10(p-values)",
main="-log10(P-values) for KITLG gene between\nall groups",
cex.main=0.9,
las=2,
names =c("211124_s_at", "207029_at", "216974_at", "226534_at"))
abline(v= -log10(.01),col=2,lwd=2)
这导致