plt.xlabel("Sequence base")
//threshold motif scores at 0; any negative scores are noise that we do not need to visualize
if plt.ylim!=None:
plt.ylim(ylim)
if xlim!=None:
plt.xlim(xlim)
plt.title(title)
if show==True:
After Change
def plot_motif_scores(motif_scores,title="",figsize=(20,3),ylim=(0,20),xlim=None,axes=None):
//remove any redundant axes
motif_scores=motif_scores.squeeze()
if axes is None:
f,axes=plt.subplots(1,dpi=80,figsize=figsize)
show=True
else:
show=False
axes.plot(motif_scores, "-o")
axes.set_xlabel("Sequence base")
//threshold motif scores at 0; any negative scores are noise that we do not need to visualize
if ylim!=None:
axes.set_ylim(ylim)
if xlim!=None:
axes.set_xlim(xlim)
axes.set_title(title)
if show==True: