> library(ggplot2)
Loading required package: proto
Loading required package: grid
Loading required package: reshape
Loading required package: plyr
Loading required package: digest
> sample.data <- matrix(rnorm(500), 50, 10)
> sample.data <- as.data.frame(sample.data)
> sample.data <- cbind(paste("g", 1:50, sep=""), sample.data)
> colnames(sample.data) <- c("GeneName", paste("t", 1:10, sep=""))
> head(sample.data)
GeneName t1 t2 t3 t4 t5 t6
1 g1 0.6506507 2.2511342 -0.3816986 0.3280272 0.4610605 1.5809543
2 g2 -0.6905213 0.3381060 -0.7077111 1.4078910 0.2933683 -0.1066459
3 g3 0.3541356 0.4541696 -1.6335950 0.4263433 -0.5189055 0.5252583
4 g4 -0.7536498 -0.6576679 -1.2011061 0.2127903 -0.2037233 -0.6236748
5 g5 0.1589113 0.4053087 -1.1849440 -0.2635171 2.0520325 -0.2831023
6 g6 0.4785667 0.2277287 -0.5114406 0.3719895 0.7284306 0.1884368
t7 t8 t9 t10
1 -1.3000891 0.5892476 1.590302760 -0.3231108
2 2.0824780 0.9929615 -0.133183908 0.8461574
3 0.5556600 -1.2984789 0.000519446 0.3543165
4 1.5932854 0.3699189 0.972156471 -0.5041644
5 0.7586054 1.3547863 1.778556359 1.3227048
6 -0.1165529 1.2721110 1.082750129 -0.9139294
> sample.data <- melt(sample.data)
Using GeneName as id variables
> head(sample.data)
GeneName variable value
1 g1 t1 0.6506507
2 g2 t1 -0.6905213
3 g3 t1 0.3541356
4 g4 t1 -0.7536498
5 g5 t1 0.1589113
6 g6 t1 0.4785667
> p <- ggplot(sample.data, aes(variable, GeneName))
> p <- p + geom_tile(aes(fill = value),
+ colour = "white") + scale_fill_gradient(low="white", high="steelblue")
> p
> library(Cairo)
> CairoPNG("d:/heatmap0206.png", 800,800)
> p
> dev.off()
windows
2
把variable和GeneName分别作为x轴和y轴,然后按着value的值去填充颜色。

