gtfparse 2.5.0__tar.gz → 2.6.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {gtfparse-2.5.0 → gtfparse-2.6.2}/PKG-INFO +7 -7
- {gtfparse-2.5.0 → gtfparse-2.6.2}/README.md +1 -3
- {gtfparse-2.5.0 → gtfparse-2.6.2}/gtfparse/__init__.py +4 -5
- {gtfparse-2.5.0 → gtfparse-2.6.2}/gtfparse/read_gtf.py +6 -2
- {gtfparse-2.5.0 → gtfparse-2.6.2}/gtfparse.egg-info/PKG-INFO +7 -7
- gtfparse-2.6.2/gtfparse.egg-info/requires.txt +3 -0
- {gtfparse-2.5.0 → gtfparse-2.6.2}/pyproject.toml +9 -1
- gtfparse-2.6.2/requirements.txt +3 -0
- {gtfparse-2.5.0 → gtfparse-2.6.2}/tests/test_ensembl_gtf.py +1 -1
- {gtfparse-2.5.0 → gtfparse-2.6.2}/tests/test_read_stringtie_gtf.py +1 -1
- {gtfparse-2.5.0 → gtfparse-2.6.2}/tests/test_refseq_gtf.py +1 -1
- gtfparse-2.5.0/gtfparse.egg-info/requires.txt +0 -2
- gtfparse-2.5.0/requirements.txt +0 -2
- {gtfparse-2.5.0 → gtfparse-2.6.2}/LICENSE +0 -0
- {gtfparse-2.5.0 → gtfparse-2.6.2}/gtfparse/attribute_parsing.py +0 -0
- {gtfparse-2.5.0 → gtfparse-2.6.2}/gtfparse/create_missing_features.py +0 -0
- {gtfparse-2.5.0 → gtfparse-2.6.2}/gtfparse/parsing_error.py +0 -0
- {gtfparse-2.5.0 → gtfparse-2.6.2}/gtfparse.egg-info/SOURCES.txt +0 -0
- {gtfparse-2.5.0 → gtfparse-2.6.2}/gtfparse.egg-info/dependency_links.txt +0 -0
- {gtfparse-2.5.0 → gtfparse-2.6.2}/gtfparse.egg-info/top_level.txt +0 -0
- {gtfparse-2.5.0 → gtfparse-2.6.2}/setup.cfg +0 -0
- {gtfparse-2.5.0 → gtfparse-2.6.2}/tests/test_create_missing_features.py +0 -0
- {gtfparse-2.5.0 → gtfparse-2.6.2}/tests/test_expand_attributes.py +0 -0
- {gtfparse-2.5.0 → gtfparse-2.6.2}/tests/test_multiple_values_for_tag_attribute.py +0 -0
- {gtfparse-2.5.0 → gtfparse-2.6.2}/tests/test_parse_gtf_lines.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: gtfparse
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.6.2
|
|
4
4
|
Summary: Parsing library for extracting data frames of genomic features from GTF files
|
|
5
5
|
Author-email: Alex Rubinsteyn <alex.rubinsteyn@unc.edu>
|
|
6
6
|
Project-URL: Homepage, https://github.com/openvax/gtfparse
|
|
@@ -15,12 +15,12 @@ Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
|
|
|
15
15
|
Requires-Python: >=3.7
|
|
16
16
|
Description-Content-Type: text/markdown
|
|
17
17
|
License-File: LICENSE
|
|
18
|
-
Requires-Dist: polars
|
|
19
|
-
Requires-Dist: pyarrow
|
|
18
|
+
Requires-Dist: polars>=0.20.2
|
|
19
|
+
Requires-Dist: pyarrow>=18.0.0
|
|
20
|
+
Requires-Dist: pandas>=2.1.0
|
|
21
|
+
Dynamic: license-file
|
|
20
22
|
|
|
21
|
-
|
|
22
|
-
[](https://travis-ci.org/openvax/gtfparse)
|
|
23
|
-
-->
|
|
23
|
+
[](https://github.com/openvax/gtfparse/actions/workflows/tests.yml)
|
|
24
24
|
[](https://coveralls.io/github/openvax/gtfparse?branch=master)
|
|
25
25
|
<a href="https://pypi.python.org/pypi/gtfparse/">
|
|
26
26
|
<img src="https://img.shields.io/pypi/v/gtfparse.svg?maxAge=1000" alt="PyPI" />
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
[](https://travis-ci.org/openvax/gtfparse)
|
|
3
|
-
-->
|
|
1
|
+
[](https://github.com/openvax/gtfparse/actions/workflows/tests.yml)
|
|
4
2
|
[](https://coveralls.io/github/openvax/gtfparse?branch=master)
|
|
5
3
|
<a href="https://pypi.python.org/pypi/gtfparse/">
|
|
6
4
|
<img src="https://img.shields.io/pypi/v/gtfparse.svg?maxAge=1000" alt="PyPI" />
|
|
@@ -14,20 +14,19 @@ from .attribute_parsing import expand_attribute_strings
|
|
|
14
14
|
from .create_missing_features import create_missing_features
|
|
15
15
|
from .parsing_error import ParsingError
|
|
16
16
|
from .read_gtf import (
|
|
17
|
-
read_gtf,
|
|
17
|
+
read_gtf,
|
|
18
18
|
parse_gtf,
|
|
19
|
-
parse_gtf_pandas,
|
|
20
|
-
parse_gtf_and_expand_attributes,
|
|
19
|
+
parse_gtf_pandas,
|
|
20
|
+
parse_gtf_and_expand_attributes,
|
|
21
21
|
REQUIRED_COLUMNS,
|
|
22
22
|
)
|
|
23
23
|
|
|
24
|
-
__version__ = "2.
|
|
24
|
+
__version__ = "2.6.2"
|
|
25
25
|
|
|
26
26
|
__all__ = [
|
|
27
27
|
"__version__",
|
|
28
28
|
"expand_attribute_strings",
|
|
29
29
|
"create_missing_features",
|
|
30
|
-
|
|
31
30
|
"parse_gtf_and_expand_attributes",
|
|
32
31
|
"REQUIRED_COLUMNS",
|
|
33
32
|
"ParsingError",
|
|
@@ -101,15 +101,18 @@ def parse_with_polars_lazy(
|
|
|
101
101
|
separator="\t",
|
|
102
102
|
comment_prefix="#",
|
|
103
103
|
null_values=".",
|
|
104
|
-
|
|
104
|
+
schema_overrides=DEFAULT_COLUMN_DTYPES)
|
|
105
105
|
try:
|
|
106
106
|
df = polars.read_csv(
|
|
107
107
|
filepath_or_buffer,
|
|
108
108
|
new_columns=REQUIRED_COLUMNS,
|
|
109
109
|
**kwargs).lazy()
|
|
110
|
-
except polars.ShapeError:
|
|
110
|
+
except polars.exceptions.ShapeError:
|
|
111
111
|
raise ParsingError("Wrong number of columns")
|
|
112
112
|
|
|
113
|
+
# Drop empty lines that may appear as all-null rows
|
|
114
|
+
df = df.filter(polars.col("seqname").is_not_null())
|
|
115
|
+
|
|
113
116
|
df = df.with_columns([
|
|
114
117
|
polars.col("frame").fill_null(0),
|
|
115
118
|
polars.col("attribute").str.replace_all('"', "'")
|
|
@@ -299,6 +302,7 @@ def read_gtf(
|
|
|
299
302
|
valid_columns = [c for c in usecols if c in column_names]
|
|
300
303
|
result_df = result_df[valid_columns]
|
|
301
304
|
|
|
305
|
+
result = None
|
|
302
306
|
if result_type == "pandas":
|
|
303
307
|
result = result_df
|
|
304
308
|
elif result_type == "polars":
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: gtfparse
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.6.2
|
|
4
4
|
Summary: Parsing library for extracting data frames of genomic features from GTF files
|
|
5
5
|
Author-email: Alex Rubinsteyn <alex.rubinsteyn@unc.edu>
|
|
6
6
|
Project-URL: Homepage, https://github.com/openvax/gtfparse
|
|
@@ -15,12 +15,12 @@ Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
|
|
|
15
15
|
Requires-Python: >=3.7
|
|
16
16
|
Description-Content-Type: text/markdown
|
|
17
17
|
License-File: LICENSE
|
|
18
|
-
Requires-Dist: polars
|
|
19
|
-
Requires-Dist: pyarrow
|
|
18
|
+
Requires-Dist: polars>=0.20.2
|
|
19
|
+
Requires-Dist: pyarrow>=18.0.0
|
|
20
|
+
Requires-Dist: pandas>=2.1.0
|
|
21
|
+
Dynamic: license-file
|
|
20
22
|
|
|
21
|
-
|
|
22
|
-
[](https://travis-ci.org/openvax/gtfparse)
|
|
23
|
-
-->
|
|
23
|
+
[](https://github.com/openvax/gtfparse/actions/workflows/tests.yml)
|
|
24
24
|
[](https://coveralls.io/github/openvax/gtfparse?branch=master)
|
|
25
25
|
<a href="https://pypi.python.org/pypi/gtfparse/">
|
|
26
26
|
<img src="https://img.shields.io/pypi/v/gtfparse.svg?maxAge=1000" alt="PyPI" />
|
|
@@ -24,4 +24,12 @@ packages = ["gtfparse"]
|
|
|
24
24
|
|
|
25
25
|
[project.urls]
|
|
26
26
|
"Homepage" = "https://github.com/openvax/gtfparse"
|
|
27
|
-
"Bug Tracker" = "https://github.com/openvax/gtfparse"
|
|
27
|
+
"Bug Tracker" = "https://github.com/openvax/gtfparse"
|
|
28
|
+
|
|
29
|
+
[tool.ruff.lint]
|
|
30
|
+
select = ["E", "F"]
|
|
31
|
+
ignore = ["F821", "E501", "F841", "E731", "E741", "E722", "E721"]
|
|
32
|
+
|
|
33
|
+
[tool.ruff.lint.per-file-ignores]
|
|
34
|
+
"__init__.py" = ["F401"]
|
|
35
|
+
"test*/*" = ["F401"]
|
gtfparse-2.5.0/requirements.txt
DELETED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|