Skip to content

Commit 527284c

Browse files
jpintargrst
andauthored
Update gtfparse version requirement (#118)
* Update gtfparse version requirement In 00ece88, gtfparse version was pinned to <2 because of conflicts between gtfparse and recent versions of polars. Since 12/21/23, with gtfparse v. 2.1.0, the conflicts have been eliminated, so there is no need to keep older versions pinned. * Convert polars GTF to pandas --------- Co-authored-by: Gregor Sturm <[email protected]> Co-authored-by: Gregor Sturm <[email protected]>
1 parent 7badb5c commit 527284c

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<2',
29+
'gtfparse>=2.1',
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"]
43+
).to_pandas()
4244
gtf = (
4345
gtf.loc[
4446
gtf["feature"] == "gene",

0 commit comments

Comments
 (0)