SunPengChuan / wgdi

WGDI: A user-friendly toolkit for evolutionary analyses of whole-genome duplications and ancestral karyotypes
https://wgdi.readthedocs.io/en/latest/
BSD 2-Clause "Simplified" License
114 stars 22 forks source link

error with -kf function in wgdi used to make ks figure #46

Closed RezwanCAAS closed 8 months ago

RezwanCAAS commented 8 months ago

Hi, I am using WGDI and all steps were successfully completed but when tried to draw the ks figure using the following command wgdi -kf total.conf

a chunk of data is shared here ks_medain.csv

Moreover, I used the input data (ks_medain), output of speaks (-kp)

[ksfigure] ksfit = ks_medain labelfontsize = 15 legendfontsize = 15 xlabel = none ylabel = none title = none area = 0,2 figsize = 10,6.18 shadow = true savefig = ksfigure

here is the error

File "/home/tariqr/.local/bin/wgdi", line 33, in <module> sys.exit(load_entry_point('wgdi==0.6.5', 'console_scripts', 'wgdi')()) File "/ibex/sw/rl9c/wgdi/0.6.3/rl9.1_conda3/Miniconda3/envs/python3.8/lib/python3.8/site-packages/wgdi/run.py", line 163, in main module_to_run(arg, value) File "/ibex/sw/rl9c/wgdi/0.6.3/rl9.1_conda3/Miniconda3/envs/python3.8/lib/python3.8/site-packages/wgdi/run.py", line 122, in module_to_run run_subprogram(program, conf, name) File "/ibex/sw/rl9c/wgdi/0.6.3/rl9.1_conda3/Miniconda3/envs/python3.8/lib/python3.8/site-packages/wgdi/run.py", line 87, in run_subprogram r.run() File "/ibex/sw/rl9c/wgdi/0.6.3/rl9.1_conda3/Miniconda3/envs/python3.8/lib/python3.8/site-packages/wgdi/ksfigure.py", line 50, in run ax.plot(t, self.Gaussian_distribution( File "/ibex/sw/rl9c/wgdi/0.6.3/rl9.1_conda3/Miniconda3/envs/python3.8/lib/python3.8/site-packages/wgdi/ksfigure.py", line 33, in Gaussian_distribution if np.isnan(k[3 * i + 2]): IndexError: index 2 is out of bounds for axis 0 with size 0

SunPengChuan commented 8 months ago

The -kf of WGDI is executed after -pf. It should be noted that the result of reading is the fitting curve function recorded by -pf, which needs to be recorded manually.

RezwanCAAS commented 8 months ago

Thank you. I got your first statement and I have made figure with -pf.

peaksfit

but for the second statement about the "recorded manually", cannot understand this. Can you please elaborate to fix this issue for -kf.

SunPengChuan commented 8 months ago

At around 19:48 and 36 minutes in the video at https://www.youtube.com/watch?v=qzyfygcLYe, you can find the operating instructions.

RezwanCAAS commented 8 months ago

sorry Sun, the link does not work. It's a broken link. I have access to youtube and bili bili. if you have any of the other link, please share.

SunPengChuan commented 8 months ago

https://www.bilibili.com/video/BV195411P7L1/

RezwanCAAS commented 8 months ago

Great. it's done. Thank you so much Sun for your great help.

save_image.pdf