看我不如看【参考】
参考:
WGDI | https://github.com/SunPengChuan/wgdi
WGDI | https://wgdi.readthedocs.io/en/latest/Introduction.html
bilibili | WGDI的简朴使用(一)
bilibili | WGDI的简朴使用(二)
简书 | xuzhougeng | 怎样用WGDI举行共线性分析(上)
简书 | xuzhougeng | 怎样用WGDI举行共线性分析(中)
简书 | xuzhougeng | 怎样用WGDI举行共线性分析(下)
简书 | xuzhougeng | WGDI之深入明白blockinfo输出效果
简书 | xuzhougeng | 使用jcvi基于wgdi的共线性效果(-icl)绘制点图
简书 | 生信石头 | 点阵图 | 比力基因组分析之基石 - 手把手入门教程
简书 | 生信石头 | WGDI | 比力基因组分析神器,要啥有啥!
公众号 | 生信媛 | 使用WGDI分析全基因组复制变乱
1. 下载
$ conda create -c bioconda -c conda-forge -n wgdi wgdi$ conda activate wgdi2. 所需文件
- blast 效果
-outfmt 6
- gff
wgdi自己界说的gff,注意提取最长转录本
- lens
注意排序
- cds.fa
将所选物种序列cat到一起
- pep.fa
3. 运行
$ wgdi -d help >> total.conf
$ wgdi -d total.conf每个参数都是【三步走】方式,运行简朴
4. 逐个参数
- -d | [dotplot]
依赖:blast 效果、gff、lens
功能:表现同源基因dotplot
- -icl | [collinearity]
依赖:blast 效果、gff、lens
功能:ColinearScan 的改进版,动态规划算法提取共线性
- -ks | [ks]
依赖:-icl效果、pep.fa、cds.fa
功能:yn00 盘算共线性块上同源基因间的ka、ks
- -bi | [blockinfo]
依赖:-icl效果、ks效果
功能:效果整合
- -c | [correspondence]
依赖:-bi效果
功能:提取
- -bk | [blockks]
依赖:-bi效果
功能:绘制dotplot 展示共线性块上的 Ks
- -kp | [kspeaks]
依赖:-bi效果
功能:ks分布图
- -pf | [peaksfit]
依赖:-bi效果
功能:ks分布的高斯拟合
- -kf | [ksfigure]
依赖:-kp效果
功能:ks分布图(正态)
背面古基因组和核型分析这块,我还不是很明确。
4. 直接天生全部设置文件
可以把关键信息传参导入,不消每次修改文件名了。
$ python3 createWGDIconf.py -husage: createWGDIconf.py [-h] [--prefix PREFIX] --blast BLAST --gff1 GFF1 [--gff2 [GFF2]] --len1 LEN1 [--len2 [LEN2]] [--genome_name1 GENOME_NAME1] [--genome_name2 GENOME_NAME2] [--cds CDS] [--pep PEP]OKoptional arguments: -h, --help show this help message and exit --prefix PREFIX --blast BLAST --gff1 GFF1 --gff2 [GFF2] --len1 LEN1 --len2 [LEN2] --genome_name1 GENOME_NAME1 --genome_name2 GENOME_NAME2 --cds CDS --pep PEP#!python3import argparsedef create_parser(): parser = argparse.ArgumentParser() parser.add_argument("--prefix", default="test") parser.add_argument("--blast", required=True) parser.add_argument("--gff1", required=True) parser.add_argument("--gff2", nargs='?') parser.add_argument("--len1", required=True) parser.add_argument("--len2", nargs='?') parser.add_argument("--genome_name1", default="genome1") parser.add_argument("--genome_name2", default="genome2") parser.add_argument("--cds", default="cds.fa") parser.add_argument("--pep", default="pep.faa") return parserdef create_conf(): d = """[dotplot]blast = {blast}gff1 = {gff1}gff2 = {gff2}lens1 = {len1}lens2 = {len2}genome1_name = {genome_name1}genome2_name = {genome_name2}multiple = 1score = 100evalue = 1e-5repeat_number = 10position = orderblast_reverse = falseancestor_left = noneancestor_top = nonemarkersize = 0.5figsize = 10,10savefig = {prefix}.pdf[dotplot]blast = {blast}gff1 = {gff1}gff2 = {gff2}lens1 = {len1}lens2 = {len2}genome1_name = {genome_name1}genome2_name = {genome_name2}multiple = 1score = 100evalue = 1e-5repeat_number = 10position = orderblast_reverse = falseancestor_left = noneancestor_top = nonemarkersize = 0.5figsize = 10,10savefig = {prefix}.pdf[collinearity]gff1 = {gff1}gff2 = {gff2}lens1 = {len1}lens2 = {len2}blast = {blast}blast_reverse = falsemultiple = 1process = 8evalue = 1e-5score = 100grading = 50,25,10mg = 25,25pvalue = 1repeat_number = 10positon = ordersavefile = {prefix}.icl.collinearity.txt[ks]cds_file = {cds}pep_file = {pep}align_software = musclepairs_file = {prefix}.icl.collinearity.txtks_file = {prefix}.ks[blockinfo]blast = {blast}gff1 = {gff1}gff2 = {gff2}lens1 = {len1}lens2 = {len2}collinearity = {prefix}.icl.collinearity.txtscore = 100evalue = 1e-5repeat_number = 20position = orderks = {prefix}.ksks_col = ks_NG86savefile = {prefix}.block.csv[correspondence]blockinfo = {prefix}.block.csvlens1 = {len1}lens2 = {len2}tandem = falsetandem_length = 200pvalue = 0.2block_length = 5multiple = 1homo = -1,1savefile = {prefix}.block.c.csv[blockks]lens1 = len1lens2 = {len2}genome1_name = {genome_name1}genome2_name = {genome_name2}blockinfo = {prefix}.block.c.csvpvalue = 0.2tandem = falsetandem_length = 200markersize = 1area = 0,2block_length = 5figsize = 8,8savefig = {prefix}.ks.c.pdf[kspeaks]blockinfo = {prefix}.block.c.csvpvalue = 0.2tandem = falseblock_length = 5ks_area = 0,10multiple = 1homo = 0,1fontsize = 9area = 0,3figsize = 10,6.18savefig = {prefix}.kp.pdfsavefile = {prefix}.kp.medain.ks[peaksfit]blockinfo = {prefix}.block.c.csvmode = medianbins_number = 200ks_area = 0,10fontsize = 9area = 0,3figsize = 10,6.18shadow = truesavefig = {prefix}.pf.pdf""".format(blast=args.blast, gff1=args.gff1, gff2=args.gff2, len1=args.len1, len2=args.len2, genome_name1=args.genome_name1, genome_name2=args.genome_name2, prefix=args.prefix, cds=args.cds, pep=args.pep) return(d)if __name__ == "__main__": parser = create_parser() args = parser.parse_args() if args.len2 is None: args.len2=args.len1 if args.gff2 is None: args.gff2=args.gff1 conf = create_conf() print(conf) |