gtfparse 2.0.1__tar.gz → 2.1.0__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.0.1 → gtfparse-2.1.0}/PKG-INFO +8 -5
- {gtfparse-2.0.1 → gtfparse-2.1.0}/gtfparse/__init__.py +2 -1
- {gtfparse-2.0.1 → gtfparse-2.1.0}/gtfparse/read_gtf.py +5 -5
- {gtfparse-2.0.1 → gtfparse-2.1.0}/gtfparse.egg-info/PKG-INFO +8 -5
- {gtfparse-2.0.1 → gtfparse-2.1.0}/gtfparse.egg-info/SOURCES.txt +9 -9
- gtfparse-2.1.0/gtfparse.egg-info/requires.txt +2 -0
- gtfparse-2.1.0/pyproject.toml +27 -0
- gtfparse-2.1.0/requirements.txt +2 -0
- {gtfparse-2.0.1/test → gtfparse-2.1.0/tests}/test_create_missing_features.py +2 -1
- gtfparse-2.0.1/gtfparse/version.py +0 -1
- gtfparse-2.0.1/gtfparse.egg-info/requires.txt +0 -1
- gtfparse-2.0.1/requirements.txt +0 -1
- gtfparse-2.0.1/setup.py +0 -69
- {gtfparse-2.0.1 → gtfparse-2.1.0}/LICENSE +0 -0
- {gtfparse-2.0.1 → gtfparse-2.1.0}/README.md +0 -0
- {gtfparse-2.0.1 → gtfparse-2.1.0}/gtfparse/attribute_parsing.py +0 -0
- {gtfparse-2.0.1 → gtfparse-2.1.0}/gtfparse/create_missing_features.py +0 -0
- {gtfparse-2.0.1 → gtfparse-2.1.0}/gtfparse/parsing_error.py +0 -0
- {gtfparse-2.0.1 → gtfparse-2.1.0}/gtfparse.egg-info/dependency_links.txt +0 -0
- {gtfparse-2.0.1 → gtfparse-2.1.0}/gtfparse.egg-info/top_level.txt +0 -0
- {gtfparse-2.0.1 → gtfparse-2.1.0}/setup.cfg +0 -0
- {gtfparse-2.0.1/test → gtfparse-2.1.0/tests}/test_ensembl_gtf.py +0 -0
- {gtfparse-2.0.1/test → gtfparse-2.1.0/tests}/test_expand_attributes.py +0 -0
- {gtfparse-2.0.1/test → gtfparse-2.1.0/tests}/test_multiple_values_for_tag_attribute.py +0 -0
- {gtfparse-2.0.1/test → gtfparse-2.1.0/tests}/test_parse_gtf_lines.py +0 -0
- {gtfparse-2.0.1/test → gtfparse-2.1.0/tests}/test_read_stringtie_gtf.py +0 -0
- {gtfparse-2.0.1/test → gtfparse-2.1.0/tests}/test_refseq_gtf.py +0 -0
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: gtfparse
|
|
3
|
-
Version: 2.0
|
|
4
|
-
Summary: GTF
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
Version: 2.1.0
|
|
4
|
+
Summary: Parsing library for extracting data frames of genomic features from GTF files
|
|
5
|
+
Author-email: Alex Rubinsteyn <alex.rubinsteyn@unc.edu>
|
|
6
|
+
Project-URL: Homepage, https://github.com/openvax/gtfparse
|
|
7
|
+
Project-URL: Bug Tracker, https://github.com/openvax/gtfparse
|
|
8
8
|
Classifier: Development Status :: 4 - Beta
|
|
9
9
|
Classifier: Environment :: Console
|
|
10
10
|
Classifier: Operating System :: OS Independent
|
|
@@ -12,8 +12,11 @@ Classifier: Intended Audience :: Science/Research
|
|
|
12
12
|
Classifier: License :: OSI Approved :: Apache Software License
|
|
13
13
|
Classifier: Programming Language :: Python
|
|
14
14
|
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
|
|
15
|
+
Requires-Python: >=3.7
|
|
15
16
|
Description-Content-Type: text/markdown
|
|
16
17
|
License-File: LICENSE
|
|
18
|
+
Requires-Dist: polars<0.21.0,>=0.20.2
|
|
19
|
+
Requires-Dist: pyarrow<14.1.0,>=14.0.2
|
|
17
20
|
|
|
18
21
|
[](https://travis-ci.org/openvax/gtfparse) [](https://coveralls.io/github/openvax/gtfparse?branch=master)
|
|
19
22
|
<a href="https://pypi.python.org/pypi/gtfparse/">
|
|
@@ -84,11 +84,11 @@ def parse_with_polars_lazy(
|
|
|
84
84
|
fix_quotes_columns=["attribute"]):
|
|
85
85
|
# use a global string cache so that all strings get intern'd into
|
|
86
86
|
# a single numbering system
|
|
87
|
-
polars.
|
|
87
|
+
polars.enable_string_cache()
|
|
88
88
|
kwargs = dict(
|
|
89
89
|
has_header=False,
|
|
90
|
-
|
|
91
|
-
|
|
90
|
+
separator="\t",
|
|
91
|
+
comment_prefix="#",
|
|
92
92
|
null_values=".",
|
|
93
93
|
dtypes={
|
|
94
94
|
"seqname": polars.Categorical,
|
|
@@ -202,7 +202,7 @@ def parse_gtf_and_expand_attributes(
|
|
|
202
202
|
expand_attribute_strings(attribute_pairs).items()
|
|
203
203
|
if restrict_attribute_columns is None or k in restrict_attribute_columns
|
|
204
204
|
])
|
|
205
|
-
|
|
205
|
+
|
|
206
206
|
|
|
207
207
|
def read_gtf(
|
|
208
208
|
filepath_or_buffer,
|
|
@@ -260,7 +260,7 @@ def read_gtf(
|
|
|
260
260
|
|
|
261
261
|
result_df = result_df.with_columns(
|
|
262
262
|
[
|
|
263
|
-
polars.col(column_name).
|
|
263
|
+
polars.col(column_name).map_elements(lambda x: column_type(x) if len(x) > 0 else None)
|
|
264
264
|
for column_name, column_type in column_converters.items()
|
|
265
265
|
]
|
|
266
266
|
)
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: gtfparse
|
|
3
|
-
Version: 2.0
|
|
4
|
-
Summary: GTF
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
Version: 2.1.0
|
|
4
|
+
Summary: Parsing library for extracting data frames of genomic features from GTF files
|
|
5
|
+
Author-email: Alex Rubinsteyn <alex.rubinsteyn@unc.edu>
|
|
6
|
+
Project-URL: Homepage, https://github.com/openvax/gtfparse
|
|
7
|
+
Project-URL: Bug Tracker, https://github.com/openvax/gtfparse
|
|
8
8
|
Classifier: Development Status :: 4 - Beta
|
|
9
9
|
Classifier: Environment :: Console
|
|
10
10
|
Classifier: Operating System :: OS Independent
|
|
@@ -12,8 +12,11 @@ Classifier: Intended Audience :: Science/Research
|
|
|
12
12
|
Classifier: License :: OSI Approved :: Apache Software License
|
|
13
13
|
Classifier: Programming Language :: Python
|
|
14
14
|
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
|
|
15
|
+
Requires-Python: >=3.7
|
|
15
16
|
Description-Content-Type: text/markdown
|
|
16
17
|
License-File: LICENSE
|
|
18
|
+
Requires-Dist: polars<0.21.0,>=0.20.2
|
|
19
|
+
Requires-Dist: pyarrow<14.1.0,>=14.0.2
|
|
17
20
|
|
|
18
21
|
[](https://travis-ci.org/openvax/gtfparse) [](https://coveralls.io/github/openvax/gtfparse?branch=master)
|
|
19
22
|
<a href="https://pypi.python.org/pypi/gtfparse/">
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
LICENSE
|
|
2
2
|
README.md
|
|
3
|
-
|
|
3
|
+
pyproject.toml
|
|
4
|
+
requirements.txt
|
|
4
5
|
gtfparse/__init__.py
|
|
5
6
|
gtfparse/attribute_parsing.py
|
|
6
7
|
gtfparse/create_missing_features.py
|
|
7
8
|
gtfparse/parsing_error.py
|
|
8
9
|
gtfparse/read_gtf.py
|
|
9
|
-
gtfparse/version.py
|
|
10
10
|
gtfparse.egg-info/PKG-INFO
|
|
11
11
|
gtfparse.egg-info/SOURCES.txt
|
|
12
12
|
gtfparse.egg-info/dependency_links.txt
|
|
13
13
|
gtfparse.egg-info/requires.txt
|
|
14
14
|
gtfparse.egg-info/top_level.txt
|
|
15
15
|
gtfparse/../requirements.txt
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
16
|
+
tests/test_create_missing_features.py
|
|
17
|
+
tests/test_ensembl_gtf.py
|
|
18
|
+
tests/test_expand_attributes.py
|
|
19
|
+
tests/test_multiple_values_for_tag_attribute.py
|
|
20
|
+
tests/test_parse_gtf_lines.py
|
|
21
|
+
tests/test_read_stringtie_gtf.py
|
|
22
|
+
tests/test_refseq_gtf.py
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "gtfparse"
|
|
3
|
+
requires-python = ">=3.7"
|
|
4
|
+
authors = [ {name="Alex Rubinsteyn", email="alex.rubinsteyn@unc.edu" } ]
|
|
5
|
+
description = "Parsing library for extracting data frames of genomic features from GTF files"
|
|
6
|
+
classifiers = [
|
|
7
|
+
'Development Status :: 4 - Beta',
|
|
8
|
+
'Environment :: Console',
|
|
9
|
+
'Operating System :: OS Independent',
|
|
10
|
+
'Intended Audience :: Science/Research',
|
|
11
|
+
'License :: OSI Approved :: Apache Software License',
|
|
12
|
+
'Programming Language :: Python',
|
|
13
|
+
'Topic :: Scientific/Engineering :: Bio-Informatics',
|
|
14
|
+
]
|
|
15
|
+
readme = "README.md"
|
|
16
|
+
dynamic = ["version", "dependencies"]
|
|
17
|
+
|
|
18
|
+
[tool.setuptools.dynamic]
|
|
19
|
+
version = {attr = "gtfparse.__version__"}
|
|
20
|
+
dependencies = {file = ["requirements.txt"]}
|
|
21
|
+
|
|
22
|
+
[tool.setuptools]
|
|
23
|
+
packages = ["gtfparse"]
|
|
24
|
+
|
|
25
|
+
[project.urls]
|
|
26
|
+
"Homepage" = "https://github.com/openvax/gtfparse"
|
|
27
|
+
"Bug Tracker" = "https://github.com/openvax/gtfparse"
|
|
@@ -18,7 +18,8 @@ GTF_TEXT = "\n".join([
|
|
|
18
18
|
])
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
GTF_DATAFRAME = parse_gtf_and_expand_attributes(StringIO(GTF_TEXT))
|
|
21
|
+
GTF_DATAFRAME = parse_gtf_and_expand_attributes(StringIO(GTF_TEXT))
|
|
22
|
+
GTF_DATAFRAME = GTF_DATAFRAME.to_pandas()
|
|
22
23
|
|
|
23
24
|
def test_create_missing_features_identity():
|
|
24
25
|
df_should_be_same = create_missing_features(GTF_DATAFRAME, {})
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "2.0.1"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
polars
|
gtfparse-2.0.1/requirements.txt
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
polars
|
gtfparse-2.0.1/setup.py
DELETED
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
2
|
-
# you may not use this file except in compliance with the License.
|
|
3
|
-
# You may obtain a copy of the License at
|
|
4
|
-
#
|
|
5
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
-
#
|
|
7
|
-
# Unless required by applicable law or agreed to in writing, software
|
|
8
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
9
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
10
|
-
# See the License for the specific language governing permissions and
|
|
11
|
-
# limitations under the License.
|
|
12
|
-
|
|
13
|
-
import os
|
|
14
|
-
import re
|
|
15
|
-
|
|
16
|
-
from setuptools import setup, find_packages
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
package_name = "gtfparse"
|
|
21
|
-
current_directory = os.path.dirname(__file__)
|
|
22
|
-
readme_filename = 'README.md'
|
|
23
|
-
readme_path = os.path.join(current_directory, readme_filename)
|
|
24
|
-
github_url = "https://github.com/openvax/%s" % package_name
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
readme_markdown = ""
|
|
28
|
-
try:
|
|
29
|
-
with open(readme_path, 'r') as f:
|
|
30
|
-
readme_markdown = f.read()
|
|
31
|
-
except Exception as e:
|
|
32
|
-
print(e)
|
|
33
|
-
print("Failed to open %s" % readme_path)
|
|
34
|
-
|
|
35
|
-
with open('gtfparse/version.py', 'r') as f:
|
|
36
|
-
version = re.search(
|
|
37
|
-
r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]',
|
|
38
|
-
f.read(),
|
|
39
|
-
re.MULTILINE).group(1)
|
|
40
|
-
|
|
41
|
-
with open("requirements.txt") as f:
|
|
42
|
-
requirements = [l.strip() for l in f]
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
if __name__ == '__main__':
|
|
46
|
-
setup(
|
|
47
|
-
name=package_name,
|
|
48
|
-
packages=find_packages(),
|
|
49
|
-
version=version,
|
|
50
|
-
description="GTF Parsing",
|
|
51
|
-
long_description=readme_markdown,
|
|
52
|
-
long_description_content_type='text/markdown',
|
|
53
|
-
url=github_url,
|
|
54
|
-
author="Alex Rubinsteyn",
|
|
55
|
-
license="http://www.apache.org/licenses/LICENSE-2.0.html",
|
|
56
|
-
classifiers=[
|
|
57
|
-
'Development Status :: 4 - Beta',
|
|
58
|
-
'Environment :: Console',
|
|
59
|
-
'Operating System :: OS Independent',
|
|
60
|
-
'Intended Audience :: Science/Research',
|
|
61
|
-
'License :: OSI Approved :: Apache Software License',
|
|
62
|
-
'Programming Language :: Python',
|
|
63
|
-
'Topic :: Scientific/Engineering :: Bio-Informatics',
|
|
64
|
-
],
|
|
65
|
-
install_requires=requirements,
|
|
66
|
-
package_data={
|
|
67
|
-
package_name: ['../requirements.txt'],
|
|
68
|
-
},
|
|
69
|
-
)
|
|
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
|
|
File without changes
|
|
File without changes
|