Usually Roche’s installer is a catastrophe, they only provides rpm packages of the software for 454 GS FLX (version 2.9). Although the package contains setup.sh, the script is useless since it is actually a binary payload. I run the setup.sh, and it throw error of not finding /sbin/lspci. In debian derived distribution, lspci command is located in /bin folder. This issue is easy to solve by adding a soft link to /sbin/lspci.

Continue reading

去年ubuntu下apt-get了R-3.0.2, 用了没多久就发现了system命令有问题,通常情况下调用系统命令是正常的,但是我调用bowtie的时候,就会报错: Warning: Could not open read file "/tmp/8156.inpipe1" for reading; skipping... Error: Encountered internal Bowtie 2 exception (#1) Command: /usr/bin/bowtie2-align --wrapper basic-0 -p 12 -x /ssd/genomes/hg19 -S tmp.sam -1 /tmp/8156.inpipe1 -2 /tmp/8156.inpipe2 这很明显是因为fasta.gz文件,bowtie需要调用zcat来读的,在R里调用bowtie就找不到好基友zcat的输出管道。当时没在意,R不干,那就找shell。 去年用NMF包的时候,报出了人类不友好的错误,联系了包作者Gaujoux,在作者的帮助下,找到了是doParallel包的问题: > library(doParallel) > Loading required package: foreach foreach: simple, scalable parallel programming from Revolution Analytics Use Revolution R for scalability, fault tolerance and more. http://www.revolutionanalytics.com Loading required package: iterators Loading required package: parallel > registerDoParallel(11) > > foreach(i = 1:10) %dopar% { getwd() } > *** caught segfault *** address 0x7fbeb6d399d0, cause 'memory not mapped' 其实parallel包中用mclapply也是同样报错。于是又把维护deb包的Dirk拉进来,Dirk是Rcpp的作者,高人就是不一样,看了错误,立刻就指出是BLAS库的问题。

Continue reading

从2007年写了第一篇文章之后,我发现管理文献真不是人干的,一直以来使用Zotero来管理文献,自从有了dropbox之后,就想把文献库放在dropbox上,一来有个云备份,不怕硬盘坏,二来嘛,实验室电脑和个人电脑可以实时同步化,无奈dropbox空间太小,而我的zotero早已超过10G,因为电子书也放在里面,只能做罢。

度娘出手还是很大方的,我现在的网盘已经有3T,包括之前在推广阶段用1元买的1T。

Continue reading

local blast

I was asked to set up a local blast for the lab. Blast can be installed directly using apt in debian and it turns out to be easy. root@jz:/ssd/genomes# apt-get install ncbi-blast+ Reading package lists... Done Building dependency tree Reading state information... Done The following NEW packages will be installed: ncbi-blast+ 0 upgraded, 1 newly installed, 0 to remove and 26 not upgraded. Need to get 11.2 MB of archives. After this operation, 32.

Continue reading

Emacs is a great front-end for most of the command line tools. Although R-Studio is pretty good, I think Emacs/ESS is better. I’ve always used Emacs/ESS to run R, since 2007 on Ubuntu, Windows, and my MacBook Pro. It gives me the same experiences across all platforms. I love the way Emacs formatting source codes, and literate programming with Roxygen supported. Unfortunately, ESS does not suport displaying plots in Emacs buffer, which has been supported by imaxima.

Continue reading

TIFF (Tagged Image File Format)拥有更宽的线性动态范围,所以在专业的图片处理上,一直是一个通用的文件格式。 最近一篇发表在Metallomics的文章,我本来做的图片都是PDF格式,矢量图最好了,文件特别小,还可以任意放大。不过杂志社要求600DPI的TIFF或EPS。 我第一反应是拒绝使用TIFF,600DPI的TIFF文件肯定非常大,EPS也是矢量图,我用R重新把图画一遍,存为EPS就OK了。画图的过程,我发现对EPS的支持不太好,老报些某字体不存在的错误。这当然不是什么大不了的事,自己指定字体就好了。问题在于有张图是拼的,我只能借助于软件转换,我用Inkscape处理,导出EPS,出来的图我发现有些细节并不太好。 无奈之下还是用TIFF吧,Fig1和3都是R画的,直接指定分辨率和压缩算法,存为TIFF文件。Fig1是3000x3000pixel 600dpi的图,只有320k,Fig3是4200x4200pixel的图,也是600dpi,只有558k,用R产生TIFF还是非常靠谱的。 关键是Fig2,这一张拼的图,存成PDF矢量图,需要用ImageMagick转换成600DPI的TIFF图片,ImageMagick需要安装Xcode才能在Mac下编译成功。 Yus-Mac-Pro:others ygc$ convert -density 600 fig2.pdf fig2.tif Yus-Mac-Pro:others ygc$ identify -verbose fig2.tif Image: fig2.tif Format: TIFF (Tagged Image File Format) Class: DirectClass Geometry: 6000x4500+0+0 Resolution: 600x600 Print size: 10x7.5 Units: Undefined Type: PaletteMatte Base type: TrueColor Endianess: MSB ... Yus-Mac-Pro:others ygc$ convert -density 600 -compress lzw fig2.pdf fig2_compress.tif Yus-Mac-Pro:others ygc$ ls -l fig2*.tif -rw-r--r-- 1 ygc admin 216036263 May 23 17:53 fig2.

Continue reading

Author's picture

Guangchuang Yu

Bioinformatics Professor @ SMU

Bioinformatics Professor

Guangzhou