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

import-rna not compatible with pandas 2 #826

Open
pontushojer opened this issue Jun 22, 2023 · 1 comment
Open

import-rna not compatible with pandas 2 #826

pontushojer opened this issue Jun 22, 2023 · 1 comment
Labels

Comments

@pontushojer
Copy link

I got this error running cnvkit.py import-rna.

Traceback (most recent call last):
  File "/Users/pontus.hojer/miniconda3/envs/cnvkit/bin/cnvkit.py", line 10, in <module>
    sys.exit(main())
  File "/Users/pontus.hojer/miniconda3/envs/cnvkit/lib/python3.10/site-packages/cnvlib/cnvkit.py", line 10, in main
    args.func(args)
  File "/Users/pontus.hojer/miniconda3/envs/cnvkit/lib/python3.10/site-packages/cnvlib/commands.py", line 2429, in _cmd_import_rna
    for cnr in cnrs:
  File "/Users/pontus.hojer/miniconda3/envs/cnvkit/lib/python3.10/site-packages/cnvlib/import_rna.py", line 55, in <genexpr>
    cnrs = (rna.correct_cnr(cnr, do_gc, do_txlen, max_log2) for cnr in cnrs)
  File "/Users/pontus.hojer/miniconda3/envs/cnvkit/lib/python3.10/site-packages/cnvlib/rna.py", line 411, in attach_gene_info_to_cnr
    sample_counts.iteritems(), sample_data_log2.iteritems()
  File "/Users/pontus.hojer/miniconda3/envs/cnvkit/lib/python3.10/site-packages/pandas/core/generic.py", line 5989, in __getattr__
    return object.__getattribute__(self, name)
AttributeError: 'DataFrame' object has no attribute 'iteritems'. Did you mean: 'isetitem'?

I installed CNVkit from bioconda, the pandas version 2.0.2

iteritems is depreciated in v2.0.0 see https://pandas.pydata.org/docs/whatsnew/v2.0.0.html

@etal etal added the bug label Jun 23, 2023
@etal
Copy link
Owner

etal commented Jun 23, 2023

Thanks for the report. According to pandas-dev/pandas#45321 it looks like the fix is to use items in place of iteritems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants