heche-psb / wgd

wgd v2: a suite of tools to uncover and date ancient polyploidy and whole-genome duplication
https://wgdv2.readthedocs.io/en/latest/
GNU General Public License v3.0
25 stars 0 forks source link

`wgd viz` not running with `--plotsyn` #13

Closed taprs closed 1 year ago

taprs commented 1 year ago

Running the following in wgd 2.0.22:

wgd viz -d wgd_ksd/global_MRBH.tsv.ks.tsv \
    -epk species1_ksd/species1.fa.tsv.ks.tsv -sp speciestree.txt -rw -ap species1_syn/iadhore-out/anchorpoints.txt  \
    -sr "species1.fa;species2.fa" -sr "species1.fa;species3.fa" -sr "species1.fa;species4.fa" -sr "species1.fa;species1.fa" \
    -gs wgd_ksd/gene_species.map --plotkde --plotelmm --plotsyn

I get the following error as if something was wrong with the command:


14:11:37 INFO     This is wgd v2.0.22                                                                                                               cli.py:32
Traceback (most recent call last):
  File "/netscratch/dep_mercier/grp_novikova/software/wgd/wgd_2.0.22/bin/wgd", line 11, in 
    load_entry_point('wgd', 'console_scripts', 'wgd')()
  File "/netscratch/dep_mercier/grp_novikova/software/wgd/wgd_2.0.22/lib/python3.8/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/netscratch/dep_mercier/grp_novikova/software/wgd/wgd_2.0.22/lib/python3.8/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/netscratch/dep_mercier/grp_novikova/software/wgd/wgd_2.0.22/lib/python3.8/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/netscratch/dep_mercier/grp_novikova/software/wgd/wgd_2.0.22/lib/python3.8/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/netscratch/dep_mercier/grp_novikova/software/wgd/wgd_2.0.22/lib/python3.8/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/netscratch/dep_mercier/grp_novikova/software/wgd/cli.py", line 557, in viz
    _viz(**kwargs)
  File "/netscratch/dep_mercier/grp_novikova/software/wgd/cli.py", line 572, in _viz
    table = pd.read_csv(genetable,header=0,index_col=0,sep=',')
  File "/netscratch/dep_mercier/grp_novikova/software/wgd/wgd_2.0.22/lib/python3.8/site-packages/pandas/util/_decorators.py", line 311, in wrapper
    return func(*args, **kwargs)
  File "/netscratch/dep_mercier/grp_novikova/software/wgd/wgd_2.0.22/lib/python3.8/site-packages/pandas/io/parsers/readers.py", line 678, in read_csv
    return _read(filepath_or_buffer, kwds)
  File "/netscratch/dep_mercier/grp_novikova/software/wgd/wgd_2.0.22/lib/python3.8/site-packages/pandas/io/parsers/readers.py", line 575, in _read
    parser = TextFileReader(filepath_or_buffer, **kwds)
  File "/netscratch/dep_mercier/grp_novikova/software/wgd/wgd_2.0.22/lib/python3.8/site-packages/pandas/io/parsers/readers.py", line 932, in __init__
    self._engine = self._make_engine(f, self.engine)
  File "/netscratch/dep_mercier/grp_novikova/software/wgd/wgd_2.0.22/lib/python3.8/site-packages/pandas/io/parsers/readers.py", line 1216, in _make_engine
    self.handles = get_handle(  # type: ignore[call-overload]
  File "/netscratch/dep_mercier/grp_novikova/software/wgd/wgd_2.0.22/lib/python3.8/site-packages/pandas/io/common.py", line 667, in get_handle
    ioargs = _get_filepath_or_buffer(
  File "/netscratch/dep_mercier/grp_novikova/software/wgd/wgd_2.0.22/lib/python3.8/site-packages/pandas/io/common.py", line 424, in _get_filepath_or_buffer
    raise ValueError(msg)
ValueError: Invalid file path or buffer object type: 

Removing the --plotsyn portion of the command results in no error.

heche-psb commented 1 year ago

Could you please share me with your input datafiles? I will try to reproduce it.

taprs commented 1 year ago

There you go: https://websafe.mpipz.mpg.de/d/tmGp5XQ7aM/inputs.tar.gz

Worth mentioning though that here I have the same meaningless Newick tree with non-matching labels as in #12 .

heche-psb commented 1 year ago

Hi, sorry for the confusion, you shouldn't add the flag --plotsyn when you try to do substitution rate correction. It tells the program that you want to make collinearity-related plot (dot plots, syndepth plots) and thus requires other inputs (for instance the gene-table.csv).