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.
@@ -1,14 +1,16 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: gtfreader
3
- Version: 0.1.0
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.9
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
 
@@ -162,6 +162,7 @@ def _open_gtf_reader(
162
162
  header=None,
163
163
  names=GTF_NAMES,
164
164
  dtype=GTF_DTYPES,
165
+ comment="#",
165
166
  chunksize=chunksize,
166
167
  skiprows=skiprows,
167
168
  nrows=nrows,
@@ -1,14 +1,16 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: gtfreader
3
- Version: 0.1.0
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.9
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
 
@@ -3,7 +3,6 @@ README.md
3
3
  pyproject.toml
4
4
  setup.py
5
5
  gtfreader/__init__.py
6
- gtfreader/_parser.c
7
6
  gtfreader/_parser.pyx
8
7
  gtfreader/readers.py
9
8
  gtfreader.egg-info/PKG-INFO
@@ -8,10 +8,10 @@ build-backend = "setuptools.build_meta"
8
8
 
9
9
  [project]
10
10
  name = "gtfreader"
11
- version = "0.1.0"
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.9"
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 = "cp39-* cp310-* cp311-* cp312-* cp313-*"
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,