Skip to content

Commit a8fce5a

Browse files
committed
Merge master (2.7.2) into feature/21-write-gtf
2 parents faa7dd7 + 6b2e0c7 commit a8fce5a

4 files changed

Lines changed: 6 additions & 9 deletions

File tree

gtfparse/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
)
2525
from .write_gtf import write_gtf
2626

27-
__version__ = "2.7.1"
27+
__version__ = "2.7.2"
2828

2929
__all__ = [
3030
"GENCODE_BIOTYPE_ALIASES",

gtfparse/attribute_parsing.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
from collections import OrderedDict
1515
from sys import intern
1616

17-
logging.basicConfig(level=logging.INFO)
1817
logger = logging.getLogger(__name__)
1918

2019

@@ -103,5 +102,5 @@ def expand_attribute_strings(attribute_strings, quote_char="'", missing_value=""
103102
extra_columns[column_name] = column
104103
column_order.append(column_name)
105104

106-
logging.info("Extracted GTF attributes: %s" % column_order)
105+
logger.info("Extracted GTF attributes: %s", column_order)
107106
return OrderedDict((column_name, extra_columns[column_name]) for column_name in column_order)

gtfparse/create_missing_features.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515

1616
import pandas as pd
1717

18-
logging.basicConfig(level=logging.INFO)
1918
logger = logging.getLogger(__name__)
2019

2120

@@ -58,9 +57,9 @@ def create_missing_features(dataframe, unique_keys={}, extra_columns={}, missing
5857

5958
for feature_name, groupby_key in unique_keys.items():
6059
if feature_name in existing_features:
61-
logging.info("Feature '%s' already exists in GTF data" % feature_name)
60+
logger.info("Feature '%s' already exists in GTF data", feature_name)
6261
continue
63-
logging.info("Creating rows for missing feature '%s'" % feature_name)
62+
logger.info("Creating rows for missing feature '%s'", feature_name)
6463

6564
# don't include rows where the groupby key was missing
6665
missing = pd.Series([x is None or x == "" for x in dataframe[groupby_key]])

gtfparse/read_gtf.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
from .attribute_parsing import expand_attribute_strings
2020
from .parsing_error import ParsingError
2121

22-
logging.basicConfig(level=logging.INFO)
2322
logger = logging.getLogger(__name__)
2423

2524

@@ -406,10 +405,10 @@ def wrapped_fn(x):
406405
# the 2nd column is the transcript_biotype (otherwise, it's the
407406
# gene_biotype)
408407
if "gene_biotype" not in column_names:
409-
logging.info("Using column 'source' to replace missing 'gene_biotype'")
408+
logger.info("Using column 'source' to replace missing 'gene_biotype'")
410409
result_df["gene_biotype"] = result_df["source"]
411410
if "transcript_biotype" not in column_names:
412-
logging.info("Using column 'source' to replace missing 'transcript_biotype'")
411+
logger.info("Using column 'source' to replace missing 'transcript_biotype'")
413412
result_df["transcript_biotype"] = result_df["source"]
414413

415414
if usecols is not None:

0 commit comments

Comments
 (0)