wine的安装与microsoft office在linux上的运行

1. CentOS 64位系统上安装wine

1.1 使用yum进行安装

此方法安装的版本较低。推荐安装使用此方法进行wine的安装:安装容易;版本稳定;快捷方便。

# rpm -ivh http://mirrors.sohu.com/fedora-epel/6/i386/epel-release-6-8.noarch.rpm
# rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
# yum makecache
# yum install wine

1.2 源码包安装

可以安装最新版,建议使用普通用户安装。

# yum -y groupinstall 'Development Tools'
# yum -y install libX11-devel freetype-devel
$ wget http://citylan.dl.sourceforge.net/project/wine/Source/wine-1.7.3.tar.bz2
$ tar -xvf wine-1.7.3.tar.bz2
$ cd wine-1.7.3/

32位系统的安装:
$ ./tools/wineinstall

64位系统的安装
$ ./configure --enable-win64 --prefix=/opt/wine
$ make -j 8; make install

# yum groupinstall "X Window System" "GNOME Desktop Environment"
OR
# yum groupinstall "X Window System" "KDE (K Desktop Environment)"

2. 使用wine安装microsoft office 2007

office 2003不能打开office2007的文件,同时wine安装office2010出错,故选择安装office 2007。office 2007不区分64位和32位。应该为32位。

2.1 安装wine下中文支持

此处参考:http://www.360doc.com/content/13/0811/16/7256015_306408693.shtml

2.2 下载office2007并安装

首先,运行winecfg进行wine的配置。模拟环境windows xp, 在函数库选项卡中新增函数库顶替riched20(原装先于内建),即使用系统自带的riched20,而不是wine内置的riched20。然后使用wine安装office2007。

$ winecfg

然后,从Microsoft官网下载MSXML 3.0并安装。

$ msiexec /i msxml3.msi

最后安装office2007.

$ sudo mount -o loop cn_office_professional_plus_2007_sp3_dvd_X12-38713.iso /mnt/
$ cd /mnt
$ wine setup.exe

运行程序的方法:

$ wine /home/chenlianfu/.wine/drive_c/Program\ Files\ \(x86\)/Microsoft\ Office/Office12/WINWORD.EXE
$ wine /home/chenlianfu/.wine/drive_c/Program\ Files\ \(x86\)/Microsoft\ Office/Office12/POWERPNT.EXE
$ wine /home/chenlianfu/.wine/drive_c/Program\ Files\ \(x86\)/Microsoft\ Office/Office12/EXCEL.EXE

最后,运行PPT和EXCEL正常,但是运行word的问题是关闭word总是“遇到问题需要关闭”,这个时候,去掉复选框的勾,点击“不发送”即可。

3. yozo office

发现永中office在linux上运行很不错。

4. CrossOver

发现使用CrossOver才是王道。它是wine的商业版本。使用CrossOver能非常简单的安装并使用Office;同时也能正常使用QQ2013。不过是需要人民币,也不贵,88元永久性使用。

有关non-coding RNA的知识

1. rRNA

1.1 rRNA,即核糖体RNA,是3类RNA(tRNA,mRNA,rRNA)中相对分子质量最大,数量最多的一类RNA。它与蛋白质结合而形成核糖体,其功能是作为mRNA的支架,使mRNA分子在其上展开,实现蛋白质的合成。

1.2 原核生物和真核生物的核糖体均由大、小两种亚基组成。原核生物中,5S 和 23S rRNAs 在大亚基(large subunit)中, 16S rRNA 在小亚基(small subunit)中; 真核生物中,5S, 5.8S 和 28S rRNAs 在大亚基中,18S rRNA 在小亚基中。

1.3 原核生物中的 16S, 23S 和 5S rRNAs 通常串联在一起进行转录;真核生物中 18S, 28S 和 5.8S rRNAs 在一起形成一个转录单元,而 5S rRNA 则则为高度串联重复。

1.4 在大部分物种中,全基因组上一般有几个拷贝的 rRNA 转录单元,这些转录单元的序列差异通常很低,低于1%。最高的也只有11%。

