2基因組間鑒定SV

本文學習費章軍老師文章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 (二者質量較高,且相關物種;\color{red}{染色體命名規則;xxxchr01, xxxchr02, contig等合并為 xxxchr00})
  • 兩個基因組所對應的illumine reads (因為組裝不完整,導致沒有組裝的區域被認為是delete,因此用二代數據過濾SV)
  • QryRead2Ref.bam (sorted, rmdup; query reads 比對到reference;\color{red}{可以bwa-mem進行比對,名字必須是這個})
  • RefRead2Qry.bam (sorted, rmdup;ref reads比對到Query genome)
  • Ref_self.bam; 同上
  • Qry_self.bam; 同上

\color{red} {上述4個bam文件必須sort,且去重復,index,且命名和上述統一,且均放于工作目錄}

簡單操練一下:
將下載的所有腳本置于一個文件即可

## 運行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

參考

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

推薦閱讀更多精彩內容