Thanks for making this useful tool.
I am trying to run wgd viz (pipeline 5) as:
wgd viz -d wgd_globalmrbh_ks/global_MRBH.tsv.ks.tsv -fa Acomosus.cds -epk wgd_ksd/*.tsv.ks.tsv -ap wgd_syn/iadhore-out/anchorpoints.txt -sp speciestree.nw -o wgd_viz_mixed_Ks --plotelmm --plotapgmm --reweight
And I got the error:
2025-10-31 16:30:11 INFO This is wgd v2.0.38 cli.py:34
INFO Checking cores and threads... core.py:35
INFO The number of logical CPUs/Hyper core.py:36
Threading in the system: 96
INFO The number of physical cores in the core.py:37
system: 24
INFO The number of actually usable CPUs in core.py:38
the system: 4
INFO Checking memory... core.py:40
INFO Total physical memory: 1486.8954 GB core.py:41
INFO Available memory: 1437.9433 GB core.py:42
INFO Free memory: 276.8815 GB core.py:43
2025-10-31 16:30:15 INFO Reading species tree and ratecorrect.py:890
categorizing sister&outgroup
species
INFO Composing trios ratecorrect.py:903
(outgroup,(focal,sister))
Traceback (most recent call last):
File "/home/genouest/cnrs_umr6553/msadaqat/.conda/envs/wgd-2/bin/wgd", line 10, in
sys.exit(cli())
File "/home/genouest/cnrs_umr6553/msadaqat/.conda/envs/wgd-2/lib/python3.6/site-packages/click/core.py", line 829, in call
return self.main(*args, **kwargs)
File "/home/genouest/cnrs_umr6553/msadaqat/.conda/envs/wgd-2/lib/python3.6/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/home/genouest/cnrs_umr6553/msadaqat/.conda/envs/wgd-2/lib/python3.6/site-packages/click/core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/genouest/cnrs_umr6553/msadaqat/.conda/envs/wgd-2/lib/python3.6/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/genouest/cnrs_umr6553/msadaqat/.conda/envs/wgd-2/lib/python3.6/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/home/genouest/cnrs_umr6553/msadaqat/.conda/envs/wgd-2/lib/python3.6/site-packages/cli.py", line 580, in viz
_viz(**kwargs)
File "/home/genouest/cnrs_umr6553/msadaqat/.conda/envs/wgd-2/lib/python3.6/site-packages/cli.py", line 621, in _viz
multi_sp_plot(df,spair,gsmap,outdir,onlyrootout,title=prefix,ylabel=ylabel,viz=True,plotkde=plotkde,reweight=False,sptree=speciestree,ap = anchorpoints, extraparanomeks=extraparanomeks,plotapgmm=plotapgmm,plotelmm=plotelmm,components=components,max_EM_iterations=em_iterations,num_EM_initializations=em_initializations,peak_threshold=prominence_cutoff,rel_height=rel_height, na=nodeaveraged,user_xlim=xlim,user_ylim=ylim,adjustortho=adjustortho,adfactor=adjustfactor,okalpha=okalpha,focus2all=focus2all,clean=classic,toparrow=toparrow,BT=bootstrap,nthreads=nthreads)
File "/home/genouest/cnrs_umr6553/msadaqat/.conda/envs/wgd-2/lib/python3.6/site-packages/wgd/viz.py", line 630, in multi_sp_plot
ratediffplot(df,outdir,focus2all,sptree,onlyrootout,reweight,extraparanomeks,ap,na=na,elmm=plotelmm,mEM=max_EM_iterations,nEM=num_EM_initializations,pt=peak_threshold,rh=rel_height,components=components,apgmm=plotapgmm,BT=BT)
File "/home/genouest/cnrs_umr6553/msadaqat/.conda/envs/wgd-2/lib/python3.6/site-packages/wgd/ratecorrect.py", line 948, in ratediffplot
getspairplot_cov_cor(df,focusp,speciestree,onlyrootout,reweight,extraparanomeks,anchorpoints,outdir,na=na,elmm=elmm,mEM=mEM,nEM=nEM,pt=pt,rh=rh,components=components,apgmm=apgmm,BT=BT,nthreads=nthreads)
File "/home/genouest/cnrs_umr6553/msadaqat/.conda/envs/wgd-2/lib/python3.6/site-packages/wgd/ratecorrect.py", line 905, in getspairplot_cov_cor
else: all_spairs,spairs,Trios,Trios_dict = gettrios_overall(focusp,Ingroup_spnames,Outgroup_spnames,Ingroup_clade)
File "/home/genouest/cnrs_umr6553/msadaqat/.conda/envs/wgd-2/lib/python3.6/site-packages/wgd/ratecorrect.py", line 810, in gettrios_overall
mrca = Ingroup_clade.common_ancestor({"name": sister}, {"name": focusp})
File "/home/genouest/cnrs_umr6553/msadaqat/.conda/envs/wgd-2/lib/python3.6/site-packages/Bio/Phylo/BaseTree.py", line 471, in common_ancestor
for level in zip(*paths):
TypeError: zip argument #2 must support iteration
My file formats are as follows:
-cds file: Acomosus.cds
Acomosus_Aco031087.1
ATGGAGTTAGAGAGAGAGTCTCTCCTCTCTCTAGATTTCTCCTCCATCCCTCTAGATCTCTCTCCTAAAGTTGGGATTTT
GGAGAAGAAGAAGCTTGGGAACTCATTGGGAGCAACGGTTCGGTCCCTCGTGCGCCCGTTTGAGCGGCGTGCTTCCGTCT
CGGCGTTCGCATTTTGTTATGGTGGCCGCGGAGAGAGTGGCGGAAACTTGCGGCTGAATGCAAGTGAATCAGAACTGCGG
GTATGTTGGTTCTCCTCGCCCGACAGTGATTCAACA
Acomosus_Aco031088.1
ATGAAATTGGAAGGTCGGCGACACACTAATTACGGTAGAAGCCAATTCGGCTTCATTTGCACCGAGTCGCGTGAGATTGT
TCTTGACATCGTACAAGACGTGATACTAGCTGTTAGCATCCCTACAGGTCGCTTCTCCTTGAACGATGAGCTCCGGGGTA
GTCATCTTAACTGGACCAGGAGGTTGCGTCTCCCCCAGTTGACAGTCCCGTCGGGATGTAGCTTGCGTCTCCCCGATATT
TGGGATATCGTCAGTTCCAGTGCGAGCGGTGTGGCTGAGGATCGCGGCAAAAGCCCAGCAGCTTAG
-wgd_globalmrbh_ks/global_MRBH.tsv.ks.tsv
pair N S alignmentcoverage alignmentidentity alignmentlength dN dN/dS dS family g1 g2 l node node_averaged_dS_outlierexcluded node_averaged_dS_outlierincluded strippedalignmentlength t weightoutlierexcluded weightoutlierincluded gene1 gene2
Acomosus_Aco005279.1__Atauschii_AET4Gv20042200.18 597.0 213.0 0.2073732718894009 0.4555555555555556 3906 0.0857 0.0665 1.2883 GF00000001 Acomosus.cds_20937 Atauschii.cds_160140 -1558.131133 8 0.8075055555555555 0.8075055555555555 810 1.206 0.05555555555555555 0.05555555555555555 Acomosus_Aco005279.1 Atauschii_AET4Gv20042200.18
Acomosus_Aco005279.1__Bdistachyon_Bradi1g12340.2 590.0 220.0 0.2073732718894009 0.4555555555555556 3906 0.0849 0.0605 1.4035 GF00000001 Bdistachyon.cds_24578 Acomosus.cds_20937 -1549.398044 8 0.8075055555555555 0.8075055555555555 810 1.3291 0.05555555555555555 0.05555555555555555 Bdistachyon_Bradi1g12340.2 Acomosus_Aco005279.1
-wgd_ksd/*.tsv.ks.tsv
pair N S alignmentcoverage alignmentidentity alignmentlength dN dN/dS dS family g1 g2 l node node_averaged_dS_outlierexcluded node_averaged_dS_outlierincluded strippedalignmentlength t weightoutlierexcluded weightoutlierincluded gene1 gene2
Acomosus_Aco007158.1__Acomosus_Aco008071.1 NaN NaN NaN NaN NaN NaN NaN NaN GF00000001 Acomosus.cds_04473 Acomosus.cds_19865 NaN NaN NaN NaN NaN NaN NaN NaN Acomosus_Aco008071.1 Acomosus_Aco007158.1
Acomosus_Aco004796.1__Acomosus_Aco008071.1 NaN NaN NaN NaN NaN NaN NaN NaN GF00000001 Acomosus.cds_04473 Acom
-wgd_syn/iadhore-out/anchorpoints.txt
id multiplicon basecluster gene_x gene_y coord_x coord_y is_real_anchorpoint
1 1 1 Acomosus_Aco008517.1 Acomosus_Aco004876.1 47 62 -1
2 1 1 Acomosus_Aco008519.1 Acomosus_Aco004878.1 49 64 -1
3 1 1 Acomosus_Aco008526.1 Acomosus_Aco004888.1 55 74 -1
4 1 1 Acomosus_Aco008529.1 Acomosus_Aco004889.1 57 75 -1
5 1 1 Acomosus_Aco008536.1 Acomosus_Aco004893.1 63 79 -1
6 1 1 Acomosus_Aco008537.1 Acomosus_Aco004894.1 64 80 -1
7 1 1 Acomosus_Aco008538.1 Acomosus_Aco004898.1 65 84 -1
-speciestree.nw
(Acomosus.cds,(Jascendens.cds,(Platifolius.cds,((((Pvirgatum.cds,Sitalica.cds),(Sbicolor.cds,Zmays.cds)),(Paustralis.cds,(Etef.cds,(Salterniflorus.cds,Smaritimus.cds)))),((Osativa.cds,(Gangustifolia.cds,Olatifolia.cds)),(Bdistachyon.cds,(Tturgidum.cds,Atauschii.cds)))))));
Thanks for making this useful tool.
I am trying to run wgd viz (pipeline 5) as:
wgd viz -d wgd_globalmrbh_ks/global_MRBH.tsv.ks.tsv -fa Acomosus.cds -epk wgd_ksd/*.tsv.ks.tsv -ap wgd_syn/iadhore-out/anchorpoints.txt -sp speciestree.nw -o wgd_viz_mixed_Ks --plotelmm --plotapgmm --reweight
And I got the error:
2025-10-31 16:30:11 INFO This is wgd v2.0.38 cli.py:34
INFO Checking cores and threads... core.py:35
INFO The number of logical CPUs/Hyper core.py:36
Threading in the system: 96
INFO The number of physical cores in the core.py:37
system: 24
INFO The number of actually usable CPUs in core.py:38
the system: 4
INFO Checking memory... core.py:40
INFO Total physical memory: 1486.8954 GB core.py:41
INFO Available memory: 1437.9433 GB core.py:42
INFO Free memory: 276.8815 GB core.py:43
2025-10-31 16:30:15 INFO Reading species tree and ratecorrect.py:890
categorizing sister&outgroup
species
INFO Composing trios ratecorrect.py:903
(outgroup,(focal,sister))
Traceback (most recent call last):
File "/home/genouest/cnrs_umr6553/msadaqat/.conda/envs/wgd-2/bin/wgd", line 10, in
sys.exit(cli())
File "/home/genouest/cnrs_umr6553/msadaqat/.conda/envs/wgd-2/lib/python3.6/site-packages/click/core.py", line 829, in call
return self.main(*args, **kwargs)
File "/home/genouest/cnrs_umr6553/msadaqat/.conda/envs/wgd-2/lib/python3.6/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/home/genouest/cnrs_umr6553/msadaqat/.conda/envs/wgd-2/lib/python3.6/site-packages/click/core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/genouest/cnrs_umr6553/msadaqat/.conda/envs/wgd-2/lib/python3.6/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/genouest/cnrs_umr6553/msadaqat/.conda/envs/wgd-2/lib/python3.6/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/home/genouest/cnrs_umr6553/msadaqat/.conda/envs/wgd-2/lib/python3.6/site-packages/cli.py", line 580, in viz
_viz(**kwargs)
File "/home/genouest/cnrs_umr6553/msadaqat/.conda/envs/wgd-2/lib/python3.6/site-packages/cli.py", line 621, in _viz
multi_sp_plot(df,spair,gsmap,outdir,onlyrootout,title=prefix,ylabel=ylabel,viz=True,plotkde=plotkde,reweight=False,sptree=speciestree,ap = anchorpoints, extraparanomeks=extraparanomeks,plotapgmm=plotapgmm,plotelmm=plotelmm,components=components,max_EM_iterations=em_iterations,num_EM_initializations=em_initializations,peak_threshold=prominence_cutoff,rel_height=rel_height, na=nodeaveraged,user_xlim=xlim,user_ylim=ylim,adjustortho=adjustortho,adfactor=adjustfactor,okalpha=okalpha,focus2all=focus2all,clean=classic,toparrow=toparrow,BT=bootstrap,nthreads=nthreads)
File "/home/genouest/cnrs_umr6553/msadaqat/.conda/envs/wgd-2/lib/python3.6/site-packages/wgd/viz.py", line 630, in multi_sp_plot
ratediffplot(df,outdir,focus2all,sptree,onlyrootout,reweight,extraparanomeks,ap,na=na,elmm=plotelmm,mEM=max_EM_iterations,nEM=num_EM_initializations,pt=peak_threshold,rh=rel_height,components=components,apgmm=plotapgmm,BT=BT)
File "/home/genouest/cnrs_umr6553/msadaqat/.conda/envs/wgd-2/lib/python3.6/site-packages/wgd/ratecorrect.py", line 948, in ratediffplot
getspairplot_cov_cor(df,focusp,speciestree,onlyrootout,reweight,extraparanomeks,anchorpoints,outdir,na=na,elmm=elmm,mEM=mEM,nEM=nEM,pt=pt,rh=rh,components=components,apgmm=apgmm,BT=BT,nthreads=nthreads)
File "/home/genouest/cnrs_umr6553/msadaqat/.conda/envs/wgd-2/lib/python3.6/site-packages/wgd/ratecorrect.py", line 905, in getspairplot_cov_cor
else: all_spairs,spairs,Trios,Trios_dict = gettrios_overall(focusp,Ingroup_spnames,Outgroup_spnames,Ingroup_clade)
File "/home/genouest/cnrs_umr6553/msadaqat/.conda/envs/wgd-2/lib/python3.6/site-packages/wgd/ratecorrect.py", line 810, in gettrios_overall
mrca = Ingroup_clade.common_ancestor({"name": sister}, {"name": focusp})
File "/home/genouest/cnrs_umr6553/msadaqat/.conda/envs/wgd-2/lib/python3.6/site-packages/Bio/Phylo/BaseTree.py", line 471, in common_ancestor
for level in zip(*paths):
TypeError: zip argument #2 must support iteration
My file formats are as follows:
-cds file: Acomosus.cds
-wgd_globalmrbh_ks/global_MRBH.tsv.ks.tsv
pair N S alignmentcoverage alignmentidentity alignmentlength dN dN/dS dS family g1 g2 l node node_averaged_dS_outlierexcluded node_averaged_dS_outlierincluded strippedalignmentlength t weightoutlierexcluded weightoutlierincluded gene1 gene2
Acomosus_Aco005279.1__Atauschii_AET4Gv20042200.18 597.0 213.0 0.2073732718894009 0.4555555555555556 3906 0.0857 0.0665 1.2883 GF00000001 Acomosus.cds_20937 Atauschii.cds_160140 -1558.131133 8 0.8075055555555555 0.8075055555555555 810 1.206 0.05555555555555555 0.05555555555555555 Acomosus_Aco005279.1 Atauschii_AET4Gv20042200.18
Acomosus_Aco005279.1__Bdistachyon_Bradi1g12340.2 590.0 220.0 0.2073732718894009 0.4555555555555556 3906 0.0849 0.0605 1.4035 GF00000001 Bdistachyon.cds_24578 Acomosus.cds_20937 -1549.398044 8 0.8075055555555555 0.8075055555555555 810 1.3291 0.05555555555555555 0.05555555555555555 Bdistachyon_Bradi1g12340.2 Acomosus_Aco005279.1
-wgd_ksd/*.tsv.ks.tsv
pair N S alignmentcoverage alignmentidentity alignmentlength dN dN/dS dS family g1 g2 l node node_averaged_dS_outlierexcluded node_averaged_dS_outlierincluded strippedalignmentlength t weightoutlierexcluded weightoutlierincluded gene1 gene2
Acomosus_Aco007158.1__Acomosus_Aco008071.1 NaN NaN NaN NaN NaN NaN NaN NaN GF00000001 Acomosus.cds_04473 Acomosus.cds_19865 NaN NaN NaN NaN NaN NaN NaN NaN Acomosus_Aco008071.1 Acomosus_Aco007158.1
Acomosus_Aco004796.1__Acomosus_Aco008071.1 NaN NaN NaN NaN NaN NaN NaN NaN GF00000001 Acomosus.cds_04473 Acom
-wgd_syn/iadhore-out/anchorpoints.txt
id multiplicon basecluster gene_x gene_y coord_x coord_y is_real_anchorpoint
1 1 1 Acomosus_Aco008517.1 Acomosus_Aco004876.1 47 62 -1
2 1 1 Acomosus_Aco008519.1 Acomosus_Aco004878.1 49 64 -1
3 1 1 Acomosus_Aco008526.1 Acomosus_Aco004888.1 55 74 -1
4 1 1 Acomosus_Aco008529.1 Acomosus_Aco004889.1 57 75 -1
5 1 1 Acomosus_Aco008536.1 Acomosus_Aco004893.1 63 79 -1
6 1 1 Acomosus_Aco008537.1 Acomosus_Aco004894.1 64 80 -1
7 1 1 Acomosus_Aco008538.1 Acomosus_Aco004898.1 65 84 -1
-speciestree.nw
(Acomosus.cds,(Jascendens.cds,(Platifolius.cds,((((Pvirgatum.cds,Sitalica.cds),(Sbicolor.cds,Zmays.cds)),(Paustralis.cds,(Etef.cds,(Salterniflorus.cds,Smaritimus.cds)))),((Osativa.cds,(Gangustifolia.cds,Olatifolia.cds)),(Bdistachyon.cds,(Tturgidum.cds,Atauschii.cds)))))));