diff --git a/pyproject.toml b/pyproject.toml index ff0152b..afd54be 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -26,7 +26,7 @@ dependencies = [ 'numpy>=1.20', # includes type annotations 'tqdm>=4.63.0', # fixes tqdm.auto 'pytoml', - 'gtfparse<2', + 'gtfparse>=2.1', 'pycairo>=1.20; sys_platform == "win32"', 'leidenalg', 'pyreadr', diff --git a/src/infercnvpy/io/_genepos.py b/src/infercnvpy/io/_genepos.py index c3907f7..4814de3 100644 --- a/src/infercnvpy/io/_genepos.py +++ b/src/infercnvpy/io/_genepos.py @@ -38,7 +38,9 @@ def genomic_position_from_gtf( inplace If True, add the annotations directly to adata, otherwise return a dataframe. """ - gtf = gtfparse.read_gtf(gtf_file, usecols=["seqname", "feature", "start", "end", "gene_id", "gene_name"]) + gtf = gtfparse.read_gtf( + gtf_file, usecols=["seqname", "feature", "start", "end", "gene_id", "gene_name"] + ).to_pandas() gtf = ( gtf.loc[ gtf["feature"] == "gene",