Skip to content

Commit 031d2c6

Browse files
authored
Fix incompatibility with gtfparse>=2 (#66)
1 parent 74d28d9 commit 031d2c6

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ dependencies = [
2626
'numpy>=1.20', # includes type annotations
2727
'tqdm>=4.63.0', # fixes tqdm.auto
2828
'pytoml',
29-
'gtfparse>=1.2.1',
29+
'gtfparse>=2',
3030
'pycairo>=1.20; sys_platform == "win32"',
3131
'leidenalg',
3232
'pyreadr',

src/infercnvpy/io/_genepos.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,9 @@ def genomic_position_from_gtf(
3838
inplace
3939
If True, add the annotations directly to adata, otherwise return a dataframe.
4040
"""
41-
gtf = gtfparse.read_gtf(gtf_file, usecols=["seqname", "feature", "start", "end", "gene_id", "gene_name"])
41+
gtf = gtfparse.read_gtf(
42+
gtf_file, usecols=["seqname", "feature", "start", "end", "gene_id", "gene_name"], result_type="pandas"
43+
)
4244
gtf = (
4345
gtf.loc[
4446
gtf["feature"] == "gene",

0 commit comments

Comments
 (0)