RNAmmer的安装和使用

1. RNAmmer简介

RNAmmer是用来预测rRNA的软件。其官网页工具:RNAmmer 1.2 Server

参考文献:Lagesen K, Hallin P, Rødland E A, et al. RNAmmer: consistent and rapid annotation of ribosomal RNA genes[J]. Nucleic acids research, 2007, 35(9): 3100-3108.

RNAmmer的正常运行需要:1. perl的Getopt::Long和XML::Simple模块; 2. hmmsearch,需要安装hmmer-2.2g版本,使用最新版本会出错。

2. RNAmmer的安装和运行

下载并安装hmmer-2.2g
$ wget ftp://selab.janelia.org/pub/software/hmmer/2.2g/hmmer-2.2g.tar.gz
$ tar zxf hmmer-2.2g.tar.gz
$ cd hmmer-2.2g
$ ./configure --prefix=/opt/biosoft/hmmer-2.2g
$ mkdir -p /opt/biosoft/hmmer-2.2g/man/man1/ /opt/biosoft/hmmer-2.2g/bin
$ make; make install

安装RNAmmer,该软件需要使用edu邮箱去申请。
$ mkdir -p /opt/biosoft/rnammer-1.2
$ tar zxf rnammer-1.2.src.tar.Z -C /opt/biosoft/rnammer-1.2
$ perl -p -i -e 's/(my \$INSTALL_PATH).*/$1 = \"\/opt\/biosoft\/rnammer-1.2\";/' /opt/biosoft/rnammer-1.2/rnammer
$ perl -p -i -e 's/^(\s+\$HMMSEARCH_BINARY).*/$1 = \"\/opt\/biosoft\/hmmer-2.2g\/bin\/hmmsearch\";/' /opt/biosoft/rnammer-1.2/rnammer

检测是否正常运行
$ /opt/biosoft/rnammer-1.2/rnammer -S bac -multi -f rRNA.fasta\
 -h rRNA.hmmreport -xml rRNA.xml -gff rRNA.gff2\
 /opt/biosoft/rnammer-1.2/example/ecoli.fsa

3. RNAmmer的运行与参数

运行/opt/biosoft/rnammer-1.2/rnammer命令,参考manual文件/opt/biosoft/rnammer-1.2/man/rnammer.1, 该程序的运行参数如下:

USAGE:
$ rnammer [options] sequence.fasta

-S  指定输入序列的物种所属的界: arc bac 或 euk

-gff  生成的gff文件结果

-m  所需要预测的moleculers: 'tsu' for 5/8s rRNA, 'ssu' for 16/18s rRNA, 'lsu' for 23/28s rRNA。如果全部进行预测,则该参数后为 'tsu,ssu,lsu'。

-multi  并行运算,预测正反两条链上所有的moleculers。最多并行运行6个计算。使用该参数,则不需要上一个参数。

-f  生成的rRNA的fasta结果文件

-h  生成的hmm报告结果

-gff  生成的rRNA的gff2文件

-x  生成的xml结果文件

对真核生物基因组进行rRNA预测的一个示例命令:

$ /opt/biosoft/rnammer-1.2/rnammer -S euk -multi -f rRNA.fasta\
 -h rRNA.hmmreport -xml rRNA.xml -gff rRNA.gff2 genome.fasta

4. RNAmmer的结果

rRNA.fasta,rRNA.gff2,rRNA.hmmreport,rRNA.xml。

CentOS 6 64位系统安装BCM4312无线网卡驱动

1. 下载64位的BCM4312无线网卡驱动

# mkdir /root/wl/
# cd /root/wl
# wget ftp://ftp.debian.hu/pub/linux/distributions/frugalware/frugalware-testing/source/network-extra/bcmwl/hybrid-portsrc_x86_64-v5_100_82_112.tar.gz
# tar zxf hybrid-portsrc_x86_64-v5_100_82_112.tar.gz

2. 安装驱动

