在「JCVI教程」編碼序列或蛋白序列運(yùn)行共線性分析流程(上)還是有一個(gè)尷尬的事情锣尉,就是只用到兩個(gè)物種,不能展示出JCVI畫圖的方便之處,因此這里參考https://github.com/tanghaibao/jcvi/wiki/MCscan-(Python-version)的分析,只不過(guò)畫圖部分拓展下思路蜡娶。
首先要運(yùn)行如下代碼獲取目的數(shù)據(jù)
python -m jcvi.apps.fetch phytozome Vvinifera,Ppersica,Tcacao
python -m jcvi.formats.gff bed --type=mRNA --key=Name Vvinifera_145_gene.gff3.gz -o grape.bed
python -m jcvi.formats.gff bed --type=mRNA --key=Name Ppersica_139_gene.gff3.gz -o peach.bed
python -m jcvi.formats.gff bed --type=mRNA --key=Name Tcacao_233_gene.gff3.gz -o cacao.bed
python -m jcvi.formats.fasta format --sep="|" Vvinifera_145_cds.fa.gz grape.cds
python -m jcvi.formats.fasta format --sep="|" Ppersica_139_cds.fa.gz peach.cds
python -m jcvi.formats.fasta format --sep="|" Tcacao_233_cds.fa.gz cacao.cds
# find ortholog
python -m jcvi.compara.catalog ortholog grape peach --cscore=.99
python -m jcvi.compara.catalog ortholog peach cacao --cscore=.99
# build .simpe
python -m jcvi.compara.synteny screen --minspan=30 --simple grape.peach.anchors grape.peach.anchors.new
python -m jcvi.compara.synteny screen --minspan=30 --simple peach.cacao.anchors peach.cacao.anchors.new
然后按照教程的配置文件進(jìn)行畫圖
layout文件內(nèi)容如下
# y, xstart, xend, rotation, color, label, va, bed
.7, .2, .4, 45, , Grape, top, grape.bed
.5, .2, .8, 0, , Peach, top, peach.bed
.7, .4, .8, -45, , Cacao, bottom, cacao.bed
# edges
e, 0, 1, grape.peach.anchors.simple
e, 1, 2, peach.cacao.anchors.simple
seqids文件內(nèi)容如下
chr1,chr2,chr3,chr4,chr5,chr6,chr7,chr8,chr9,chr10,chr11,chr12,chr13,chr14,chr15,chr16,chr17,chr18,chr19
scaffold_1,scaffold_2,scaffold_3,scaffold_4,scaffold_5,scaffold_6,scaffold_7,scaffold_8
scaffold_1,scaffold_2,scaffold_3,scaffold_4,scaffold_5,scaffold_6,scaffold_7,scaffold_8,scaffold_9,scaffold_10r
運(yùn)行python -m jcvi.graphics.karyotype seqids layout
會(huì)得到如下結(jié)果
我就在思考一個(gè)問(wèn)題如何讓他形成一個(gè)三角形。經(jīng)過(guò)一波三角運(yùn)算和不斷嘗試映穗,我定義了如下的layout
# y, xstart, xend, rotation, color, label, va, bed
.5, 0.025, 0.625, 60, , Grape, top, grape.bed
.2, 0.2, .8, 0, , Peach, top, peach.bed
.5, 0.375, 0.975, -60, , Cacao, top, cacao.bed
# edges
e, 0, 1, grape.peach.anchors.simple
e, 1, 2, peach.cacao.anchors.simple
那么效果怎么樣呢窖张?運(yùn)行python -m jcvi.graphics.karyotype seqids layout
吧
當(dāng)然這里只展示了,grape和peach, peach和cacao之間的共線性蚁滋,我又想著能不能加上grape和caocao呢宿接?我嘗試著運(yùn)行下面的代碼,
python -m jcvi.compara.catalog ortholog grape cacao --cscore=.99
python -m jcvi.compara.synteny screen --minspan=30 --simple grape.cacao.anchors grape.cacao.anchors.new
并繼續(xù)修改了layout
# y, xstart, xend, rotation, color, label, va, bed
.5, 0.025, 0.625, 60, , Grape, top, grape.bed
.2, 0.2, .8, 0, , Peach, top, peach.bed
.5, 0.375, 0.975, -60, , Cacao, top, cacao.bed
# edges
e, 0, 1, grape.peach.anchors.simple
e, 1, 2, peach.cacao.anchors.simple
e, 0, 2, grape.cacao.anchors.simple
運(yùn)行python -m jcvi.graphics.karyotype seqids layout
會(huì)得到如下結(jié)果
我覺(jué)得給我一點(diǎn)時(shí)間辕录,我也能用JCVI畫出下面的圖了
圖片來(lái)自于https://science.sciencemag.org/content/345/6199/950