1. 软件作用
目前叶绿体基因组分析软件与在线网站十分丰富,但是集成式、流程化的软件比较少,往往要使用多个网站或生信软件才能完成分析,CPStools通过集成多种叶绿体基因组分析命令使得工作变得更加容易,本文主要介绍该工具的主要命令。由于简书网站限制,无法添加链接,请于GitHub搜索Xwb7533/CPStools
2. 安装
pip install cpstools -i https://pypi.tuna.tsinghua.edu.cn/simple
#注意:python版本不能低于3.9
cpstools -h
#检查软件是否安装成功
3. 主要命令
3.1 命令一览
sub-commands:
{gbcheck,info,Seq,IR,Pi,RSCU,SSRs,converse,LSRs,phy}
sub-command help
gbcheck Check annotated file and Compare gene counts and difference in two GenBank files.
info Statistic gene type and intron numbers from genbank files.
Seq Adjust the Seq start in chloroplast genomes.
IR Identify four regions in chloroplast genomes.
Pi Calculate Pi valus from Genbank files and sort as cp order.
RSCU Get RSCU values from genbank files.
SSRs Identify SSRs in chloroplast genomes and mark their types.
converse Converse genbank format files to fasta/tbl/mVISTA format.
LSRs Annotate LSRs in chloroplast genomes.
phy Extract and sort common cds/protein sequences for phylogenetic analysis from multi-gbfiles.
3.2 注释文件检查与比较
cpstools gbcheck -i test.gb
#-i后为输入文件,用于检查注释文件中是否存在错误,与GB2sequin功能相似
cpstools gbcheck -r ref.gb -i test.gb
#-r后是参照序列,-i后是比较序列,用于比较两个gb注释文件之间的差异
3.3 基因类型与内含子数量统计
cpstools info -i test.gb
#-i后是输入的gb文件
输出结果为两部分,第一部分为命令行输出的含有内含子基因的信息;第二部分为一个tsv文件,里面记录了各种基因的分类情况
3.4 核酸多态性计算
cpstools Pi -d work_dir
#-d后是输出目录,将需要分析的gb文件放在这个目录下
如果mafft没有位于环境变量中,还需要使用-m mafft_path参数指定mafft的安装位置。
输出结果主要有两个,一个位于align_gene/Pi_results.txt,一个位于IGS/align_gene/Pi_results.txt,可用于绘图。
3.5 IR边界鉴定
cpstools IR -i test.gb
#-i为输入文件,结果会显示各分区的位置
3.6 RSCU值计算
cpstools RSCU -d work_dir -l n
#-d 后接工作目录,默认过滤长度为300 bp,-l是可选参数,为过滤序列的长度,低于n长度的序列不进行计算
命令运行机制为在work _ dir中自动从gb文件中提取共享编码区,去除重复序列,过滤掉短序列,并计算其RSCU值。
输出结果的文件名为RSCU_results.txt,可用于绘图,该结果与phylosuite中的RSCU分析结果可结合进行分析。
3.7 简单重复序列计算
cpstools SSRs -i test.gb
#1,2,3,4,5,6核苷酸序列的默认重复次数依次为10,6,5,4,4,4。若想自行设置参数,可添加-k参数
输出结果为**_SSRs_loc_results.txt,记录了各种重复的具体位置以及所处的区间。可与MISA-web网站的结果结合分析。
3.8 格式转换
cpstools converse -d input_dir -m fasta
#将gb文件放在input_dir目录下,转换为fasta文件
cpstools converse -d input_dir -m tbl
#将gb文件放在input_dir目录下,转换为tbl文件
cpstools converse -d input_dir -m mVISTA
#将gb文件放在input_dir目录下,转换为mVISTA的注释文件
格式转换命令主要是用于将gb文件转换为其他分析所需要的文件,例如fasta,tbl,mVISTA。
我经常使用的命令就是以上所列出的,还有其他命令不太常用,故不在赘述。