Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion gtfparse/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
read_gtf,
)

__version__ = "2.7.1"
__version__ = "2.7.2"

__all__ = [
"GENCODE_BIOTYPE_ALIASES",
Expand Down
3 changes: 1 addition & 2 deletions gtfparse/attribute_parsing.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
from collections import OrderedDict
from sys import intern

logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)


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

logging.info("Extracted GTF attributes: %s" % column_order)
logger.info("Extracted GTF attributes: %s", column_order)
return OrderedDict((column_name, extra_columns[column_name]) for column_name in column_order)
5 changes: 2 additions & 3 deletions gtfparse/create_missing_features.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@

import pandas as pd

logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)


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

for feature_name, groupby_key in unique_keys.items():
if feature_name in existing_features:
logging.info("Feature '%s' already exists in GTF data" % feature_name)
logger.info("Feature '%s' already exists in GTF data", feature_name)
continue
logging.info("Creating rows for missing feature '%s'" % feature_name)
logger.info("Creating rows for missing feature '%s'", feature_name)

# don't include rows where the groupby key was missing
missing = pd.Series([x is None or x == "" for x in dataframe[groupby_key]])
Expand Down
5 changes: 2 additions & 3 deletions gtfparse/read_gtf.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
from .attribute_parsing import expand_attribute_strings
from .parsing_error import ParsingError

logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)


Expand Down Expand Up @@ -406,10 +405,10 @@ def wrapped_fn(x):
# the 2nd column is the transcript_biotype (otherwise, it's the
# gene_biotype)
if "gene_biotype" not in column_names:
logging.info("Using column 'source' to replace missing 'gene_biotype'")
logger.info("Using column 'source' to replace missing 'gene_biotype'")
result_df["gene_biotype"] = result_df["source"]
if "transcript_biotype" not in column_names:
logging.info("Using column 'source' to replace missing 'transcript_biotype'")
logger.info("Using column 'source' to replace missing 'transcript_biotype'")
result_df["transcript_biotype"] = result_df["source"]

if usecols is not None:
Expand Down
Loading