Category Archives: Linux

install 454 GS Data Analysis Software on ubuntu

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.

The second error message popping up says: "Error: Could not execute command: type rocks 2>&1", and I used the command, sudo ln -s /bin/true /bin/rocks, to solve it.

The third error is lack of libraries zlib.i386, libXi.i386, libXtst.i386, and libXaw.i386.
Since my OS is 64bit ubuntu 14.04 LTS, I used, sudo apt-get install ia32-libs, to install all the 32bit compatible libraries.

The fourth error is weird for it can't found /bin/sh which is available for all unix-like systems. Since debian links sh to dash, while most of the Linux distributions links to bash, I changed the link to bash but the error still exists.

I can't figure out how to solve the fourth error and tried to install the rpm packages by using rpm -ivh command but the error doesn't change.
Read more »

再不相信预编译的R

去年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。
Read more »

use linux desktop again

上个月写了《使用ggplot画图》一文,图片太多,一下子把博客的12G流量给用光了,月中博客就被停了,小伙伴们太给力了,blog不能访问,真是件不爽的事情。

言归正传,从2002年使用redhat 7.1开始,就没中止过使用linux,为什么要说again呢,因为在过去几年的工作时间里,使用的是OS X和win7做为桌面的,linux只在服务器端使用。自从用了OS X之后,就不想再用linux当桌面了,OS X绝对是节省生命的系统,本身是unix-like系统,对各种桌面软件支持又好,特别是中华大地,linux还是小众,用来当桌面实在是各种坑。

不过现在又回到学生时代了,所以还得继续学生屌丝的折腾,本科时从redhat,debian到gentoo,硕士时实验室的机器用ubuntu,而笔记本用NetBSD。这么多年的使用,该有的坑都填了,但是时代在发展,新坑还是不断有的,使用百度云来同步化文献库,就是最近的新坑,装上linux之后,发现度娘没有客户端,首先想到的当然是wine,wine出来的偶尔能行,时常崩溃,跟它死磕我也会崩溃,github上寻找开源实现,各种功能缺失和限制,那就只能虚拟机了,把home目录做为共享盘,挂到虚拟机中,但是度娘一直都是占100% CPU,然后数据无法同步,只有两个原因,不是硬盘就是网络,感觉好像我一个分区800G太大了,但在虚拟中对硬盘读写正常,网络因为使用NAT,虚拟成内网,有可能是这个原因,于是换成bridge,把虚拟机当成现实网络中的另一台主机,但度娘依然只占CPU,不干活。那只能还是硬盘问题,最后问题解决了,通过在linux中提供samba服务,然后在虚拟机中通过网上邻居把共享目录映射成网络驱动器,这时候度娘终于肯干活了。都不知道是virtualbox的驱动有问题,还是度娘太挑,这太TM坑了。
Read more »

m4s0n501

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.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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.8 MB of additional disk space will be used.
Get:1 http://ftp.hk.debian.org/debian/ wheezy/main ncbi-blast+ amd64 2.2.26-3 [11.2 MB]
Fetched 11.2 MB in 1min 16s (146 kB/s)
Selecting previously unselected package ncbi-blast+.
(Reading database ... 252681 files and directories currently installed.)
Unpacking ncbi-blast+ (from .../ncbi-blast+_2.2.26-3_amd64.deb) ...
Processing triggers for man-db ...
Setting up ncbi-blast+ (2.2.26-3) ...

Before the program can be used for sequence alignment, we should prepare the db files:

1
2
3
4
5
6
7
8
9
root@jz:/ssd/genomes/blast/db# makeblastdb -in ../../hg19.fa -out hg19 -dbtype nucl
Building a new DB, current time: 11/21/2013 16:03:05
New DB name:   hg19
New DB title:  ../../hg19.fa
Sequence type: Nucleotide
Keep Linkouts: T
Keep MBits: T
Maximum file size: 1073741824B
Adding sequences from FASTA; added 25 sequences in 27.7084 seconds.

That's it. Now blast is supported in the lab server.
Read more »

migrate from tetex to texlive

CentOS升级R到2.14之后,编译vignettes时便报错了,原因是少了latex的inconsolata.sty,这是文档中代码要需要用到的字体。google不出解决方案,基本上都是说不关R的事,要装latex包。

CentOS的repos里没有这个包,latex的东西以前折腾过,搞起来太麻烦。

现在一般用整合的latex环境,比如MiKTeXTeX LiveCentOS的repos里都没有,有的只有tetex,这个很难搞的家伙。

于是yum remove tetex,删掉tetex,再自己安装TeX Live
装完之后,编译安装R,./configure时报出warning,不支持latex。

通过修改PATH,搞掂。

PATH=/usr/local/texlive/2011/bin/i386-linux:$PATH