gtfreader 0.1.0__tar.gz → 0.1.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.
- {gtfreader-0.1.0 → gtfreader-0.1.2}/PKG-INFO +7 -2
- {gtfreader-0.1.0 → gtfreader-0.1.2}/README.md +3 -0
- {gtfreader-0.1.0 → gtfreader-0.1.2}/gtfreader/readers.py +1 -0
- {gtfreader-0.1.0 → gtfreader-0.1.2}/gtfreader.egg-info/PKG-INFO +7 -2
- {gtfreader-0.1.0 → gtfreader-0.1.2}/gtfreader.egg-info/SOURCES.txt +0 -1
- {gtfreader-0.1.0 → gtfreader-0.1.2}/pyproject.toml +5 -3
- {gtfreader-0.1.0 → gtfreader-0.1.2}/tests/test_readers.py +17 -0
- gtfreader-0.1.0/gtfreader/_parser.c +0 -17518
- {gtfreader-0.1.0 → gtfreader-0.1.2}/MANIFEST.in +0 -0
- {gtfreader-0.1.0 → gtfreader-0.1.2}/gtfreader/__init__.py +0 -0
- {gtfreader-0.1.0 → gtfreader-0.1.2}/gtfreader/_parser.pyx +0 -0
- {gtfreader-0.1.0 → gtfreader-0.1.2}/gtfreader.egg-info/dependency_links.txt +0 -0
- {gtfreader-0.1.0 → gtfreader-0.1.2}/gtfreader.egg-info/requires.txt +0 -0
- {gtfreader-0.1.0 → gtfreader-0.1.2}/gtfreader.egg-info/top_level.txt +0 -0
- {gtfreader-0.1.0 → gtfreader-0.1.2}/setup.cfg +0 -0
- {gtfreader-0.1.0 → gtfreader-0.1.2}/setup.py +0 -0
- {gtfreader-0.1.0 → gtfreader-0.1.2}/tests/test_parser.py +0 -0
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: gtfreader
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.2
|
|
4
4
|
Summary: Fast Cython-backed parsing for GTF attribute columns.
|
|
5
5
|
Author: Endre Bakken Stovner
|
|
6
6
|
Classifier: Programming Language :: Python :: 3
|
|
7
7
|
Classifier: Programming Language :: Cython
|
|
8
8
|
Classifier: Programming Language :: Python :: 3 :: Only
|
|
9
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
10
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
9
11
|
Classifier: Operating System :: OS Independent
|
|
10
12
|
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
|
|
11
|
-
Requires-Python: >=3.
|
|
13
|
+
Requires-Python: >=3.12
|
|
12
14
|
Description-Content-Type: text/markdown
|
|
13
15
|
Requires-Dist: pandas>=2.0
|
|
14
16
|
|
|
@@ -16,6 +18,8 @@ Requires-Dist: pandas>=2.0
|
|
|
16
18
|
|
|
17
19
|
`gtfreader` is a small package for parsing and reading GTF files into pandas dataframes.
|
|
18
20
|
|
|
21
|
+
Requires Python 3.12 or newer.
|
|
22
|
+
|
|
19
23
|
## Install
|
|
20
24
|
|
|
21
25
|
```bash
|
|
@@ -47,6 +51,7 @@ attribute_lines = pd.read_csv(
|
|
|
47
51
|
header=None,
|
|
48
52
|
usecols=[8],
|
|
49
53
|
names=["Attribute"],
|
|
54
|
+
comment="#",
|
|
50
55
|
skiprows=skiprows,
|
|
51
56
|
)["Attribute"].tolist()
|
|
52
57
|
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
`gtfreader` is a small package for parsing and reading GTF files into pandas dataframes.
|
|
4
4
|
|
|
5
|
+
Requires Python 3.12 or newer.
|
|
6
|
+
|
|
5
7
|
## Install
|
|
6
8
|
|
|
7
9
|
```bash
|
|
@@ -33,6 +35,7 @@ attribute_lines = pd.read_csv(
|
|
|
33
35
|
header=None,
|
|
34
36
|
usecols=[8],
|
|
35
37
|
names=["Attribute"],
|
|
38
|
+
comment="#",
|
|
36
39
|
skiprows=skiprows,
|
|
37
40
|
)["Attribute"].tolist()
|
|
38
41
|
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: gtfreader
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.2
|
|
4
4
|
Summary: Fast Cython-backed parsing for GTF attribute columns.
|
|
5
5
|
Author: Endre Bakken Stovner
|
|
6
6
|
Classifier: Programming Language :: Python :: 3
|
|
7
7
|
Classifier: Programming Language :: Cython
|
|
8
8
|
Classifier: Programming Language :: Python :: 3 :: Only
|
|
9
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
10
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
9
11
|
Classifier: Operating System :: OS Independent
|
|
10
12
|
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
|
|
11
|
-
Requires-Python: >=3.
|
|
13
|
+
Requires-Python: >=3.12
|
|
12
14
|
Description-Content-Type: text/markdown
|
|
13
15
|
Requires-Dist: pandas>=2.0
|
|
14
16
|
|
|
@@ -16,6 +18,8 @@ Requires-Dist: pandas>=2.0
|
|
|
16
18
|
|
|
17
19
|
`gtfreader` is a small package for parsing and reading GTF files into pandas dataframes.
|
|
18
20
|
|
|
21
|
+
Requires Python 3.12 or newer.
|
|
22
|
+
|
|
19
23
|
## Install
|
|
20
24
|
|
|
21
25
|
```bash
|
|
@@ -47,6 +51,7 @@ attribute_lines = pd.read_csv(
|
|
|
47
51
|
header=None,
|
|
48
52
|
usecols=[8],
|
|
49
53
|
names=["Attribute"],
|
|
54
|
+
comment="#",
|
|
50
55
|
skiprows=skiprows,
|
|
51
56
|
)["Attribute"].tolist()
|
|
52
57
|
|
|
@@ -8,10 +8,10 @@ build-backend = "setuptools.build_meta"
|
|
|
8
8
|
|
|
9
9
|
[project]
|
|
10
10
|
name = "gtfreader"
|
|
11
|
-
version = "0.1.
|
|
11
|
+
version = "0.1.2"
|
|
12
12
|
description = "Fast Cython-backed parsing for GTF attribute columns."
|
|
13
13
|
readme = "README.md"
|
|
14
|
-
requires-python = ">=3.
|
|
14
|
+
requires-python = ">=3.12"
|
|
15
15
|
authors = [
|
|
16
16
|
{ name = "Endre Bakken Stovner" },
|
|
17
17
|
]
|
|
@@ -22,6 +22,8 @@ classifiers = [
|
|
|
22
22
|
"Programming Language :: Python :: 3",
|
|
23
23
|
"Programming Language :: Cython",
|
|
24
24
|
"Programming Language :: Python :: 3 :: Only",
|
|
25
|
+
"Programming Language :: Python :: 3.12",
|
|
26
|
+
"Programming Language :: Python :: 3.13",
|
|
25
27
|
"Operating System :: OS Independent",
|
|
26
28
|
"Topic :: Scientific/Engineering :: Bio-Informatics",
|
|
27
29
|
]
|
|
@@ -39,7 +41,7 @@ include = ["gtfreader*"]
|
|
|
39
41
|
testpaths = ["tests"]
|
|
40
42
|
|
|
41
43
|
[tool.cibuildwheel]
|
|
42
|
-
build = "
|
|
44
|
+
build = "cp312-* cp313-*"
|
|
43
45
|
skip = "pp* *-musllinux_* *-manylinux_i686"
|
|
44
46
|
test-command = "pytest -q {project}/tests"
|
|
45
47
|
test-requires = ["pytest"]
|
|
@@ -120,6 +120,23 @@ def test_full_readers_support_mixed_attribute_formats(tmp_path: Path, reader):
|
|
|
120
120
|
assert result.iloc[1]["exon_id"] == "EX2"
|
|
121
121
|
|
|
122
122
|
|
|
123
|
+
@pytest.mark.parametrize("reader", [read_gtf, read_gtf_python], ids=["default", "python"])
|
|
124
|
+
def test_readers_ignore_comment_lines_inside_body(tmp_path: Path, reader):
|
|
125
|
+
path = _write_temp_gtf(
|
|
126
|
+
tmp_path,
|
|
127
|
+
"# header\n"
|
|
128
|
+
'chr1\thavana\tgene\t11869\t14409\t.\t+\t.\tgene_id "G1";\n'
|
|
129
|
+
"# another comment\n"
|
|
130
|
+
'chr1\thavana\ttranscript\t11869\t14409\t.\t+\t.\tgene_id "G1"; transcript_id "T1";\n',
|
|
131
|
+
)
|
|
132
|
+
|
|
133
|
+
result = _normalize_frame_for_compare(reader(path))
|
|
134
|
+
|
|
135
|
+
assert list(result["Feature"]) == ["gene", "transcript"]
|
|
136
|
+
assert list(result["gene_id"]) == ["G1", "G1"]
|
|
137
|
+
assert list(result["transcript_id"]) == [None, "T1"]
|
|
138
|
+
|
|
139
|
+
|
|
123
140
|
def test_read_gtf_duplicate_attr_keeps_all_values(tmp_path: Path):
|
|
124
141
|
path = _write_temp_gtf(
|
|
125
142
|
tmp_path,
|