【JCVI-MCScanX】安装与使用

【JCVI-MCScanX】安装与使用,第1张

LAST依赖库安装 方法1:手动下载-自行编译
# 这部分如果没有注册过GitLab账号,可以看这篇文章【如何从GitLab克隆项目到本地?】
git clone [email protected]:mcfrith/last.git
cd last
# 创建安装目录
mkdir ../last-2022-5-1
# 编译
make
# 安装到给定目录
make install prefix=~/biosoft/last-2022-5-1
echo 'PATH=~/biosoft/last-2022-5-1/bin:$PATH' >> ~/.bashrc
# cd ../ && rm -rf last
方法2:conda安装
conda install -y -n jcvi -c bioconda last
Python版 MCScanX安装
conda create -n jcvi -c bioconda jcvi
codna activate jcvi

初次调用jcvi需要输入JGI的账号和密码:

python -m jcvi.apps.fetch phytozome
Phytozome Login: xxxxxxxx
Phytozome Password:
软件使用 1、从Phytozome上下载物种的fasta序列和gff文件 & 格式转换
# 以葡萄和梨为例
python -m jcvi.apps.fetch phytozome Vvinifera,Ppersica

# 将gff文件转换为bed文件
python -m jcvi.formats.gff bed --type=mRNA --key=Name Vvinifera_145_Genoscope.12X.gene.gff3.gz -o grape.bed
python -m jcvi.formats.gff bed --type=mRNA --key=Name Ppersica_298_v2.1.gene.gff3.gz -o peach.bed

# haibaotang老师,同样对下载的原始CDS序列进行reformat
python -m jcvi.formats.fasta format Vvinifera_145_Genoscope.12X.cds.fa.gz grape.cds
python -m jcvi.formats.fasta format Ppersica_298_v2.1.cds.fa.gz peach.cds
2、共线性分析
nohup python -m jcvi.compara.catalog ortholog --no_strip_names grape peach &
# 结果文件:grape.peach.pdf
# 不加--no_strip_names这个参数,仍旧会出现挂载不上的错误,如下:
# A total of 0 anchor was found. Aborted

一些可尝试的测试:

# 测试共线性的关系,是否为1:1
python -m jcvi.compara.synteny depth --histogram grape.peach.anchors
# 结果文件:grape.peach.depth.pdf
3、结果可视化

simple文件的生成:

python -m jcvi.compara.synteny screen --minspan=30 --simple grape.peach.anchors grape.peach.anchors.new 

配置绘制信息:

vim seqids
# 将下列内容添加到seqids 
chr1,chr2,chr3,chr4,chr5,chr6,chr7,chr8,chr9,chr10,chr11,chr12,chr13,chr14,chr15,chr16,chr17,chr18,chr19
Pp01,Pp02,Pp03,Pp04,Pp05,Pp06,Pp07,Pp08

# 配置画布 & 使用数据信息
vim layout
# y, xstart, xend, rotation, color, label, va,  bed
 .6,     .1,    .8,       0,      , Grape, top, grape.bed
 .4,     .1,    .8,       0,      , Peach, top, peach.bed
# edges
e, 0, 1, grape.peach.anchors.simple

绘图:

python -m jcvi.graphics.karyotype seqids layout

测试图展示:

额外 为什么自行编译了last之后,还是会出现报错A total of 0 anchor was found. Aborted

需添加参数:--no_strip_names

后话

我使用的是中科大的镜像,而不是清华的,清华的总是卡在Solving Environments这一步。

JCVI,安装过程中,出现了很多问题,翻了很多issues才找到对应的解决方案。

最终也只是跑了一个结果出来,还有很多方面可以深入学习:多个物种间的共线性分析、layout参数调整等,还有很多需要学习。

参考资料

[1] https://github.com/tanghaibao/jcvi/wiki/MCscan-(Python-version) [2] https://github.com/tanghaibao/jcvi/issues/99

写完这篇文章,发现Python版的MCScanX有很多人已经写过了,那我就整理起来吧。

[1] https://www.jianshu.com/p/4b1b14f8c4c4
[2] https://www.jianshu.com/p/39448b970287?utm_source=desktop&utm_medium=timeline&tdsourcetag=s_pctim_aiomsg
[3] https://blog.csdn.net/u012110870/article/details/109238554
[4] https://www.jianshu.com/p/6f1a191a0c3a

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/langs/868317.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-13
下一篇 2022-05-13

发表评论

登录后才能评论

评论列表(0条)

保存