# ln -s /usr/src/kernels/2.6.32-358.23.2.el6.x86_64/ build
# make API=WEXT
# make install
# cp wl.ko /lib/modules/2.6.32-358.23.2.el6.x86_64/kernel/net/wireless/

3. 移除可能冲突的其它BROADCOM无线网卡驱动

# lsmod  | grep "b43\|ssb\|bcma\|wl"
# rmmod b43
# rmmod ssb
# rmmod bcma
# rmmod wl
# lsmod  | grep "b43\|ssb\|bcma\|wl"

# echo "blacklist ssb" >> /etc/modprobe.d/blacklist.conf
# echo "blacklist bcma" >> /etc/modprobe.d/blacklist.conf
# echo "blacklist b43" >> /etc/modprobe.d/blacklist.conf

4. 载入新驱动并添加开机启动

# modprobe lib80211
# imsmod wl.ko
# depmod -a
# echo "modeprobe wl" >> /etc/rc.local

使用Trimmonmatic进行NGS reads的过滤与修剪

1. Trimmomatic

Trimmomatic使用JAVA运行,速度快。同时该软件进行reads QC的原理非常好。因此,最推荐使用此软件进行NGS reads的QC。
参考文献:Lohse M, Bolger AM, Nagel A, Fernie AR, Lunn JE, Stitt M, Usadel B. RobiNA: a user-friendly, integrated software solution for RNA-Seq-based transcriptomics. Nucleic Acids Res. 2012 Jul;40(Web Server issue):W622-7.

2. 常用例子

java -jar /opt/biosoft/Trimmomatic-0.30/trimmomatic-0.30.jar PE \
-threads 20 -phred33 reads1.fastq reads2.fastq \
reads1.clean.fastq reads1.unpaired.fastq reads2.clean.fastq reads2.unpaired.fastq \
ILLUMINACLIP:/opt/biosoft/Trimmomatic-0.30/adapters/TruSeq3-PE.fa:2:30:10 \
LEADING:3 TRAILING:3 SLIDINGWINDOW:4:15 MINLEN:50

3. 使用参数

有关该软件的详细使用方法,见: Trimmomatic: A flexible read trimming tool for Illumina NGS data

PE/SE
    设定对Paired-End或Single-End的reads进行处理,其输入和输出参数稍有不一样。
-threads
    设置多线程运行数
-phred33
    设置碱基的质量格式,可选pred64
ILLUMINACLIP:TruSeq3-PE.fa:2:30:10
    切除adapter序列。参数后面分别接adapter序列的fasta文件:允许的最大mismatch
数:palindrome模式下匹配碱基数阈值:simple模式下的匹配碱基数阈值。
LEADING:3
    切除首端碱基质量小于3的碱基
TRAILING:3
    切除尾端碱基质量小于3的碱基
SLIDINGWINDOW:4:15
    从5'端开始进行滑动,当滑动位点周围一段序列(window)的平均碱基低于阈值,则从该处进行切除。Windows的size是4个碱基,其平均碱基
质量小于15,则切除。
MINLEN:50
    最小的reads长度
CROP:<length>
    保留reads到指定的长度
HEADCROP:<length>
    在reads的首端切除指定的长度
TOPHRED33
    将碱基质量转换为pred33格式
TOPHRED64
    将碱基质量转换为pred64格式

wordpress的域名转移

今天将wordpress转到新的域名下: www.chenlianfu.com。同时服务器也换了一台。我的方法很简单:

1. 数据转移

由于更换了服务器,直接将wordpress相关的数据库文件打包,copy到新的服务器上。同时下载新的wordpress版本,解压到指定位置。

在旧的服务器上打包wordpress数据库文件:
# cd /home/mysql
# tar zcf wordpress.tar.gz wordpress/

在新的服务器上释放数据:
# cd /home/mysql
# tar zxf wordpress.tar.gz
# chown -R mysql:mysql wordpress/

