一:數(shù)據(jù)準(zhǔn)備
還是用到上一步生成的ath.aly.anchors和ath.aly.anchors.new文件
1. 創(chuàng)建如下三個(gè)文件
- seqids: 需要展現(xiàn)哪些序列
- layout: 不同物種的在圖上的位置
- .simple: 從.anchors文件創(chuàng)建的更簡(jiǎn)化格式
第一步,創(chuàng)建.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
第二步, 創(chuàng)建seqids文件再登,非常簡(jiǎn)單,就是需要展示的scaffold或染色體的編號(hào)
scaffold_1,scaffold_2,scaffold_3,scaffold_4,scaffold_5,scaffold_6,scaffold_7,scaffold_8
Chr1,Chr2,Chr3,Chr4,Chr5
第三步锉矢,創(chuàng)建layout文件,用于設(shè)置繪制的一些選項(xiàng)灯节。
# 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下的每一行開(kāi)頭都不能有空格
最后運(yùn)行下面的命令绵估,會(huì)得到一個(gè)karyotype.pdf
python -m jcvi.graphics.karyotype seqids layout
單身在這里報(bào)錯(cuò)了炎疆,還沒(méi)找到是什么原因,有沒(méi)有大佬知道国裳,告訴我一下怎么解決!下面是報(bào)錯(cuò)的日志:
$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