一、简介
SOAPdenovo2是用于short-read组装的软件,能够组装出类似人类基因组大小的de novo草图。SOAPdenovo主要用于大型植物和动物基因组的组装,当然也适用于组装细菌和真菌,组装大型基因组,如人类时,可能需要150G内存。
二、下载与安装
1.下载
GitHub - aquaskyline/SOAPdenovo2: Next generation sequencing reads de novo assembler.
如下图,点击Download ZIP下载安装包,然后通过Xftp上传服务器的指定文件夹
2.安装
解压后进入目录,输入make进行编译即可
unzip SOAPdenovo2-master.zip
cd SOAPdenovo2-master
make
三、使用
1.构建configuration file
SOAPdenovo2的使用需要自己构建配置文件,可以根据软件目录中的示例配置文件"example.config"进行构建,主要包含以下参数:
1)max_rd_len
唯一的全局配置参数,read的最大长度,任何比它大的read会被切到这个长度,该值一般设置的比实际read读长稍微短一些
2)avg_ins
文库的平均插入长度
3)reverse_seq
是否需要将序列反向互补,Illumima GA 产生两种 paired-end 文库:一是forward-reverse;另一个是 reverse-forward。"reverse_seq"参数应该如下设置:0,forward-reverse(插入片段少于500 bp);1,reverse-forward(插入片段 2 kb 以上的环状文库)
3)asm_flags
决定reads在组装的哪些过程中用到,1(仅进行contig组装);2(仅进行scaffold组装);3(contig和scaffold都组装);4(只进行gap closure)
4)rd_len_cutof
与 max_rd_len 类似,均是将比它大的read切到这个长度
5)rank
为整数值,它决定在scaffold组装时reads被利用的顺序。文库中具有同样rank值的会被同时使用(在组装scaffold时)。
6)pair_num_cutoff
可选参数,规定了连接两个contig或者是pre-scaffold 的可信连接的阈值,即当连接数大于该值,连接才算有效。对于pair-end数据,默认值为3;对于mate-paird数据,默认值为5
7)map_len
可选参数,规定了在map过程中reads和contig的比对长度必须达到该值,该比对才能作为一个可信的比对。对于paired-end数据,默认值为32;对于mate-pair数据,默认值为35
举个例子:
#maximal read length
max_rd_len=150
[LIB]
#average insert size
avg_ins=350
#if sequence needs to be reversed
reverse_seq=0
#in which part(s) the reads are used
asm_flags=3
#use only first 100 bps of each read
rd_len_cutoff=150
#in which order the reads are used while scaffolding
rank=1
# cutoff of pair number for a reliable connection (at least 3 for short insert size)
pair_num_cutoff=3
#minimum aligned length to contigs for a reliable read location (at least 32 for short insert size)
map_len=32
#a pair of fastq file, read 1 file should always be followed by read 2 file
f1=D1700703_1.fa
f2=D1700703_2.fa
#single-reads用"f=/path/filename" or "q=/path/filename" 表示 fasta or fastq 格式
#paired-reads被放在两个fasta文件中,分别为"f1=" and "f2=";fastq文件由"q1=" and "q2="表示
#paired-reads如果全在一个fasta文件中,则用"p=" 选项
#reads在bam文件中则用"b="选项
2.运行
运行分为两种方式,一般采用一站式运行
1)一站式运行
SOAPdenovo-63mer all -s config_file -K 63 -R -o graph_prefix 1>ass.log 2>ass.err
all的常用参数
-s <string> 配置文件:config
-o <string> 输出图形文件名的前缀
-K <int> 输入的kmer(最小13, 最大63/127): 默认值[23]
-p <int> 线程数,默认值[8]
-a <int> 初始化内存:避免内存再分配,默认[0]G
-d <int> 去除kmers频数不大于该值的k-mer,默认值[0]
-R (optional) 利用read鉴别短的重复序列,默认值[NO]
-D <int> 去除频数不大于该值(edgeCovCutoff)的由k-mer连接的边,默认值[1],即该边上每个点的频数都小于等于1时才去除
-M <int> 在contiging操作时,合并相似序列的强度,默认值为[1],最小值0,最大值3
-f (optional) 在map那一步中,对于使用SRkgf去填充gap,输出与gap相关的reads,默认[NO]
-F (optional) 利用read对scaffold中的gap进行填补,默认[NO]
-u (optional) 构建scaffolding前不屏蔽高/低覆盖度的contigs,这里高频率覆盖度指平均contig覆盖深度的2倍。默认[mask]屏蔽
-G <int> 估计gap的大小和实际补gap的大小的差异值,默认值[50]bp
-L <int> 用于构建scaffold的contig的最短长度(minContigLen),默认为:[Kmer参数值+2]
# 使用下面的命令查看其余参数
SOAPdenovo-63mer all -h
2)分步运行
#step1
SOAPdenovo-63mer pregraph -s config_file -K 63 -R -o graph_prefix 1>pregraph.log 2>pregraph.err
#step2
SOAPdenovo-63mer contig -g graph_prefix -R 1>contig.log 2>contig.err
#step3
SOAPdenovo-63mer map -s config_file -g graph_prefix 1>map.log 2>map.err
#step4
SOAPdenovo-63mer scaff -g graph_prefix -F 1>scaff.log 2>scaff.err
3)输出文件
运行的结果文件中,其中有下面两个主要的组装结果文件
*.contig # contig序列文件
*.scafSeq # scaffold序列文件
参考:
SOAPdenovo2的安装使用
目前最好最完整的SOAPdenovo使用说明
基因组组装工具之 SOAPdenovo 使用方法
SOAPdenovo组装软件使用记录
soapdenovo2进行基因组组装