由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Biology版 - 如何做microarray的scatter plot图?
相关主题
Microarray数据中log2 fold change什么意思?推荐一个R package for gene-set/pathway analysis (转载)
急求助,懂microarray的人看过来RNA-seq 表达量问题
请教这个图是用什么软件做出来的?Python training available (2-hour online interactive class
请问有没有做BIOINFO的,如何做LOWESS normalization 也谈为什麽要学习Python
新手求教大牛们一个动物实验的数据统计问题只会用现成的工具可以转bioinformatics了吗
求助!flow cytometry怎么做publication的scatter plot?Re: 搞DNA microarray的老兄
Re: Question of microarray:gene expressionMy opinion - Re: DNA microarry bioinformatics?
真心请教: 关于real time PCR的几个问题Good stuff, not too late
相关话题的讨论汇总
话题: plot话题: contour话题: scatter话题: microarray话题: make
进入Biology版参与讨论
1 (共1页)
l******e
发帖数: 125
1
想比较两样品表达谱的相似性,如何作出x-y轴散点图,>log2的红色,<-log2的蓝色,
中间的灰色。对matlab不懂,stanford 的SAM怎么用不了?
多谢!
l******e
发帖数: 125
2
R是不是也可以做到?有高人贴个程序或者样本么,多谢
l**********1
发帖数: 5204
3
pls refer
> posted on FRIDAY, JULY 6, 2012
Fix Overplotting with Colored Contour Lines
I saw this plot in the supplement of a recent paper comparing microarray
results to RNA-seq results. Nothing earth-shattering in the paper - you've
probably seen a similar comparison many times before - but I liked how they
solved the overplotting problem using heat-colored contour lines to indicate
density. I asked how to reproduce this figure using R on Stack Exchange,
and my question was quickly answered by Christophe Lalanne.
Here's the R code to generate the data and all the figures here.
# Generate some data
library(MASS)
set.seed(101)
n <- 50000
X <- mvrnorm(n, mu=c(.5,2.5), Sigma=matrix(c(1,.6,.6,1), ncol=2))
# A color palette from blue to yellow to red
library(RColorBrewer)
k <- 11
my.cols <- rev(brewer.pal(k, "RdYlBu"))
## compute 2D kernel density, see MASS book, pp. 130-131
z <- kde2d(X[,1], X[,2], n=50)
# Make the base plot
plot(X, xlab="X label", ylab="Y label", pch=19, cex=.4)
# Draw the colored contour lines
contour(z, drawlabels=FALSE, nlevels=k, col=my.cols, add=TRUE, lwd=2)
# Add lines for the mean of X and Y
abline(h=mean(X[,2]), v=mean(X[,1]), col="gray", lwd=1.5)
# Add the correlation coefficient to the top left corner
legend("topleft", paste("R=", round(cor(X)[1,2],3)), bty="n")
## Other methods to fix overplotting
# Make points smaller - use a single pixel as the plotting charachter
plot(X, pch=".")
# Hexbinning
library(hexbin)
plot(hexbin(X[,1], X[,2]))
# Make points semi-transparent
library(ggplot2)
qplot(X[,1], X[,2], alpha=I(.1))
# The smoothScatter function (graphics package)
smoothScatter(X)
*****
cited
from
http://gettinggeneticsdone.blogspot.co.uk/2012/07/fix-overplott
ps: original hint was from one former mitbbs post
同主题阅读:R: how to convert a scatter plot to a contour color plot?
[版面:统计][首篇作者:StatsGuy] , 2011年03月31日15:17
http://www.mitbbs.com/article_t/Statistics/31271563.html

【在 l******e 的大作中提到】
: R是不是也可以做到?有高人贴个程序或者样本么,多谢
1 (共1页)
进入Biology版参与讨论
相关主题
Good stuff, not too late新手求教大牛们一个动物实验的数据统计问题
Re: Also microarray questions求助!flow cytometry怎么做publication的scatter plot?
P value !!Re: Also microarray questionsRe: Question of microarray:gene expression
[合集] 非affy的芯片如何用R进行annotation?真心请教: 关于real time PCR的几个问题
Microarray数据中log2 fold change什么意思?推荐一个R package for gene-set/pathway analysis (转载)
急求助,懂microarray的人看过来RNA-seq 表达量问题
请教这个图是用什么软件做出来的?Python training available (2-hour online interactive class
请问有没有做BIOINFO的,如何做LOWESS normalization 也谈为什麽要学习Python
相关话题的讨论汇总
话题: plot话题: contour话题: scatter话题: microarray话题: make