Skip to content

Commit

Permalink
Fix incompatibility with gtfparse>=2 (#66)
Browse files Browse the repository at this point in the history
  • Loading branch information
grst authored Jan 9, 2023
1 parent 74d28d9 commit 031d2c6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ dependencies = [
'numpy>=1.20', # includes type annotations
'tqdm>=4.63.0', # fixes tqdm.auto
'pytoml',
'gtfparse>=1.2.1',
'gtfparse>=2',
'pycairo>=1.20; sys_platform == "win32"',
'leidenalg',
'pyreadr',
Expand Down
4 changes: 3 additions & 1 deletion src/infercnvpy/io/_genepos.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"], result_type="pandas"
)
gtf = (
gtf.loc[
gtf["feature"] == "gene",
Expand Down

0 comments on commit 031d2c6

Please sign in to comment.