多基因組共線性分析-ntsynt

1.簡介

ntsynt是一個用于多個全基因組比對并識別共線塊的工具,它的核心思路是通過利用minimizers和graph-based方法來識別基因組間的共線塊,核心步驟如下:為每個基因組生成有序的minimizers草圖-->篩選出單拷貝的minimizers-->構(gòu)建初始minimizer圖(minimizers作為節(jié)點,基因組上相鄰的minimizers作為邊)-->初始minimizer圖優(yōu)化(移除纏結(jié)關(guān)系)-->初始共線塊識別-->迭代細化(對于初始共線塊中不存在的minimizers草圖采用更小的minimizers生成minimizer圖并簡化)-->最終的共線塊。
Tips:實測12個1G的基因組跑90min結(jié)束;

2.安裝

conda create -n ntsynt python=3.10
conda activate ntsynt
conda install -c bioconda -c conda-forge ntsynt intervaltree pybedtools ncls python-igraph gcc meson ninja snakemake samtools seqtk btllib=1.6.2

3.輸入文件

usage: ntSynt [-h] [--fastas_list FASTAS_LIST] -d DIVERGENCE [-p PREFIX] [-k K] [-w W] [-t T] [--fpr FPR] [-b BLOCK_SIZE] [--merge MERGE]
              [--w_rounds W_ROUNDS [W_ROUNDS ...]] [--indel INDEL] [-n] [--benchmark] [-f] [--dev] [-v]
              [fastas ...]

ntSynt: Multi-genome synteny detection using minimizer graphs

positional arguments:
  fastas                Input genome fasta files

optional arguments:
  -h, --help            show this help message and exit
  --fastas_list FASTAS_LIST
                        File listing input genome fasta files, one per line
  -d DIVERGENCE, --divergence DIVERGENCE
                        Approx. maximum percent sequence divergence between input genomes (Ex. -d 1 for 1% divergence).
                        This will be used to set --indel, --merge, --w_rounds, --block_size
                        See below for set values - You can also set any of those parameters yourself, which will override these settings.
  -p PREFIX, --prefix PREFIX
                        Prefix for ntSynt output files [ntSynt.k<k>.w<w>]
  -k K                  Minimizer k-mer size [24]
  -w W                  Minimizer window size [1000]
  -t T                  Number of threads [12]
  --fpr FPR             False positive rate for Bloom filter creation [0.025]
  -b BLOCK_SIZE, --block_size BLOCK_SIZE
                        Minimum synteny block size (bp)
  --merge MERGE         Maximum distance between collinear synteny blocks for merging (bp). 
                        Can also specify a multiple of the window size (ex. 3w)
  --w_rounds W_ROUNDS [W_ROUNDS ...]
                        List of decreasing window sizes for synteny block refinement
  --indel INDEL         Threshold for indel detection (bp)
  -n, --dry-run         Print out the commands that will be executed
  --benchmark           Store benchmarks for each step of the ntSynt pipeline
  -f, --force           Run all ntSynt steps, regardless of existing output files
  --dev                 Run in developer mode to retain intermediate files, log verbose output
  -v, --version         show program's version number and exit

運行示例:

ntSynt -d 5 assembly1.fa assembly2.fa assembly3.fa
或者
ntSynt -d 5 --fastas_list fasta_list -t 30

4.輸出文件

輸出文件是<prefix>.synteny_blocks.tsv,每一列信息如下:
1.共線塊ID
2.基因組文件名
3.基因組染色體名字
4.基因組起始坐標(biāo)
5.基因組終止坐標(biāo)
6.基因組染色體方向
7.在該共線塊中比對到的minimizers的數(shù)量
8.與上一個共線塊不連續(xù)的原因

5.共線塊的評估

使用analysis_scripts/denovo_synteny_block_stats.py評估

python3 denovo_synteny_block_stats.py -h
usage: denovo_synteny_block_stats.py [-h] --tsv TSV --fai FAI [FAI ...]

Compute de novo stats on synteny blocks

optional arguments:
  -h, --help           show this help message and exit
  --tsv TSV            ntSynt synteny block file
  --fai FAI [FAI ...]  FAI files for the compared genomes

結(jié)果文件解析:
第一列是共線塊的數(shù)量
第二列是在所有基因組中均包含的共線塊的數(shù)量
第三列是平均共線塊覆蓋度
第四列是在所有基因組中均包含的平均共線塊覆蓋度
第五列是共線塊的平均值長度(bp)
第六列是共線塊的中位值長度(bp)
第七列是所有共線塊的總長
第八列是共線塊NG50長度(bp)
第九列是共線塊N50長度(bp)

6.Tips

6.1 如果超內(nèi)存,可以通過增加 --fpr值來降低峰值內(nèi)存;
6.2 如果不知道-d如何設(shè)置,可以根據(jù)Mash軟件的dist功能計算

###下載
wget -c https://github.com/marbl/Mash/releases/download/v2.3/mash-Linux64-v2.3.tar
tar xvf mash-Linux64-v2.3.tar
###使用
mash dist -p 10 A.genome.fa B.genome.fa
###結(jié)果
reference-ID  query-ID  distance  p-value  shared-hashes
A.genome.fa  B.genome.fa  0.117785  1.05717e-96  44/1000

6.3 由于--merge, --indel, --block_size and --w_rounds建議根據(jù)自己的項目的經(jīng)驗值設(shè)置;
6.4 ntSynt-viz可視化方便快捷(剛開發(fā)的軟件功能不是很齊全,比如修改染色體長度、染色體形狀、共線塊顏色、突出用戶自己感興趣的區(qū)域等都不行),visualization_scripts本軟件自帶的除了安裝麻煩,還不能過濾染色體長度、共線塊長度、添加顏色等信息

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容