下载最新的wordpress,或将旧服务器上的wordpress文件夹copy过来:
# cd /home
# wget http://211.69.141.2/files/4044000000134017/cn.wordpress.org/wordpress-3.6.1-zh_CN.zip
# unzip wordpress-3.6.1-zh_CN.zip
# mv wordpress chenlianfu_blog
# chown -R apache:chenlianfu chenlianfu_blog

2. 修改apache配置文件

编辑/etc/httpd/conf/httpd.conf文件,内容如下:

NameVirtualHost *:80
<VirtualHost *:80>
        DocumentRoot /home/chenlianfu_blog
        ServerName www.chenlianfu.com
</VirtualHost>
<Directory "/home/chenlianfu_blog">
        Options FollowSymLinks
        AllowOverride None
        Order allow,deny
        Allow from all
</Directory>

重启apache:

# /etc/init.d/httpd restart

3. 修改wordpress对应的mysql数据库文件

# mysql -u *** -p
mysql> use wordpress;
mysql> UPDATE chenlianfu_options SET option_value='http://www.chenlianfu.com' where option_name like 'home';
mysql> UPDATE chenlianfu_options SET option_value='http://www.chenlianfu.com' where option_name like 'siteurl';
exit

至此,则功成了。可以正常访问www.chenlianfu.com了

EBARDenovo : A RNA-Seq Assembler

1. How to Install EBARDenovo on Linux

mono is demanded for runing EBARDenovo on linux.

yum install gcc gcc-c++ bison pkgconfig glib2-devel gettext make libpng-devel libjpeg-devel libtiff-devel libexif-devel giflib-devel libX11-devel freetype-devel fontconfig-devel  cairo-devel httpd httpd-devel

$ wget http://download.mono-project.com/sources/libgdiplus/libgdiplus-2.10.tar.bz2
$ tar jxf libgdiplus-2.10.tar.bz2
$ ./configure --prefix=/opt/mono
$ make -j 8; make install
$ echo 'export LD_LIBRARY_PATH=/opt/mono/lib:$LD_LIBRARY_PATH' >> ~/.bashrc
$ source ~/.bashrc

$ wget http://download.mono-project.com/sources/mono/mono-2.10.8.tar.bz2
$ tar jxf mono-2.10.8.tar.bz2
$ cd mono-2.10.8
$ ./configure --prefix=/opt/mono
$ make -j 8
$ make install
$ echo 'export PKG_CONFIG_PATH=/opt/mono/lib/pkgconfig:$PKG_CONFIG_PATH' >> ~/.bashrc
$ echo 'export PATH=/opt/mono/bin:$PATH' >> ~/.bashrc
$ source ~/.bashrc

$ wget http://ncu.dl.sourceforge.net/project/ebardenovo/EBARDenovo-1.2.2-20130404.zip
$ unzip EBARDenovo-1.2.2-20130404.zip
$ cd EBARDenovo-1.2.2-20130404/
$ mono EBARDenovo.exe -h

2. The parameters

Display parameters
-l :  no log file
-v :  no verbose mode

Quality parameters
-k (default 15): key size
-c (default 0) : minimal size of contig
-n (default 10): nail size
-e (default 8) : errors per N bp

Optional output parameters
-A : Ouput analysis information including coverage and alignment.
-G : skip output information for contig/gene groups to xxx-groups.txt
-P : skip output SNPs of contigs to xxx-snps.txt
-O : output small overlaps (<24bp) inside contigs to xxx-overlaps.fa
-L : output chimeric segments to xxx-delutions.fa

Execution parameters
-a : action 1: only building index files; action 2: save indices before assembly; action 3: action is to do assembly directly.
-d : the directory of index files.
-T : running threads of accelerating assembly

Help
-h

3. Several examples of running EBARDenovo

1. Most simplest
$ mono EBARDenovo.exe [-T 24] -o contigs.fasta read1.fq.gz read2.fq.gz

2. Using two stages of indexing and assembly (used usually):
$ mono EBARDenovo.exe -a 1 -d index -T 24 \
-c 200 -o contigs.fasta read1.fq.gz read2.fq.gz
$ mono EBARDenovo.exe -a 3 -d index -T 24 \
-c 200 -o contigs.fasta read1.fq.gz read2.fq.gz

3. With full calculation and parameters
$ mono EBARDenovo.exe -A -a 2 -d index -T 24 \
-k 15 -c 200 -n 10 -e 8 -O -L \
-o contigs.fasta read1.fq.gz read2.fq.gz

4. 注意事项

使用该软件应用于转录组的De novo组装,貌似要求short reads的长度要一致。
当使用的reads数据量过大的时候,容易出错:

Build indx (Bulks of 100000 spots) ...1 2 3 4 5 6 7 8 9 10 11 12 Too many heap sections: Increase MAXHINCR or MAX_HEAP_SECTS
Stacktrace:

  at (wrapper managed-to-native) object.__icall_wrapper_mono_array_new_specific (intptr,int) <0xffffffff>
  at BioAsia.GSLib.TxtNgsReader.RechargeBuf () <0x0003b>
  at BioAsia.GSLib.TxtNgsReader.Peek () <0x000eb>
  at BioAsia.GSLib.FastqNgsReader.ReadSeqLine () <0x00083>
  at BioAsia.EbarDenovo.EbarIndexing.BuildIndicesAndPairs (System.Collections.Generic.List`1) <0x007ea>
  at BioAsia.EbarDenovo.EbarIndexing.Build () <0x00283>
  at BioAsia.EbarDenovo.Program.Main (string[]) <0x0021b>
  at (wrapper runtime-invoke) .runtime_invoke_void_object (object,intptr,intptr,intptr) <0xffffffff>

Native stacktrace:

        mono() [0x495e64]
        /lib64/libpthread.so.0(+0xf500) [0x7fd088d7a500]
        /lib64/libc.so.6(gsignal+0x35) [0x7fd088a0a8e5]
        /lib64/libc.so.6(abort+0x175) [0x7fd088a0c0c5]
        mono() [0x5e8375]
        mono() [0x5e0108]
        mono() [0x5e058d]

AMOS的安装和使用

AMOS是最早的比较基因组组装软件。

AMOS的安装

AMOS的安装需要先安装MUMer和Qt。

$ wget http://jaist.dl.sourceforge.net/project/mummer/mummer/3.23/MUMmer3.23.tar.gz
$ tar zxf MUMmer3.23.tar.gz
$ cd MUMmer3.23/
$ make check
$ make install
$ echo PATH=$PWD/:'$PATH' >> ~/.bashrc

$ wget http://download.qt-project.org/official_releases/qt/4.8/4.8.5/qt-everywhere-opensource-src-4.8.5.tar.gz
$ tar zxf qt-everywhere-opensource-src-4.8.5.tar.gz
$ cd qt-everywhere-opensource-src-4.8.5
$ ./configure
$ sudo yum install gstreamer-plugins-base-devel*
$ gmake -j 8
$ sudo gmake install
$ echo 'PTAH=/usr/local/Trolltech/Qt-4.8.5/bin:$PATH' >> ~/.bashrc

$ wget http://nchc.dl.sourceforge.net/project/amos/amos/3.1.0/amos-3.1.0.tar.gz
$ tar zxf amos-3.1.0.tar.gz
$ cd amos-3.1.0
$ ./configure --prefix=/opt/biosoft/amos 
$ make -j 8      然后报错,接着进行下两步(此步省略了貌似会出其它问题)
$ sed '1i\#include ' src/Align/find-tandem.cc > tmp
$ mv tmp src/Align/find-tandem.cc
$ make -j 8      继续报错,不管
$ make -j 8      make 成功
$ make install

Methods of comparative genome assembly

同一物种得到了多个基因组组装结果,如何将组装结果进行合并,从而使基因组更完整?
Parrish N, Sudakov B, Eskin E. Genome reassembly with high-throughput sequencing data[J]. BMC genomics, 2013, 14(Suppl 1): S8.一文中提到:
A number of software packages have been developed in recent years with the aim of utilizing a set of reference genomes to produce a more optimized scaffolding, or layout, of the contigs produced in de novo assembly. OSLay [20] uses a maximum-weight matching algorithm to identify likely neighboring contigs. Treecat [21] builds a fully connected graph of the contigs, with edges weighted by the distance between syntenic regions in the reference, and attempts to find a minimum-weight Hamiltonian path through the graph using a greedy heuristic. Finally, PGA [22] uses a genetic algorithm to search the space of possible contig orderings. By relying on the contigs produced through de novo assembly, however, these methods may not take full advantage of the reference genome.
从该篇文章开始,寻找方法:

1. AMOScmp

引用文献:Pop M, Phillippy A, Delcher A L, et al. Comparative genome assembly[J]. Briefings in bioinformatics, 2004, 5(3): 237-248.

AMOScmp applies a modified MUMmer algorithm to a newly sequenced genome by mapping it onto a reference genome.

Hawkeye and AMOS are available open source at http://amos.sourceforge.net.

2. Projector 2

引用文献:van Hijum S A F T, Zomer A L, Kuipers O P, et al. Projector 2: contig mapping for efficient gap-closure of prokaryotic genome sequence assemblies[J]. Nucleic acids research, 2005, 33(suppl 2): W560-W566.

文章中写道:
Projector 2 has several distinctive features: a user-friendly web interface, automatic removal of repetitive elements (repeat-masking) and automated primer design for gap-closure purposes. The web interface is freely accessible at http://molgen.biol.rug.nl/websoftware/projector2.

3. OSLay

引用文献:Richter D C, Schuster S C, Huson D H. OSLay: optimal syntenic layout of unfinished assemblies[J]. Bioinformatics, 2007, 23(13): 1573-1579.

该文章中写道:
The underlying algorithm is based on maximum weight matching. The tool provides an interactive visualization of the computed layout and the result can be imported into the assembly editing tool Consed to support the design of primer pairs for gap closure.

OSLay is freely available from: http://www-ab.informatik.unituebingen.de/software/oslay

4. PGA

引用文献:Zhao F, Zhao F, Li T, et al. A new pheromone trail-based genetic algorithm for comparative genome assembly[J]. Nucleic acids research, 2008, 36(10): 3455-3462.

该文章中写道:
A pheromone trail-based genetic algorithm (PGA) was used to search globally for the optimal placement for each contig.An extended version of PGA can predict additional candidate connections for each contig and can thus increase the likelihood of identifying the correct arrangement of each contig. The software and test data sets can be accessed at http://sourceforge.net/projects/pga4genomics/.

5.Treecat

引用文献:Husemann P, Stoye J. Phylogenetic comparative assembly[J]. Algorithms for Molecular Biology, 2010, 5(3).

该文章中写道:
Our new algorithm for contig ordering uses sequence similarity as well as phylogenetic information to estimate adjacencies of contigs. An evaluation of our implementation shows that it performs better than recent approaches while being much faster at the same time.
The software is open source (GPL) and available within the Comparative Genomics – Contig Arrangement Toolsuite (cg-cat, http://bibiserv.techfak.uni-bielefeld.de/cg-cat webcite) on the Bielefeld Bioinformatics Server (BiBiServ).

FoxitReader在CentOS6中的使用

在FoxitReader官网上下载了适合于Linux的软件,但是使用的时候提示如下错误:

FoxitReader: error while loading shared libraries: libgtk-x11-2.0.so.0: cannot open shared object file: No such file or directory

解决方法:

# yum provides \*/libgtk-x11-2.0.so.0
# yum install gtk2-2.18.9-12.el6.i686

第一条命令查看提供文件libgtk-x11-2.0.so.0的rpm包,第二条命令安装对应的包。
现在可以正常运行FoxitReader命令,但是在终端中会有一些Gtk-Message,安装如下包可以解决:

# yum install PackageKit-gtk-module-0.5.8-21.el6.i686 \
libcanberra-gtk2-0.22-1.el6.centos.i686