Skip to content
This repository has been archived by the owner. It is now read-only.

Commit

Permalink
Increased text size in BINDetect plot
Browse files Browse the repository at this point in the history
  • Loading branch information
msbentsen committed Jul 16, 2019
1 parent 4f346b5 commit 0c8a9dc
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 11 deletions.
3 changes: 3 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 0.6.3 (2019-07-16)
- Increased size of texts in BINDetect volcano plot and moved label into plot

## 0.6.2 (2019-06-19)
- Added --skip-excel option to skip excel overview per factor in BINDetect (can slow the run considerably for large output)
- Internal changes to BINDetect for better debug overview
Expand Down
2 changes: 1 addition & 1 deletion tobias/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.6.2"
__version__ = "0.6.3"
15 changes: 7 additions & 8 deletions tobias/footprinting/bindetect_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import matplotlib
import matplotlib.pyplot as plt
import matplotlib.gridspec as gridspec
import matplotlib.patches as patches
from matplotlib.backends.backend_pdf import PdfPages
from matplotlib.ticker import NullFormatter
from cycler import cycler
Expand Down Expand Up @@ -615,9 +616,13 @@ def plot_bindetect(motifs, cluster_obj, conditions, args):
ax1.scatter(coord[0], coord[1], color=diff_scores[TF]["color"], s=4.5)

if diff_scores[TF]["show"] == True:
txts.append(ax1.text(coord[0], coord[1], diff_scores[TF]["volcano_label"], fontsize=7))
txts.append(ax1.text(coord[0], coord[1], diff_scores[TF]["volcano_label"], fontsize=8))

adjust_text(txts, ax=ax1, text_from_points=True, arrowprops=dict(arrowstyle='-', color='black', lw=0.5)) #, expand_text=(0.1,1.2), expand_objects=(0.1,0.1))
#Plot custom legend for colors
legend_elements = [Line2D([0],[0], marker='o', color='w', markerfacecolor="red", label="Higher scores in {0}".format(conditions[0])),
Line2D([0],[0], marker='o', color='w', markerfacecolor="blue", label="Higher scores in {0}".format(conditions[1]))]
l = ax1.legend(handles=legend_elements, loc="lower left", framealpha=0.5)
adjust_text(txts, ax=ax1, add_objects=[l], text_from_points=True, arrowprops=dict(arrowstyle='-', color='black', lw=0.5)) #, expand_text=(0.1,1.2), expand_objects=(0.1,0.1))

"""
#Add arrows to other cluster members
Expand All @@ -637,12 +642,6 @@ def plot_bindetect(motifs, cluster_obj, conditions, args):
ax1.arrow(point_x, point_y, len_x, len_y, linestyle="-", color="black", lw=0.5)
"""
#print(txts)

#Plot custom legend for colors
legend_elements = [Line2D([0],[0], marker='o', color='w', markerfacecolor="red", label="Higher scores in {0}".format(conditions[0])),
Line2D([0],[0], marker='o', color='w', markerfacecolor="blue", label="Higher scores in {0}".format(conditions[1]))]
ax1.legend(handles=legend_elements, bbox_to_anchor=(1.05, 1), loc='upper left')

return(fig)

Expand Down
4 changes: 2 additions & 2 deletions tobias/utils/ngs.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@ class ReadList(list):
def __init__(self, data_array=[]):
list.__init__(self, data_array)

def __getitem__(self, sliced):
return ReadList(self[sliced])
#def __getitem__(self, sliced):
# return ReadList(self[sliced])

def from_bam(self, bam_obj, region):
try:
Expand Down

0 comments on commit 0c8a9dc

Please sign in to comment.