一:数据准备
还是用到上一步生成的ath.aly.anchors和ath.aly.anchors.new文件
1. 创建如下三个文件
- seqids: 需要展现哪些序列
- layout: 不同物种的在图上的位置
- .simple: 从.anchors文件创建的更简化格式
第一步,创建.simple文件
python -m jcvi.compara.catalog ortholog --no_strip_names ath aly
python -m jcvi.compara.synteny screen --minspan=30 --simple ath.aly.anchors ath.aly.anchors.new
第二步, 创建seqids文件,非常简单,就是需要展示的scaffold或染色体的编号
scaffold_1,scaffold_2,scaffold_3,scaffold_4,scaffold_5,scaffold_6,scaffold_7,scaffold_8
Chr1,Chr2,Chr3,Chr4,Chr5
第三步,创建layout文件,用于设置绘制的一些选项。
# y, xstart, xend, rotation, color, label, va, bed
.6, .2, .8, 0, , Alyrata, top, aly.bed
.4, .2, .8, 0, , Athaliana, top, ath.bed
# edges
e, 0, 1, aly.ath.anchors.simple
注意, #edges下的每一行开头都不能有空格
最后运行下面的命令,会得到一个karyotype.pdf
python -m jcvi.graphics.karyotype seqids layout
单身在这里报错了,还没找到是什么原因,有没有大佬知道,告诉我一下怎么解决!下面是报错的日志:
$python -m jcvi.graphics.karyotype seqids layout
21:53:50 [base] Load file `layout`
21:53:50 [base] Load file `aly.bed`
21:53:51 [base] Load file `ath.bed`
Traceback (most recent call last):
File "/home/spider/soft/miniconda3/envs/py27/lib/python2.7/runpy.py", line 174, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/home/spider/soft/miniconda3/envs/py27/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/home/spider/soft/miniconda3/envs/py27/lib/python2.7/site-packages/jcvi/graphics/karyotype.py", line 422, in <module>
main()
File "/home/spider/soft/miniconda3/envs/py27/lib/python2.7/site-packages/jcvi/graphics/karyotype.py", line 409, in main
generank=(not opts.basepair),
File "/home/spider/soft/miniconda3/envs/py27/lib/python2.7/site-packages/jcvi/graphics/karyotype.py", line 358, in __init__
tr = Track(root, lo, gap=gap, height=height, lw=lw, draw=False)
File "/home/spider/soft/miniconda3/envs/py27/lib/python2.7/site-packages/jcvi/graphics/karyotype.py", line 146, in __init__
ratio = span / total
ZeroDivisionError: float division by zero