基因組組裝—SOAPdenovo2的使用

一、簡介


SOAPdenovo2是用于short-read組裝的軟件,能夠組裝出類似人類基因組大小的de novo草圖。SOAPdenovo主要用于大型植物動物基因組的組裝,當然也適用于組裝細菌和真菌,組裝大型基因組,如人類時,可能需要150G內存。

二、下載與安裝


1.下載

GitHub - aquaskyline/SOAPdenovo2: Next generation sequencing reads de novo assembler.

如下圖,點擊Download ZIP下載安裝包,然后通過Xftp上傳服務器的指定文件夾

點擊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進行基因組組裝

?著作權歸作者所有,轉載或內容合作請聯系作者
平臺聲明:文章內容(如有圖片或視頻亦包括在內)由作者上傳并發布,文章內容僅代表作者本人觀點,簡書系信息發布平臺,僅提供信息存儲服務。

推薦閱讀更多精彩內容