Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in saving XlsxWriter #2

Closed
daniquebax opened this issue Jun 10, 2024 · 1 comment
Closed

Error in saving XlsxWriter #2

daniquebax opened this issue Jun 10, 2024 · 1 comment

Comments

@daniquebax
Copy link

Hi there,

I encountered an AttributeError while using the CAT (Cluster Alignment Tool) library. The error occurs when attempting to save the results to an Excel file using the save() method in the report.py file.
I am quite new to bioinformatic analyses, so maybe it's a very straight forward solution, but I couldn't figure it out. I posted the output below.

(my_conda_env2)dbax@cn45:/scratch/dbax/CAT$ "/scratch/dbax/CAT/CAT.sh"
[dataset.py->prepare():73]INFO: Preprocessing 1
[dataset.py->_filter_genes():58]INFO: Removing 2 mitochondrial genes
[dataset.py->_filter_genes():58]INFO: Removing 24 ribosomal genes
[dataset.py->prepare():73]INFO: Preprocessing 2
[cat.py->internal_preprocessing():49]INFO: Before 1: (7501, 1974)
[cat.py->internal_preprocessing():50]INFO: Before 2: (71005, 2944)
[cat.py->internal_preprocessing():68]INFO: After 1: (7501, 638)
[cat.py->internal_preprocessing():69]INFO: After 2: (71005, 638)
/vol/mbconda/dbax/my_conda_env2/lib/python3.10/site-packages/scanpy/preprocessing/_normalization.py:233: UserWarning: Some cells have zero counts
  warn(UserWarning("Some cells have zero counts"))
100%|████████████████████████████████████████████████████████████████████████████████████████████████| 1000/1000 [04:51<00:00,  3.43it/s]
[cat.py->run():222]INFO: Saving results to ./results/ds1-vs-ds2
Traceback (most recent call last):
  File "/vol/mbconda/dbax/my_conda_env2/bin/catcli", line 8, in <module>
    sys.exit(main())
  File "/vol/mbconda/dbax/my_conda_env2/lib/python3.10/site-packages/cat/__main__.py", line 110, in main
    run(args)
  File "/vol/mbconda/dbax/my_conda_env2/lib/python3.10/site-packages/cat/cat.py", line 224, in run
    save_tables(tables, output=args.output, dashboard=dashboard)
  File "/vol/mbconda/dbax/my_conda_env2/lib/python3.10/site-packages/cat/report.py", line 126, in save_tables
    writer.save()
AttributeError: 'XlsxWriter' object has no attribute 'save'. Did you mean: '_save'?

Thank you for your attention to this matter. Please let me know if you need any further information or assistance.

Best,
Danique

@matq007
Copy link
Member

matq007 commented Jun 11, 2024

Hi Danique, could you please try installing lower version of pandas<2 ? I think that is the issue.

matq007 added a commit that referenced this issue Jul 15, 2024
Function `save` was deprecated in favor of `close` in XlsxWriter
@matq007 matq007 closed this as completed Jul 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants