arzwa / wgd

Python package and CLI for whole-genome duplication related analyses. This package is deprecated in favor of https://github.com/heche-psb/wgd.
http://wgd.readthedocs.io/en/latest/
GNU General Public License v3.0
81 stars 40 forks source link

*ks.svg figure is empty #58

Open shiyi-pan opened 3 years ago

shiyi-pan commented 3 years ago

hi, I run the WGD using format.SoyC09.CDS.fasta and ormat.SoyC09.gff as my input file,here is my code:

wgd mcl -n 8 --cds --mcl -s format.SoyC09.CDS.fasta -o SoyC09.CDS.out wgd ksd --n_threads 8 --pairwise SoyC09.CDS.out/format.SoyC09.CDS.fasta.blast.tsv.mcl format.SoyC09.CDS.fasta wgd syn format.SoyC09.gff format.SoyC09.CDS.fasta wgd kde wgd_ksd/format.SoyC09.CDS.fasta.ks.tsv wgd mix wgd_ksd/format.SoyC09.CDS.fasta.ks.tsv

I don't find errors in log but the output figures like ks.svg and dotplot.svg are empty. coud't you help me fix this problem? here is my input file and log file. cds.zip format.SoyC09.CDS.fasta.ks.zip gff.zip log.txt

arzwa commented 3 years ago

Does the tsv output file with the Ks distribution look fine? If so I would guess it's something with the plotting libraries in your python installation or so. You can always make a plot yourself using R or python or whatever you are familiar with. You can also try wgd viz to further debug what's going wrong.

shiyi-pan commented 3 years ago

thank you for your reply. first, I have run WGD with the test data named Sspon.v20190103 and it works well,so I don't think it's the plotting libraries problem. second , I couldn't find any abnormal in tsv output file and here is my tsv output file: format.SoyC09.CDS.fasta.ks.tsv.zip thank you again.

arzwa commented 3 years ago

I can't tell what went wrong for you. If I run

wgd viz -ks format.SoyC09.CDS.fasta.ks.tsv

I get a perfectly fine histogram (wgd_hist.svg).

shiyi-pan commented 3 years ago

thank you very much. This is so weird. when I run wgd with the test data,it works well ,here is the commoda and log:

wgd viz -ks ./wgd_syn/Sspon.v20190103.cds.fasta.blast.tsv.mcl.ks_anchors.tsv

2021-03-22 15:08:47: INFO Plotting Ks distributions overlay 2021-03-22 15:08:47: INFO Will plot node-averaged histograms

but when using my data, I got an error, here is the commoda and log:

wgd viz -ks /ds3512/home/panyp/NN1138-2/04.WGD_data/wgd_ksd/format.final.cds.fa.ks.tsv

2021-03-22 15:06:50: INFO Not a Ks distribution: /ds3512/home/panyp/NN1138-2/04.WGD_data/wgd_ksd/format.final.cds.fa.ks.tsv 2021-03-22 15:06:50: INFO Plotting Ks distributions overlay Traceback (most recent call last): File "/ds3512/home/panyp/ruanjian/python3/bin/wgd", line 11, in load_entry_point('wgd==1.2', 'console_scripts', 'wgd')() File "/ds3512/home/panyp/ruanjian/python3/lib/python3.6/site-packages/click/core.py", line 764, in call return self.main(args, kwargs) File "/ds3512/home/panyp/ruanjian/python3/lib/python3.6/site-packages/click/core.py", line 717, in main rv = self.invoke(ctx) File "/ds3512/home/panyp/ruanjian/python3/lib/python3.6/site-packages/click/core.py", line 1137, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/ds3512/home/panyp/ruanjian/python3/lib/python3.6/site-packages/click/core.py", line 956, in invoke return ctx.invoke(self.callback, ctx.params) File "/ds3512/home/panyp/ruanjian/python3/lib/python3.6/site-packages/click/core.py", line 555, in invoke return callback(args, **kwargs) File "/ds3512/home/panyp/ruanjian/python3/lib/python3.6/site-packages/wgd-1.2-py3.6.egg/wgd_cli.py", line 1286, in viz File "/ds3512/home/panyp/ruanjian/python3/lib/python3.6/site-packages/wgd-1.2-py3.6.egg/wgdcli.py", line 1378, in viz File "/ds3512/home/panyp/ruanjian/python3/lib/python3.6/site-packages/wgd-1.2-py3.6.egg/wgd/viz.py", line 136, in plot_selection File "/ds3512/home/panyp/ruanjian/python3/lib/python3.6/site-packages/wgd-1.2-py3.6.egg/wgd/viz.py", line 69, in plot_dists File "/ds3512/home/panyp/ruanjian/python3/lib/python3.6/site-packages/numpy/core/shape_base.py", line 340, in hstack return _nx.concatenate(arrs, 1)

could you give me some advise to fix it? thank you again .

arzwa commented 3 years ago

You did not send me the Sspon.v20190103.cds.fasta.blast.tsv.mcl.ks_anchors.tsv file. Are you sure the file looks as expected? You might have some issues in your wgd syn command leading to a failure to detect synteny... make sure to set the -a and -f options correctly to mark the correspondence between your cds and gff files.

shiyi-pan commented 3 years ago

I'm sorry I didn't notice this answer early. When I run the WGD using Sspon.v20190103 CDS and GFF file, it works well. But when I run it in my gff file and CDS file , it run wrong, So i didn't upload the Sspon.v20190103.cds.fasta.blast.tsv.mcl.ks_anchors.tsv file. I upload my CDS and GFF data and ks file and log file , I couldn't find any problem, could you help me check these files ? thank you very much.