Ejemplo n.º 1
0
def plot_prots(elut, pids, baseid2inds, maxcount):
    import plotting as pl
    for i,pid in enumerate(pids):
        if pid in baseid2inds:
            for rowid in baseid2inds[pid]:
                row = elut.normarr[rowid]
                bottom = np.log2(maxcount)*i
                pl.bar(range(row.shape[1]),
                        np.clip(np.log2(row[0,:].T+.1),0,1000),
                        color=pl.COLORS[i%len(pl.COLORS)], align='center',width=1,linewidth=0,
                        bottom=bottom)
    pl.xlim(0,row.shape[1])
    pl.ylim(-.1, np.log2(maxcount)*len(pids))
Ejemplo n.º 2
0
def plot_big_single(arr, pids, baseid2inds, maxcount, startcol, colors=None):
    import plotting as pl
    colors = colors if colors is not None else pl.COLORS
    for i,pid in enumerate(pids):
        if pid in baseid2inds:
            for rowid in baseid2inds[pid]:
                row = arr[rowid]
                bottom = YSCALE*i
                plot_vals = np.clip(np.log2([x*100/maxcount for x in
                    row]),0,100)
                pl.bar([x+startcol for x in range(len(row))], plot_vals,
                        color=colors[i%len(colors)],
                        #color='k',
                        align='center',width=1,linewidth=0, bottom=bottom,
                        antialiased=False)
    pl.ylim(0,YSCALE*len(pids))