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

CNVkit - ImportError: cannot import name 'Int64Index' from 'pandas' #929

Open
pvvhoang opened this issue Nov 25, 2024 · 2 comments
Open

Comments

@pvvhoang
Copy link

Dear Dr. Eric,

I would like to use CNVkit for identifying copy number amplifications from whole genome sequencing data. I have installed CNVkit on our server and run it; however, I have experienced the below error in the step of running the example workflow.

//==================================
(ecDNA) [vp8928@gadi-login-09 test]$ make
cnvkit.py batch -n -f formats/chrM-Y-trunc.hg19.fa -m wgs formats/na12878-chrM-Y-trunc.bam -d build
Traceback (most recent call last):
File "/g/data/ur22/vp8928/miniconda3/envs/ecDNA/bin/cnvkit.py", line 4, in
from cnvlib import commands
File "/g/data/ur22/vp8928/miniconda3/envs/ecDNA/lib/python3.11/site-packages/cnvlib/init.py", line 1, in
from skgenome.tabio import write
File "/g/data/ur22/vp8928/miniconda3/envs/ecDNA/lib/python3.11/site-packages/skgenome/init.py", line 1, in
from . import tabio
File "/g/data/ur22/vp8928/miniconda3/envs/ecDNA/lib/python3.11/site-packages/skgenome/tabio/init.py", line 13, in
from ..gary import GenomicArray as GA
File "/g/data/ur22/vp8928/miniconda3/envs/ecDNA/lib/python3.11/site-packages/skgenome/gary.py", line 9, in
from .intersect import by_ranges, into_ranges, iter_ranges, iter_slices
File "/g/data/ur22/vp8928/miniconda3/envs/ecDNA/lib/python3.11/site-packages/skgenome/intersect.py", line 11, in
from pandas import Int64Index
ImportError: cannot import name 'Int64Index' from 'pandas' (/g/data/ur22/vp8928/miniconda3/envs/ecDNA/lib/python3.11/site-packages/pandas/init.py)
make: *** [Makefile:49: build/na12878-chrM-Y-trunc.bintest.cns] Error 1
//===================================

May you have a review and give me your advice? Thank you for your time and consideration of my request.

Best regards,

@SevenTea7
Copy link

I also encountered the same problem. When I opened /pandas/init.py, I found that the.py file was 0kb, and I also reported an error when I re-installed this package.
(ampsuite) liuhui@B1:~/ysr/app/cnvkit-0.9.7$ /data/liuhui/ysr/app/cnvkit-0.9.7/cnvkit.py Traceback (most recent call last): File "/data/liuhui/ysr/app/cnvkit-0.9.7/cnvkit.py", line 4, in <module> from cnvlib import commands File "/data/liuhui/ysr/app/cnvkit-0.9.7/cnvlib/__init__.py", line 1, in <module> from skgenome.tabio import write File "/data/liuhui/ysr/app/cnvkit-0.9.7/skgenome/__init__.py", line 1, in <module> from . import tabio File "/data/liuhui/ysr/app/cnvkit-0.9.7/skgenome/tabio/__init__.py", line 13, in <module> from ..gary import GenomicArray as GA File "/data/liuhui/ysr/app/cnvkit-0.9.7/skgenome/gary.py", line 9, in <module> from .intersect import by_ranges, into_ranges, iter_ranges, iter_slices File "/data/liuhui/ysr/app/cnvkit-0.9.7/skgenome/intersect.py", line 11, in <module> from pandas import Int64Index ImportError: cannot import name 'Int64Index' from 'pandas' (/data/liuhui/anaconda3/envs/ampsuite/lib/python3.10/site-packages/pandas/__init__.py)

@jluebeck
Copy link

jluebeck commented Dec 17, 2024

+1 to this issue.

It appears the Int64Index import was deprecated in pandas 1.4.0, and removed in 2.0.0.
https://pandas.pydata.org/docs/whatsnew/v1.4.0.html#deprecated-int64index-uint64index-float64index

https://pandas.pydata.org/docs/whatsnew/v2.0.0.html#index-can-now-hold-numpy-numeric-dtypes

Edit: I believe this is resolved in cnvkit 0.9.10 and later

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

3 participants