pIRS的安装和简单使用


[TOC]


安装Boost C++ library

安装pIRS过程中遇到未安装Boost C++ library的问题
从这里下载 https://www.boost.org/
下载boost_1_68_0版本

tar xzvf boost_1_68_0.tgz.gz
$ cd path/to/boost_1_67_0
$ ./bootstrap.sh --prefix=path/to/installation/prefix
$ sudo ./b2 install

./bootstrap.sh这步我自己添加了 --with-python=python3 --with-python-version=3.6这两个参数,因为我单独运行./bootstrap.sh的时候发现它自动检测到的是ubuntu18.10自带的python2,我希望它与python3关联。
./b2这步需要加sudo 不加的话会有些文件安装不上permission denied。

安装步骤可以参考这两个
https://www.boost.org/doc/libs/1_68_0/more/getting_started/unix-variants.html
https://blog.csdn.net/lvyibin890/article/details/80888554


安装pIRS

从这里下载pIRS压缩包 https://github.com/galaxy001/pirs

cd path/to/pIRS
make
sudo -s
find . -type l|while read a;do cp --copy-contents -LR  "$a" /TARGET/PATH/;done

试用pIRS

安装后在任意目录输入pirs即可调用pIRS程序

Program:       pirs (Profile-based Illumina pair-end Reads Simulator)
Version:       2.0.0
Author:        Jianying Yuan (BGI-Shenzhen)
Contact:       [email protected]
Compile Date:  Nov 17 2018 time: 21:31:02

Usage: pirs  [option]
    diploid     generate diploid genome.
    simulate    simulate Illumina reads.

但是运行命令的时候遇到错误:


pirs simulate sample.fa
[pIRS] Program:        pirs (Profile-based Illumina pair-end Reads Simulator)
[pIRS] Version:        2.0.0
[pIRS] Author:         Jianying Yuan (BGI-Shenzhen)
[pIRS] Contact:        [email protected]
[pIRS] Compile Date:   Nov 17 2018 time: 21:30:49
[pIRS] Current time:   Sun Nov 18 16:02:45 2018
[pIRS] Command line:   pirs simulate sample.fa
[pIRS] 
[pIRS] Loading base-calling profile /usr/local/share/pirs/Base-Calling_Profiles/humNew.PE100.matrix.gz
************************************************************
[pIRS] FATAL ERROR:
Failed to open the file "/usr/local/share/pirs/Base-Calling_Profiles/humNew.PE100.matrix.gz": No such file or directory
************************************************************

发现pIRS的安装目录下有两组Profiles,将其中一组移动到

sudo mv Base-Calling_Profiles -t /usr/local/share/pirs/
sudo mv GC-depth_Profiles -t /usr/local/share/pirs/
sudo mv InDel_Profiles -t /usr/local/share/pirs/

然后运行

