Skip to content

Commit

Permalink
type in docs modified
Browse files Browse the repository at this point in the history
  • Loading branch information
Felix Simkovic committed May 16, 2017
1 parent 0371e00 commit 3c449e2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
2 changes: 1 addition & 1 deletion conkit/core/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1167,7 +1167,7 @@ def calculate_jaccard_index(self, other):
Returns
-------
float
The Jaccard distance
The Jaccard index
See Also
--------
Expand Down
19 changes: 11 additions & 8 deletions conkit/plot/ContactMapChordPlot.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,13 @@ def _draw(self):
# 0.0 transparent through 1.0 opaque
alpha = float(c[4]) if self.use_conf else 1.0
color = {
str(Contact._MISMATCH): ColorDefinitions.MISMATCH,
str(Contact._MATCH): ColorDefinitions.MATCH,
}.get(str(c[5]), ColorDefinitions.MATCH)
ax.plot(x, y, color=color, alpha=alpha, linestyle="-", zorder=0)
Contact._MISMATCH: ColorDefinitions.STRUCTURAL,
Contact._MATCH: ColorDefinitions.MATCH,
}.get(int(c[5]), ColorDefinitions.MATCH)
if int(c[5]) == Contact._MATCH:
ax.plot(x, y, color=color, alpha=alpha, linestyle="-", zorder=1, linewidth=1)
else:
ax.plot(x, y, color=color, alpha=alpha, linestyle="-", zorder=0, linewidth=1)

# Get the amino acids if available
# - get the residue data from the original data array
Expand All @@ -142,7 +145,7 @@ def _draw(self):
colors = [color_codes[k] for k in sorted(color_codes.keys())]

# Plot the residue points
ax.scatter(coords[:, 0], coords[:, 1], marker='o', color=colors, edgecolors="none", zorder=1)
ax.scatter(coords[:, 0], coords[:, 1], marker='o', color=colors, edgecolors="none", zorder=2, s=15)

# Annotate some residue
# TODO: Use _plottools module to process this
Expand All @@ -151,15 +154,15 @@ def _draw(self):
space = 2 * np.pi / npoints
for i in np.arange(npoints):
label_coords[i] = [
(npoints + npoints / 10) * np.cos(space * i) - npoints / 20,
(npoints + npoints / 10) * np.sin(space * i) - npoints / 40
(npoints + npoints / 10) * np.cos(space * i) - npoints / 20 - 5,
(npoints + npoints / 10) * np.sin(space * i) - npoints / 40
]
for r in sorted(label_data)[::int(npoints / (npoints / 10))]:
i = r - self_data_range.min()
xy = x, y = coords[i]
xytext = label_coords[i]
ax.annotate(r, xy=xy, xytext=xytext)
ax.scatter(x, y, marker='o', facecolors="none", edgecolors="#000000", zorder=2)
ax.scatter(x, y, marker='o', facecolors="none", edgecolors="#000000", zorder=3, s=15)

# Arrow for the start
arrow_x, arrow_y = (npoints + npoints / 5, 0)
Expand Down

0 comments on commit 3c449e2

Please sign in to comment.