本文學習費章軍老師文章Genome of Solanum pimpinellifolium provides insights into structural variants during tomato breeding 如何鑒定SV。
其流程見 https://github.com/GaoLei-bio/SV
1 SV-calling
1.1 基因組間比較
簡單思路: 2個基因組比較--》調取unique 比對--〉二代reads比對過濾
軟件準備:
- minimap2 (v2.11 or higher)
- sam2delta.py (RaGoo 下的一個腳本,將sam格式變為nucmer的格式)
- Assemblytics
- samtools (v1.5 or higher)
- blast+
- python 2.7
-- operator
-- pathlib
-- argparse
-- os
-- re
-- subprocess
-- sys
數據準備:
- reference genome
- query genome (二者質量較高,且相關物種;
)
- 兩個基因組所對應的illumine reads (因為組裝不完整,導致沒有組裝的區域被認為是delete,因此用二代數據過濾SV)
- QryRead2Ref.bam (sorted, rmdup; query reads 比對到reference;
)
- RefRead2Qry.bam (sorted, rmdup;ref reads比對到Query genome)
- Ref_self.bam; 同上
- Qry_self.bam; 同上
簡單操練一下:
將下載的所有腳本置于一個文件即可
## 運行SV_calling.sh 即可
Command:
bash path_to_SV_calling_script/SV_calling.sh \
path_to_SV_calling_script \
<Reference_genome_file> \
<Query_genome_file> \
<Prefix_for_outputs> \
<number of threads> \
<min_SV_size> \
<max_SV_size> \
<assemblytics_path>
### 具體數據
bash path_to_SV_calling_script/SV_calling.sh \
path_to_SV_calling_script \
SL4.0.genome.fasta \
Pimp_v1.4.fasta \
SP2SL 24 10 1000000 \
path_to_assemblytics_scripts
## 上述的4個bam文件必須放在當前工作目錄下
結果:
- SP2SL.Master_list.tsv
- SP2SL.NR.bed (用于下一步)
1.2 pacbio reads進行鑒定SV (可選)
數據準備:
- Prefix_for_outputs.NR.bed: 上一步結果
- Reference_genome_file: fasta
- Query_genome_file: fasta
- Ref_base_pbsv_vcf (利用pbsv 將query pacbio reads比對到reference genome 獲得SV)
- Qry_base_pbsv_vcf (利用pbsv 將reference pacbio reads比對到Query genome 獲得SV)
直接操練
Command:
bash path_to_SV_calling_script/SV_PacBio.sh \
path_to_SV_calling_script \
<Reference_genome_file> \
<Query_genome_file> \
<Prefix_for_outputs> \
<number of threads> \
<Ref_base_pbsv_vcf> \
<Qry_base_pbsv_vcf>
## 具體例子
For example:
bash path_to_SV_calling_script/SV_PacBio.sh \
path_to_SV_calling_script \
SL4.0.genome.fasta \
Pimp_v1.4.fasta \
SP2SL 24 \
PimpReads2SL4.0.var.vcf \
HeinzReads2Pimp.var.vcf
結果:
- SP2SL.Master_list.tsv
可將上述兩種方法得到的SV結果進行合并即可。
2 SV-genotyping
主要程序 SV_genotyping.py, 且在Example中有實例文件
準備數據:
- 重測序數據分別比對到Query 和Ref genome (bwa即可【<3 bp錯配】,去重復,)并排序
Parameters:
INPUT=Example/Example_SV.tsv # Path to your input SV file. A example of input SV file is provided.
sample=Sample_name # Sample name, prefix of outputs
Reference=Reference_genome # Path to Reference genome, fasta format, indexed by samtools faidx
Query=Query_genome # Path to Query genome , fasta format, indexed by samtools faidx
Ref_bam=Reference_base_bam # Sorted bam file with reads aligned on Reference genome
Qry_bam=Query_base_bam # Sorted bam file with reads aligned on Query genome
Mismath=3 # Allowed mismath percentage of aligned read
## 實例數據
python SV_genotyping.py Example/Example_input.tsv \
Example Example/Reference.fasta \
Example/Query.fasta \
Example/Sample.Ref_base.bam \
Example/Sample.Qry_base.bam 3
結果
- Example.GT.txt.
head Example.GT.txt.
#Genotype: R for homozygous Reference genotype; Q for homozygous Query genotype; H for Heterozygous genotype; U for Undetermined.
SV_ID Example_1m
SV_w_5206 Q
SV_w_5207 Q
SV_w_5209 R
SV_w_5210 Q
SV_w_5211 Q
SV_w_5212 H
SV_w_5213 Q
SV_w_5214 Q