pirs simulate sample.fa
[pIRS] Program:        pirs (Profile-based Illumina pair-end Reads Simulator)
[pIRS] Version:        2.0.0
[pIRS] Author:         Jianying Yuan (BGI-Shenzhen)
[pIRS] Contact:        [email protected]
[pIRS] Compile Date:   Nov 17 2018 time: 21:30:49
[pIRS] Current time:   Sun Nov 18 16:08:32 2018
[pIRS] Command line:   pirs simulate sample.fa
[pIRS] 
[pIRS] Loading base-calling profile /usr/local/share/pirs/Base-Calling_Profiles/humNew.PE100.matrix.gz
[pIRS] Loaded base-calling profile header:
[pIRS]    num_ref_bases      = 4
[pIRS]    num_cycles         = 200
[pIRS]    num_seq_bases      = 4
[pIRS]    num_quality_scores = 41
[pIRS] Loading DistMatrix of base-calling profile
[pIRS] Loading QTransMatrix of base-calling profile
[pIRS] Done loading Base-Calling profile.
[pIRS] Loading InDel error profile /usr/local/share/pirs/InDel_Profiles/phixv2.InDel.matrix
[pIRS] Indel error profile statistics:
[pIRS]     max_indel_len = 3
[pIRS]     num_cycles    = 200
[pIRS]     read_1_count  = 147091454
[pIRS]     read_2_count  = 145785569
[pIRS]     Insertion-bp rate of 100-bp read 1 = 0.000478%
[pIRS]     Deletion-bp rate of 100-bp read 1  = 0.001118%
[pIRS]     Insertion-bp rate of 100-bp read 2 = 0.000837%
[pIRS]     Deletion-bp rate of 100-bp read 2  = 0.001551%
[pIRS] Done loading InDel error profile.
[pIRS] Loading GC bias profile /usr/local/share/pirs/GC-depth_Profiles/humNew.gcdep_200.dat
[pIRS] GC bias profile (GC content, relative abundance), showing every 10%
[pIRS]     0%   0.00422544
[pIRS]     10%  0.0909624
[pIRS]     20%  0.782551
[pIRS]     30%  0.966385
[pIRS]     40%  0.950876
[pIRS]     50%  0.783616
[pIRS]     60%  0.554585
[pIRS]     70%  0.260476
[pIRS]     80%  0.0578053
[pIRS]     90%  0.00422544
[pIRS]     100% 0.00422544
[pIRS] Done loading GC bias profile.
[pIRS] 
[pIRS] Beginning simulation with the following parameters:
[pIRS] 
[pIRS] Read length:                      100
[pIRS] Insert length mean:               180
[pIRS] Insert length standard deviation: 18
[pIRS] Coverage:                         5
[pIRS] Diploid:                          no
[pIRS] Cyclized (jumping library):       no
[pIRS] Simulate substitution errors:     yes
[pIRS] Substitution error rate:          default of base-calling profile
[pIRS] Base-calling profile:             /usr/local/share/pirs/Base-Calling_Profiles/humNew.PE100.matrix.gz
[pIRS] Substitution error algorithm:     quality transition mode algorithm
[pIRS] Simulate InDel errors:            yes
[pIRS] InDel error profile:              /usr/local/share/pirs/InDel_Profiles/phixv2.InDel.matrix
[pIRS] Simulate GC content bias:         yes
[pIRS] GC bias profile:                  /usr/local/share/pirs/GC-depth_Profiles/humNew.gcdep_200.dat
[pIRS] Output type:                      text
[pIRS] Output directory:                 .
[pIRS] Indiv name:                       
[pIRS] Simulate quality values:          yes
[pIRS] ASCII shift of quality value      33
[pIRS] Mode of mask quality:             None
[pIRS] Random seed:                      7510571324928
[pIRS] Number of simulator threads:      2
[pIRS] 
[pIRS] Reading scaffold "DH10BmutV2_3046486_0_0_0_0_0_926968" into memory
[pIRS] Simulating reads from scaffold "DH10BmutV2_3046486_0_0_0_0_0_926968" (length = 226)
[pIRS] Simulated 5 of 5 read pairs
[pIRS] Done simulating reads from scaffold "DH10BmutV2_3046486_0_0_0_0_0_926968" (length = 226)
[pIRS] Reading scaffold "DH10BmutV2_1779373_1_0_2_0_0_761290" into memory
[pIRS] Simulating reads from scaffold "DH10BmutV2_1779373_1_0_2_0_0_761290" (length = 205)
[pIRS] Simulated 5 of 5 read pairs
[pIRS] Done simulating reads from scaffold "DH10BmutV2_1779373_1_0_2_0_0_761290" (length = 205)
[pIRS] Reading scaffold "DH10BmutV2_106571_1_0_0_0_0_933953" into memory
[pIRS] Simulating reads from scaffold "DH10BmutV2_106571_1_0_0_0_0_933953" (length = 172)
[pIRS] Simulated 4 of 4 read pairs
[pIRS] Done simulating reads from scaffold "DH10BmutV2_106571_1_0_0_0_0_933953" (length = 172)
[pIRS] Reading scaffold "DH10BmutV2_1890995_0_0_1_0_1_838382" into memory
[pIRS] Simulating reads from scaffold "DH10BmutV2_1890995_0_0_1_0_1_838382" (length = 212)
[pIRS] Simulated 5 of 5 read pairs
[pIRS] Done simulating reads from scaffold "DH10BmutV2_1890995_0_0_1_0_1_838382" (length = 212)
[pIRS] Reading scaffold "DH10BmutV2_1695593_0_0_2_5_0_261534" into memory
[pIRS] Simulating reads from scaffold "DH10BmutV2_1695593_0_0_2_5_0_261534" (length = 189)
[pIRS] Simulated 4 of 4 read pairs
[pIRS] Done simulating reads from scaffold "DH10BmutV2_1695593_0_0_2_5_0_261534" (length = 189)
[pIRS] Reading scaffold "DH10BmutV2_869560_1_0_1_0_1_154195" into memory
[pIRS] Simulating reads from scaffold "DH10BmutV2_869560_1_0_1_0_1_154195" (length = 192)
[pIRS] Simulated 4 of 4 read pairs
[pIRS] Done simulating reads from scaffold "DH10BmutV2_869560_1_0_1_0_1_154195" (length = 192)
[pIRS] Reading scaffold "DH10BmutV2_4659073_0_0_2_1_1_219617" into memory
[pIRS] Simulating reads from scaffold "DH10BmutV2_4659073_0_0_2_1_1_219617" (length = 215)
Floating point exception (core dumped)

运行产生的文件如下图


pirs运行结果.png
pirs运行结果2.png

遇到Floating point exception (core dumped)错误

This error comes when there is some expression dividing value by zero. eg. x=10 and y=0 and x/y. This means, x is divided by zero, which results to floating point error.
But 代码并不是我写的而且代码应该不会有错吧。。。

ubuntu系统报错:ubuntu nautilus[3832]:can`t init metadata tree /home/sjl/.local/share/gvfs-metadata/root:open:Permission denied
暂缓此问题。

https://stackoverflow.com/questions/17299894/floating-point-exception-core-dumped
https://www.linuxquestions.org/questions/linux-newbie-8/floating-point-exception-core-dumped-899988/
http://blog.51cto.com/liuqunying/1624423


参考

https://github.com/galaxy001/pirs
这个文章里还有其他软件的对比
https://www.zd200572.com/2017/10/14/WES-executing-process/

你可能感兴趣的:(pIRS的安装和简单使用)