motif_scores=motif_scores.squeeze()
f=plt.figure(figsize=figsize)
plt.plot(motif_scores, "-o")
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:
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: