python重测序下游分析群体遗传学

SyRI鉴定SV

2021-09-14  本文已影响0人  斩毛毛

Synteny and Rearrangement Identifier (Syri), 鉴定基因组间SV。以全基因组比对结果作为输入,可识别不同种类的结构变异(SV)。

学习通道:

1、基本原理

Step 1 鉴定systemic regions and non-systemic regions (rearrangements)

Step 1

Step 2 将non-systemic regions (rearrangements)分为inversion, duplications, translocations

Step 2

Step 3 在systemic- and -non-systemic region 鉴定local variants

Step 3

2. 安装

本次安装v1.4
需要

conda install cython numpy scipy pandas=0.23.4 biopython psutil matplotlib=3.0.0
conda install -c conda-forge python-igraph
conda install -c bioconda pysam

# Additionally, if using chroder
conda install -c bioconda longestrunsubsequence

可以新建环境进行安装

安装SyRI

git clone https://github.com/schneebergerlab/syri.git
python setup.py install
chmod +x syri/bin/syri syri/bin/chroder syri/bin/plotsr # Make files executable

所有可执行文件都在中cwd/syri/bin/。

3. 简单操作

在安装example/下有 操作流程,对应操作即可。

# Using minimap2 for generating alignment. Any other whole genome alignment tool can also be used.
minimap2 -ax asm5 --eqx refgenome qrygenome > out.sam
python3 $PATH_TO_SYRI -c out.sam -r refgenome -q qrygenome -k -F S
# or
samtools view -b out.sam > out.bam
python3 $PATH_TO_SYRI -c out.bam -r refgenome -q qrygenome -k -F B

绘图

python3 $PATH_TO_PLOTSR syri.out refgenome qrygenome -H 8 -W 5

也可以使用nucmer进行比对

nucmer --maxmatch -c 100 -b 500 -l 50 refgenome qrygenome       # Whole genome alignment. Any other alignment can also be used.
delta-filter -m -i 90 -l 100 out.delta > out.filtered.delta     # Remove small and lower quality alignments
show-coords -THrd out.filtered.delta > out.filtered.coords      # Convert alignment information to a .TSV format as required by SyRI
python3 $PATH_TO_SYRI -c out.filtered.coords -d out.filtered.delta -r refgenome -q qrygenome
python3 $PATH_TO_PLOTSR syri.out refgenome qrygenome -H 8 -W 5

⚠️注意:

4. 输出格式

存在两种格式tsv以及vcf格式

针对于注释类型,也存在如下解释


Parent ID对应于其中存在alignment或 local variation 的注释块中(共线性区域或结构重排)的unique ID。因此,如果在基因组A的Chr1:10和基因组B的Chr2:542有一个易位区域(unique ID TRANS1)存在A-> T SNP(unique ID SNP1),则相应的条目将为:

Chr1  10  10  A T Chr2 542  542 SNP1  TRANS1  SNP -

5 画图

python /path/to/plotsr syri.out /path/to/refgenome /path/to/qrygenome

positional arguments:
  reg                   syri.out file generated by SyRI
  r                     path to reference genome
  q                     path to query genome

optional arguments:
  -h, --help            show this help message and exit
  -s S                  minimum size of a SR to be plotted
  -R                    Create ribbons
  -f F                  font size
  -H H                  height of the plot
  -W W                  width of the plot
  -o {pdf,png,svg}      output file format (pdf, png, svg)
  -d D                  DPI for the final image
  -b {agg,cairo,pdf,pgf,ps,svg,template}
                        Matplotlib backend to use
image.png

参考

上一篇 下一篇

猜你喜欢

热点阅读