bacpop / ggCaller

Bifrost graph gene caller.
MIT License
87 stars 6 forks source link

TypeError: set_axis() got an unexpected keyword argument 'copy' during execution #32

Closed tgttunstall closed 4 months ago

tgttunstall commented 5 months ago

I encountered a TypeError when trying to run ggCaller from source following the example provided in the documentation. The error message indicates an issue with the set_axis method from the pandas library.

$ ggcaller --refs ~/arise_data/test_code/Bentley_et_al_2006_CPS_sequences/input.txt 
Building coloured compacted DBG...
Generating graph stop codon index...
Mapping contigs to graph...
Downloading databases...
100% [......................................................................] 121866588 / 121866588
Unzipping protein annotation file...
Loading gene models...
Traversing graph to identify ORFs...
|████████████████████████████████████████████████| 100%
Generating clusters of high-scoring ORFs...
Scoring ORF clusters...
|██████████████████████████████████████████████████| 100%
Identifying high-scoring ORFs...
|████████████████████████████████████████████████| 100%
Generating initial network...
Processing paralogs...
100%|█████████████████████████████████████████████████████████████████████████████| 1/1 [00:00<00:00, 298.44it/s]
collapse mistranslations...
Processing depth:  1
Iteration:  1
100%|███████████████████████████████████████████████████████████████████████| 221/221 [00:00<00:00, 46694.94it/s]
Processing depth:  2
Iteration:  1
100%|███████████████████████████████████████████████████████████████████████| 221/221 [00:00<00:00, 51842.35it/s]
Processing depth:  3
Iteration:  1
100%|███████████████████████████████████████████████████████████████████████| 221/221 [00:00<00:00, 51617.17it/s]
annotating gene families...
Traceback (most recent call last):
  File "/home/tanu/anaconda3/envs/ggc_env/bin/ggcaller", line 33, in <module>
    sys.exit(load_entry_point('ggCaller==1.3.4', 'console_scripts', 'ggcaller')())
  File "/home/tanu/anaconda3/envs/ggc_env/lib/python3.9/site-packages/ggCaller-1.3.4-py3.9-linux-x86_64.egg/ggCaller/__main__.py", line 511, in main
    run_panaroo(pool, array_shd_tup, high_scoring_ORFs, high_scoring_ORF_edges,
  File "/home/tanu/anaconda3/envs/ggc_env/lib/python3.9/site-packages/ggCaller-1.3.4-py3.9-linux-x86_64.egg/panaroo_runner/__main__.py", line 114, in run_panaroo
    G = iterative_annotation_search(G, shd_arr_tup, overlap,
  File "/home/tanu/anaconda3/envs/ggc_env/lib/python3.9/site-packages/ggCaller-1.3.4-py3.9-linux-x86_64.egg/panaroo_runner/annotate.py", line 192, in iterative_annotation_search
    G = run_diamond_search(G, shd_arr_tup, overlap, annotation_temp_dir,
  File "/home/tanu/anaconda3/envs/ggc_env/lib/python3.9/site-packages/ggCaller-1.3.4-py3.9-linux-x86_64.egg/panaroo_runner/annotate.py", line 108, in run_diamond_search
    df = df.set_axis(['query_id', 'id', 'bitscore', 'description'], axis=1, copy=False)
  File "/home/tanu/.local/lib/python3.9/site-packages/pandas/util/_decorators.py", line 311, in wrapper
    return func(*args, **kwargs)
TypeError: set_axis() got an unexpected keyword argument 'copy'

env: Python 3.9.19 on debian 11.9 x86_64

samhorsfield96 commented 5 months ago

Hi, which version of pandas are you using? You can get this from running mamba list.

tgttunstall commented 5 months ago

Pandas 2.2.2

samhorsfield96 commented 5 months ago

Hi, please try reinstalling with an earlier version of pandas using the command mamba install --force-reinstall pandas=2.0.0 and then re-run ggCaller as before.

tgttunstall commented 5 months ago

same issue with pandas=2.0.0 The error message is the same.

$ conda list | grep pandas
pandas                    2.0.0            py39h2ad29b5_0    conda-forge
tgttunstall commented 5 months ago

Sorry, as you can see that I have used conda instead of mamba. Hopefully this should not be causing the issue.

samhorsfield96 commented 5 months ago

I'm not able to reproduce unfortunately. Would you be able to remove the environment and attempt reinstalling from source again? If that fails I'd suggest trying the latest docker container (docker pull samhorsfield96/ggcaller:master)

tgttunstall commented 5 months ago

ok, so I think the issue was with conda version. I tried mamba, and it worked. From the mamba run, I extracted the following versions:

mamba 1.5.8
conda 24.3.0

The conda version on my local machine was 22.9.0 which gave the error I mention here. I am currently updating conda on my local machine and will attempt to rerun ggcaller. Hopefully it fixes the issue.

samhorsfield96 commented 4 months ago

Closing as completed.