Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

don't make index #675

Merged
merged 2 commits into from
Jun 8, 2024
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
4 changes: 2 additions & 2 deletions jcvi/formats/gff.py
Original file line number Diff line number Diff line change
Expand Up @@ -2829,9 +2829,9 @@ def note(args):
if type:
type = type.split(",")

g = make_index(gffile)
exoncounts = {}
if opts.exoncount:
g = make_index(gffile)
for feat in g.features_of_type("mRNA"):
nexons = 0
for c in g.children(feat.id, 1):
Expand All @@ -2851,7 +2851,7 @@ def note(args):
if AED is not None and float(g.attributes["_AED"][0]) > AED:
continue
keyval = [g.accn] + [
",".join(g.attributes[x]) for x in attrib if x in g.attributes
",".join(g.attributes.get(x, ["nan"])) for x in attrib
]
if exoncounts:
nexons = exoncounts.get(g.accn, 0)
Expand Down
7 changes: 4 additions & 3 deletions jcvi/utils/webcolors.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
import numpy as np

from skimage.color import rgb2lab, deltaE_cmc
from webcolors import CSS3_HEX_TO_NAMES, hex_to_rgb
from webcolors._definitions import _CSS3_NAMES_TO_HEX
from webcolors import hex_to_rgb


def color_diff(rgb1, rgb2):
Expand All @@ -38,8 +39,8 @@ def closest_color(requested_color):
"""
logging.disable(logging.DEBUG)
colors = []
for key, name in CSS3_HEX_TO_NAMES.items():
diff = color_diff(hex_to_rgb(key), requested_color)
for name, hex in _CSS3_NAMES_TO_HEX.items():
diff = color_diff(hex_to_rgb(hex), requested_color)
colors.append((diff, name))
logging.disable(logging.NOTSET)
_, min_color = min(colors)
Expand Down
Loading