예제 #1
0
        fig.add_subplot(ax1)
        

        ax2 = ax1.twin()
        ax1.imshow(emat,interpolation='nearest')
        
        ax1.set_xlabel('Position w.r.t. transcription start site')
        ax1.set_yticks([0,1,2,3])
        ax1.set_yticklabels(['A','C','G','T'])


        # label positions with respect to transcription start site
        tick_start = int(start_dict[info_dict['exp_name']])+int(info_dict['mut_region_start'])
        tick_end = int(start_dict[info_dict['exp_name']])+int(info_dict['mut_region_start']) + int(info_dict['mut_region_length'])
        indices, xtick_labels = clean_up_xticklabels(tick_start,tick_end-tick_start)
        ax1.set_xticks(indices)
        ax1.set_xticklabels(xtick_labels)

        # put the sequence above it
        ax2.set_yticks([])
        ax2.set_yticklabels([])
        ax2.set_xticks(range(20))
        ax2.set_xticklabels([bp for bp in site_seq])
        #plt.title('$lac$ promoter, -35 region')
        if 'conditional' in infofn[namedict[fn]]:
            condbase = str(int(start_dict[info_dict['exp_name']]) + int(info_dict['condbase']))
            plt.text(0.5,1.25,'Conditional Matrix: ' + info_dict['condident'] + ' at ' + condbase, horizontalalignment='center', fontsize=12, transform = ax2.transAxes)
        else:
            plt.text(0.5,1.25,'Energy Matrix: ' + str(tick_start) + ' to ' + str(tick_end),horizontalalignment='center', fontsize=12, transform = ax2.transAxes)
        plt.show()
        plt.savefig(os.path.join(outputdir,fnname + 'emat' + str(tick_start) + ' to ' + str(tick_end) + '.pdf'))
예제 #2
0
        ax2 = ax1.twin()
        ax1.imshow(emat, interpolation='nearest')

        ax1.set_xlabel('Position w.r.t. transcription start site')
        ax1.set_yticks([0, 1, 2, 3])
        ax1.set_yticklabels(['A', 'C', 'G', 'T'])

        # label positions with respect to transcription start site
        tick_start = int(start_dict[info_dict['exp_name']]) + int(
            info_dict['mut_region_start'])
        tick_end = int(start_dict[info_dict['exp_name']]) + int(
            info_dict['mut_region_start']) + int(
                info_dict['mut_region_length'])
        indices, xtick_labels = clean_up_xticklabels(tick_start,
                                                     tick_end - tick_start)
        ax1.set_xticks(indices)
        ax1.set_xticklabels(xtick_labels)

        # put the sequence above it
        ax2.set_yticks([])
        ax2.set_yticklabels([])
        ax2.set_xticks(range(20))
        ax2.set_xticklabels([bp for bp in site_seq])
        #plt.title('$lac$ promoter, -35 region')
        if 'conditional' in infofn[namedict[fn]]:
            condbase = str(
                int(start_dict[info_dict['exp_name']]) +
                int(info_dict['condbase']))
            plt.text(0.5,
                     1.25,
                     'Conditional Matrix: ' + info_dict['condident'] + ' at ' +
예제 #3
0
for n in range(1, 4, 1):
    ax_wn = SubplotHost(fig, 1, 3, n)

    fig.add_subplot(ax_wn)
    ax_wn.set_xlim(700, 1700)
    x_wn = np.array([800, 1000, 1200, 1400, 1600])
    ax_wn.tick_params(axis='x',
                      direction='in',
                      labelsize=11,
                      labelbottom=False,
                      labeltop=True,
                      top=True,
                      bottom=False)
    ax_wn.tick_params(axis='y', left=False, labelleft=False)
    ax_wn.set_xticks(x_wn)

    ax_mn = ax_wn.twin(aux_trans)
    ax_mn.set_viewlim_mode("transform")
    #	x_micron=np.array([12, 10, 8, 6])
    #	ax_mn.set_xticks(x_micron)

    ax_mn.tick_params(axis='x',
                      direction='in',
                      labelsize=11,
                      labelbottom=True,
                      labeltop=False,
                      top=False,
                      bottom=True)
    ax_mn.tick_params(axis='y', right=False, labelright=False)