More than 5 years have passed since last update.
はじめに
MA plotは、x軸のAが平均、y軸のMが差。
MA plot - Wikipedia, the free encyclopedia
やってみた
EdgeRの出力結果の表を想定しています(遺伝子ごとに、a.value, m.value, estimatedDEGが記録されている)。
estimatedDEGは、1ならば発現変動遺伝子(DEG)を表します。下の例では、DEGの点だけを赤くします。
MAplot
g<-ggplot(res,aes(x=a.value,y=m.value,colour=factor(estimatedDEG)))+geom_point(size=1)+scale_colour_manual(values=c("black","red"))+scale_fill_manual(values=c("black","red"),breaks=c("0","1"),labels=c("non DEG","DEG"))+theme(legend.title=element_blank())+ggtitle(paste0(conditions[1]," vs ",conditions[coef]))print(g)さらに、DEGが何個あったかをプロットに追加します。
MAplot
g<-g+annotate("text",x=rep(max(res$a.value)*0.8,2),y=c(0.8,0.9)*min(res$m.value),label=c(label1,label2))print(g)Register as a new user and use Qiita more conveniently
- You get articles that match your needs
- You can efficiently read back useful information
- You can use dark theme