February 6th, 2010 in
Computer Science | tags:
plot,
R |
40 views |
No Comments
制作U盘版的启动盘,用于系统维护,虽然现在基本上不干这样的事,但还是弄一个,备用。
Linux用Sysresccd,这个版本是专门做livecd用于系统维护的,基于gentoo开发,我喜欢gentoo,所以选它-,-
还有一个好处是,可以选择启动32bit还是64bit的内核。这个很重要,因为做系统维护的话,通常是需要chroot到硬盘上的系统的。32bit是不能chroot到64bit的系统的,反之亦然。
Sysresccd可以从http://sourceforge.net/projects/systemrescuecd/下载到。
虽然是致力于做livecd,但也可以制作usb启动盘。几乎所有的livecd都能做为安装盘,当然这个也不例外。通过这个装gentoo,也算是省时省力的一件事。
制作过程可参考:http://www.sysresccd.org/Sysresccd-manual-en_How_to_install_SystemRescueCd_on_an_USB-stick
我在windows下制作这个:
先把U盘格式化成fat32格式
装载iso,拷文件到U盘里
重命名isolinux文件夹下的isolinux.cfg到syslinux.cfg
重命名isolinux文件夹到syslinux
在装载的光盘目录下,bootprog/syslinux-3.84.zip里有一个syslinux.exe,解压到硬盘。
运行cmd
syslinux -ma X:
#记得更改盘符-,-
#两个参数,m代表写入mbr,a代表分区设为active。
WinPE使用‘龙行天下U盘启动维护系统贺岁版’可从http://bbs.winpeedu.com/thread-1701-1-1.html下载。
解压后,打开lxtx_UBOOT_2009.5.18贺岁版\setup,运行“GRUBGUI.EXE”,选择相应的磁盘,选择“优先引导原来的MBR”,开始安装,然后将boot文件夹和szlos文件复制到U盘的根目录就可以了。
现在winpe的启动盘几乎都清一色用grub去引导,我本来还在想得去修改它的配置,让它去引导linux,没想到安装时,竟然有“优先引导原来的MBR”这个选项。试了一下,果然没问题,启动的时候,按空格进入grub,引导winpe启动盘,还有一些dos工具之类的。按其它键,则进入linux。总共才400多M,我的U盘有8G,再放一张xp的ghost镜像。这启动盘就perfect了。
Linux还带有X,默认不启动。StartX能出来。用的是XFCE。硬件都能检测出来。
% uname -a
Linux sysresccd 2.6.31.09-std134-amd64 #1 SMP Fri Dec 18 23:57:11 UTC 2009 x86_64 Intel(R) Core(TM)2 Quad CPU Q9400 @ 2.66GHz GenuineIntel GNU/Linux
% lspci
00:00.0 Host bridge: Intel Corporation 4 Series Chipset DRAM Controller (rev 03)
00:01.0 PCI bridge: Intel Corporation 4 Series Chipset PCI Express Root Port (rev 03)
00:19.0 Ethernet controller: Intel Corporation 82567LM-3 Gigabit Network Connection (rev 02)
00:1a.0 USB Controller: Intel Corporation 82801JD/DO (ICH10 Family) USB UHCI Controller #4 (rev 02)
00:1a.1 USB Controller: Intel Corporation 82801JD/DO (ICH10 Family) USB UHCI Controller #5 (rev 02)
00:1a.2 USB Controller: Intel Corporation 82801JD/DO (ICH10 Family) USB UHCI Controller #6 (rev 02)
00:1a.7 USB Controller: Intel Corporation 82801JD/DO (ICH10 Family) USB2 EHCI Controller #2 (rev 02)
00:1b.0 Audio device: Intel Corporation 82801JD/DO (ICH10 Family) HD Audio Controller (rev 02)
00:1c.0 PCI bridge: Intel Corporation 82801JD/DO (ICH10 Family) PCI Express Port 1 (rev 02)
00:1c.1 PCI bridge: Intel Corporation 82801JD/DO (ICH10 Family) PCI Express Port 2 (rev 02)
00:1d.0 USB Controller: Intel Corporation 82801JD/DO (ICH10 Family) USB UHCI Controller #1 (rev 02)
00:1d.1 USB Controller: Intel Corporation 82801JD/DO (ICH10 Family) USB UHCI Controller #2 (rev 02)
00:1d.2 USB Controller: Intel Corporation 82801JD/DO (ICH10 Family) USB UHCI Controller #3 (rev 02)
00:1d.7 USB Controller: Intel Corporation 82801JD/DO (ICH10 Family) USB2 EHCI Controller #1 (rev 02)
00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev a2)
00:1f.0 ISA bridge: Intel Corporation 82801JDO (ICH10DO) LPC Interface Controller (rev 02)
00:1f.2 IDE interface: Intel Corporation 82801JD/DO (ICH10 Family) 4-port SATA IDE Controller (rev 02)
00:1f.3 SMBus: Intel Corporation 82801JD/DO (ICH10 Family) SMBus Controller (rev 02)
00:1f.5 IDE interface: Intel Corporation 82801JD/DO (ICH10 Family) 2-port SATA IDE Controller (rev 02)
01:00.0 VGA compatible controller: ATI Technologies Inc RV710 [Radeon HD 4350]
01:00.1 Audio device: ATI Technologies Inc RV710/730
January 13th, 2010 in
Computer Science | tags:
linux,
windows |
104 views |
2 Comments
December 31st, 2009 in
My Life | tags:
AHMU,
BMI,
home,
JNU,
SCAU |
128 views |
Enter your password to view comments
December 28th, 2009 in
My Life | tags:
BMI |
60 views |
Enter your password to view comments