基因家族和关联分析R语言基因组组装

几种绘制基因组共线图的方法

2021-10-26  本文已影响0人  追梦生信人

1.MCscan
MCscan绘制共线图
MCscan需要准备cds.fasta和.gff注释文件
cds.fasta文件可以从基因组序列中提取

# 提取cds
gffread in.gff3 -g ref.fa -x cds.fa
# gff文件转换成bed文件
python3.6 -m jcvi.formats.gff bed --type=mRNA --key=Name example_1.gff -o example_1.bed
python3.6 -m jcvi.formats.gff bed --type=mRNA --key=Name example_2.gff -o example_2.bed
此处报错请修改mRNA为gene 或者是--type修改为ID (根据gff文件而定)
# 将cds.fa文件转换格式
python3.6 -m jcvi.formats.fasta format example_1.cds.fa example_1.cds
python3.6 -m jcvi.formats.fasta format example_2.cds.fa example_2.cds
# 此步骤生成.anchors文件
python3.6 -m jcvi.compara.catalog ortholog example_1 example_2 --no_strip_names
# 此步骤生成simple文件,进行过滤,此步骤会产生.anchors.simple文件 
# --minspan 过滤条件
python3.6 -m jcvi.compara.synteny screen --minspan=30 --simple grape.peach.anchors grape.peach.anchors.new 
# 或者 不过滤
python3.6 -m jcvi.compara.synteny screen --simple example_1.example_2.anchors example_1.example_2.anchors.new

配置layout文件

vi layout
# y, xstart, xend, rotation, color, label, va,  bed
 .6,     .1,    .8,       0,      , example_1, top, example_1.bed
 .4,     .1,    .8,       0,      , example_2, top, example_2.bed
# edges
e, 0, 1, example_1.example_2.anchors.simple

y:调整染色体上下位置
xstart:调整染色体左右的起始位置
xend:调整染色体的终止位置(可以计算染色体的长度,换算比例,在染色体共线图中显示染色体长度之间的关系。)
rotation:可以调整染色体的倾斜角度。
label:标签,该信息会在染色体的左侧显示出来

配置seqids文件

vi seqids
Chr1,Chr2,Chr3 ...
Chr1,Chr2,Chr3 ...

可视化

python3.6 -m jcvi.graphics.karyotype seqids layout

如果为多个染色体之间的共线图,依次添加信息。
例如

vi layout
# y, xstart, xend, rotation, color, label, va,  bed
 .6,     .1,    .8,       0,      , example_1, top, example_1.bed
 .4,     .1,    .8,       0,      , example_2, top, example_2.bed
 .2,     .1,    .8,       0,      , example_3, top, example_3.bed
# edges
e, 0, 1, example_1.example_2.anchors.simple
e, 1, 2, example_2.example_3.anchors.simple
vi seqids
Chr1,Chr2,Chr3 ...
Chr1,Chr2,Chr3 ...
Chr1,Chr2,Chr3 ...
上一篇下一篇

猜你喜欢

热点阅读