コード例 #1
0
ファイル: Bb-plot.py プロジェクト: AbrahmAB/booleannet
def make_plot():
    run1, run2, t = util.bload( 'Bb-run.bin' )
    
    # take every 10th point
    step = 20
    run1 = skip(run1, step=step)
    run2 = skip(run2, step=step)
    t = skip(t, step=step)

    nodes = "EC PIC C PH IL12I IL12II".split()
    
    subplot(121)

    # drawing these first so that the symbols are under the other ones
    p1 = plot(t, run2['EC'], 'r^-', ms=7 )
    p2 = plot(t, run2['PIC'], 'r^-', ms=7 )
    
    p7 = plot(t, run1['EC'], 'b.-', ms=5 )
    p8 = plot(t, run1['PIC'], 'b--', ms=5 )
    
    xlabel( 'Time' )
    ylabel( 'Concentration' )
    title ( 'Innate Immune Response' )
    legend( [p1, p2, p7, p8], 'DEL-EC DEL-PIC WT-EC WT-PIC'.split(), loc='best')
    
    subplot(122)
   
    p3 = plot(t, run2['C'], 'r^-', ms=7 )
    p4 = plot(t, run2['PH'], 'ro-', ms=7 )
    p5 = plot(t, run2['IL12I'], 'r.-', ms=7 )
    p6 = plot(t, run2['IL12II'], 'rs-', ms=7 )
    
    p9 = plot(t, run1['C'], 'bo-', ms=5 )
    p10 = plot(t, run1['PH'] , 'bD-', ms=5 )
    p11 = plot(t, run1['IL12I'], 'b.-', ms=5 )
    p12 = plot(t, run1['IL12II'], 'b^-', ms=5 )
    
    xlabel( 'Time' )
    ylabel( 'Concentration' )
    title ( 'Adaptive Immune Response' )
    legend( [p3, p4, p5, p6, p9, p10, p11, p12], 'DEL-C DEL-PH DEL-IL12I DEL-IL12II WT-C WT-PH WT-IL12I WT-IL12II'.split(), loc='best')
コード例 #2
0
ファイル: LGL-plot.py プロジェクト: AbrahmAB/booleannet
def make_plot():
    
    # contains averaged node information based on 1000 runs
    data = util.bload( 'LGL-run.bin' )

    # each of these is a dictionary keyed by nodes
    run1, run2, run3, run4 = data 

    # applies smoothing to all values
    for run in (run1, run2, run3, run4):
        for key, values in run.items():
            run[key] = smooth( values, w=10 )
    
    #
    # Plotting Apoptosis
    #
    subplot(121)
    apop1, apop2, apop3, apop4 = run1['Apoptosis'], run2['Apoptosis'],run3['Apoptosis'],run4['Apoptosis']

    ps = [ plot( apop1, 'bo-' ), plot( apop2, 'ro-' ),plot(apop3,'b^-'),plot(apop4,'r^-') ]
    legend( ps, ['Normal-Apop', 'MCL1-over-Apop','sFas-over-Apop','LGL-like-Apop' ], loc='best' )
    title( ' Changes in Apoptosis' )
    xlabel( 'Time Steps' )
    ylabel( 'Percent (%)' )
    ylim( (-0.1, 1.1) ) 
    #
    # Plotting FasL and Ras
    #
    subplot(122)
    fasL1, fasL2 = run1['FasL'], run4['FasL']
    ras1, ras2 = run1['Ras'], run4['Ras']

    ps = [ plot( fasL1, 'bo-' ), plot( fasL2, 'ro-' ), plot( ras1, 'b^-' ), plot( ras2, 'r^-' ) ]
    legend( ps, 'Normal-FasL LGL-like-FasL Normal-Ras LGL-like-Ras'.split() , loc='lower left' )
    title( ' Changes in FasL and Ras' )
    xlabel( 'Time Steps' )
コード例 #3
0
def make_plot():

    # contains averaged node information based on 1000 runs
    data = util.bload('gene.bin')

    # each of these is a dictionary keyed by nodes
    run1, run2, run3, run4 = data

    # applies smoothing to all values
    for run in (run1, run2, run3, run4):
        for key, values in run.items():
            run[key] = smooth(values, w=10)

    #
    # Plotting Migration (ON)
    #
    fig = plt.figure(figsize=(4.5, 2.5), facecolor='w', edgecolor='k')
    plott = fig.add_subplot(111)
    mig1, mig2 = run1['Migration'], run2['Migration']
    mig3, mig4 = run3['Migration'], run4['Migration']

    ps = [
        plot(mig1, 'go-', markersize=3, linewidth=0.2),
        plot(mig2, 'ro-', markersize=3, linewidth=0.2),
        plot(mig3, 'g^-', markersize=3, linewidth=0.2),
        plot(mig4, 'r^-', markersize=3, linewidth=0.2)
    ]
    legend(['OE RHEB', 'OE DISC1', 'KO RHEB', 'KO DISC1'],
           loc='upper center',
           bbox_to_anchor=(0.5, -0.15),
           ncol=4,
           fontsize=7)
    ylim((-0.1, 1.1))
    xlim((-0.1, 140))
    title(
        ' Effect of perturbation of genes on migration \n Functional module 8, Simulation 2',
        fontsize=10)
    xlabel('Time Steps', fontsize=9)
    ylabel('Percent (%)', fontsize=9)
    plott.tick_params(axis='both', which='major', labelsize=8)
    plott.yaxis.set_ticks_position('left')
    plott.xaxis.set_ticks_position('bottom')
    savefig('RHEB_gene_Sim2_1-140.svg', transparent=True, bbox_inches='tight')
    savefig('RHEB_gene_Sim2_1-140.png', transparent=True, bbox_inches='tight')
    savefig('RHEB_gene_Sim2_1-140.pdf', transparent=True, bbox_inches='tight')

    # Plotting t=0 to t=20
    fig = figure(figsize=(2.25, 1.25), facecolor='w', edgecolor='k')
    plott = fig.add_subplot(111)
    mig1, mig2 = run1['Migration'], run2['Migration']
    mig3, mig4 = run3['Migration'], run4['Migration']

    ps = [
        plot(mig1, 'go-', markersize=2, linewidth=0.1),
        plot(mig2, 'ro-', markersize=2, linewidth=0.1),
        plot(mig3, 'g^-', markersize=2, linewidth=0.1),
        plot(mig4, 'r^-', markersize=2, linewidth=0.1)
    ]
    ylim((-0.1, 1.1))
    xlim((-0.1, 20))
    plott.tick_params(axis='both', which='major', labelsize=6)
    plott.yaxis.set_ticks_position('left')
    plott.xaxis.set_ticks_position('bottom')
    plott.spines['right'].set_visible(False)
    plott.spines['top'].set_visible(False)
    savefig('RHEB_gene_Sim2_1-20.svg', transparent=True, bbox_inches='tight')
    savefig('RHEB_gene_Sim2_1-20.png', transparent=True, bbox_inches='tight')
    savefig('RHEB_gene_Sim2_1-20.pdf', transparent=True, bbox_inches='tight')
コード例 #4
0
def make_plot():

    # contains averaged node information based on 1000 runs
    data = util.bload('TF1.bin')

    # each of these is a dictionary keyed by nodes
    run1, run2, run3, run4, run5, run6, run7, run8, run9, run10 = data

    # applies smoothing to all values
    for run in (run1, run2, run3, run4, run5, run6, run7, run8, run9, run10):
        for key, values in run.items():
            run[key] = smooth(values, w=10)

    #
    # Plotting Migration (ON)
    #
    fig = plt.figure(figsize=(4.5, 2.5), facecolor='w', edgecolor='k')
    plott = fig.add_subplot(111)
    mig1, mig2, mig3, mig4, mig5 = run1['Migration'], run2['Migration'], run3[
        'Migration'], run4['Migration'], run5['Migration']
    mig6, mig7, mig8, mig9, mig10 = run6['Migration'], run7['Migration'], run8[
        'Migration'], run9['Migration'], run10['Migration']
    ps = [
        plot(mig1, 'go-', markersize=3, linewidth=0.2),
        plot(mig2, 'ro-', markersize=3, linewidth=0.2),
        plot(mig3, 'bo-', markersize=3, linewidth=0.2),
        plot(mig4, 'yo-', markersize=3, linewidth=0.2),
        plot(mig5, 'co-', markersize=3, linewidth=0.2),
        plot(mig6, 'g^-', markersize=3, linewidth=0.2),
        plot(mig7, 'r^-', markersize=3, linewidth=0.2),
        plot(mig8, 'b^-', markersize=3, linewidth=0.2),
        plot(mig9, 'y^-', markersize=3, linewidth=0.2),
        plot(mig10, 'c^-', markersize=3, linewidth=0.2)
    ]

    legend([
        'OE CREB1', 'OE CCND1', 'OE KLF4', 'OE SMAD2', 'OE SMAD3', 'KO CREB1',
        'KO CCND1', 'KO KLF4', 'KO SMAD2', 'KO SMAD3'
    ],
           loc='upper center',
           bbox_to_anchor=(0.5, -0.15),
           ncol=4,
           fontsize=7)
    title(
        ' Effect of perturbation of TFs on migration \n Functional module 3, Simulation 4',
        fontsize=10)
    xlabel('Time Steps', fontsize=9)
    ylabel('Percent (%)', fontsize=9)
    ylim((-0.1, 1.1))
    xlim((-0.1, 140))
    plott.tick_params(axis='both', which='major', labelsize=8)
    plott.yaxis.set_ticks_position('left')
    plott.xaxis.set_ticks_position('bottom')
    savefig('CDK5_TF_Sim4_1-140_plot1.svg',
            transparent=True,
            bbox_inches='tight')
    savefig('CDK5_TF_Sim4_1-140_plot1.png',
            transparent=True,
            bbox_inches='tight')
    savefig('CDK5_TF_Sim4_1-140_plot1.pdf',
            transparent=True,
            bbox_inches='tight')
    #

    fig = figure(figsize=(2.25, 1.25), facecolor='w', edgecolor='k')
    plott = fig.add_subplot(111)
    mig1, mig2, mig3, mig4, mig5 = run1['Migration'], run2['Migration'], run3[
        'Migration'], run4['Migration'], run5['Migration']
    mig6, mig7, mig8, mig9, mig10 = run6['Migration'], run7['Migration'], run8[
        'Migration'], run9['Migration'], run10['Migration']
    ps = [
        plot(mig1, 'go-', markersize=2, linewidth=0.1),
        plot(mig2, 'ro-', markersize=2, linewidth=0.1),
        plot(mig3, 'bo-', markersize=2, linewidth=0.1),
        plot(mig4, 'yo-', markersize=2, linewidth=0.1),
        plot(mig5, 'co-', markersize=2, linewidth=0.1),
        plot(mig6, 'g^-', markersize=2, linewidth=0.1),
        plot(mig7, 'r^-', markersize=2, linewidth=0.1),
        plot(mig8, 'b^-', markersize=2, linewidth=0.1),
        plot(mig9, 'y^-', markersize=2, linewidth=0.1),
        plot(mig10, 'c^-', markersize=2, linewidth=0.1)
    ]
    ylim((-0.1, 1.1))
    xlim((-0.1, 20))
    plott.tick_params(axis='both', which='major', labelsize=6)
    plott.yaxis.set_ticks_position('left')
    plott.xaxis.set_ticks_position('bottom')
    plott.spines['right'].set_visible(False)
    plott.spines['top'].set_visible(False)
    savefig('CDK5_TF_Sim4_1-20_plot1.svg',
            transparent=True,
            bbox_inches='tight')
    savefig('CDK5_TF_Sim4_1-20_plot1.png',
            transparent=True,
            bbox_inches='tight')
    savefig('CDK5_TF_Sim4_1-20_plot1.pdf',
            transparent=True,
            bbox_inches='tight')
コード例 #5
0
def make_plot():

    # contains averaged node information based on 1000 runs
    data = util.bload('miRNA1.bin')

    # each of these is a dictionary keyed by nodes
    run1, run2, run3, run4, run5, run6, run7, run8, run9, run10, run11, run12 = data

    # applies smoothing to all values
    for run in (run1, run2, run3, run4, run5, run6, run7, run8, run9, run10,
                run11, run12):
        for key, values in run.items():
            run[key] = smooth(values, w=10)

    #
    # Plotting Migration (ON)
    #
    fig = figure(figsize=(4.5, 2.5), facecolor='w', edgecolor='k')
    plott = fig.add_subplot(111)
    mig1, mig2, mig3, mig4, mig5, mig6 = run1['Migration'], run2[
        'Migration'], run3['Migration'], run4['Migration'], run5[
            'Migration'], run6['Migration']
    mig7, mig8, mig9, mig10, mig11, mig12 = run7['Migration'], run8[
        'Migration'], run9['Migration'], run10['Migration'], run11[
            'Migration'], run12['Migration']
    ps = [ plot( mig1, 'go-',markersize=3, linewidth=0.2 ), plot( mig2, 'ro-', markersize=3, linewidth=0.2 ),plot( mig3,'bo-', markersize=3, linewidth=0.2),\
        plot( mig4, 'yo-', markersize=3, linewidth=0.2 ), plot( mig5, 'co-', markersize=3, linewidth=0.2 ), plot( mig6, color='orange', marker='o', linestyle='-', markersize=3, linewidth=0.2), \
        plot( mig7, 'g^-', markersize=3, linewidth=0.2 ), plot( mig8, 'r^-', markersize=3, linewidth=0.2 ), plot( mig9, 'b^-', markersize=3, linewidth=0.2 ), plot( mig10, 'y^-', markersize=3, linewidth=0.2 ), \
        plot( mig11, 'c^-' , markersize=3, linewidth=0.2), plot( mig12, color='orange', marker='^', linestyle='-', markersize=3, linewidth=0.2)]
    ylim((-0.1, 1.1))
    xlim((-0.1, 140))
    legend([
        'OE miR320a', 'OE miR223', 'OE miR155', 'OE miR106a', 'OE miR17',
        'OE miR130a', 'KO miR320a', 'KO miR223', 'KO miR155', 'KO miR106a',
        'KO miR17', 'KO miR130a'
    ],
           loc='upper center',
           bbox_to_anchor=(0.5, -0.18),
           ncol=4,
           fontsize=7)
    title(
        ' Effect of perturbation of miRNAs on migration \n Functional module 7, Simulation 2',
        fontsize=10)
    xlabel('Time Steps', fontsize=9)
    ylabel('Percent (%)', fontsize=9)
    plott.tick_params(axis='both', which='major', labelsize=8)
    plott.yaxis.set_ticks_position('left')
    plott.xaxis.set_ticks_position('bottom')
    savefig('SOX10_miRNA_Sim2_1-140-plot1.svg',
            transparent=True,
            bbox_inches='tight')
    savefig('SOX10_miRNA_Sim2_1-140-plot1.png',
            transparent=True,
            bbox_inches='tight')
    savefig('SOX10_miRNA_Sim2_1-140-plot1.pdf',
            transparent=True,
            bbox_inches='tight')
    # Plotting Migration (OFF)
    #
    fig = figure(figsize=(2.25, 1.25), facecolor='w', edgecolor='k')
    plott = fig.add_subplot(111)
    mig1, mig2, mig3, mig4, mig5, mig6 = run1['Migration'], run2[
        'Migration'], run3['Migration'], run4['Migration'], run5[
            'Migration'], run6['Migration']
    mig7, mig8, mig9, mig10, mig11, mig12 = run7['Migration'], run8[
        'Migration'], run9['Migration'], run10['Migration'], run11[
            'Migration'], run12['Migration']
    ps = [ plot( mig1, 'go-', markersize=2, linewidth=0.1 ), plot( mig2, 'ro-', markersize=2, linewidth=0.1 ),plot( mig3,'bo-', markersize=2, linewidth=0.1),plot( mig4, 'yo-', markersize=2, linewidth=0.1 ),\
        plot( mig5, 'co-', markersize=2, linewidth=0.1 ), plot( mig6, color='orange', marker='o', linestyle='-', markersize=2, linewidth=0.1 ), plot( mig7, 'g^-', markersize=2, linewidth=0.1 ), \
        plot( mig8, 'r^-', markersize=2, linewidth=0.1 ), plot( mig9, 'b^-', markersize=2, linewidth=0.1 ), plot( mig10, 'y^-', markersize=2, linewidth=0.1 ), plot( mig11, 'c^-', markersize=2, linewidth=0.1 ), \
        plot( mig12, color='orange', marker='^', linestyle='-', markersize=2, linewidth=0.1  )]
    ylim((-0.1, 1.1))
    xlim((-0.1, 20))
    plott.tick_params(axis='both', which='major', labelsize=6)
    plott.yaxis.set_ticks_position('left')
    plott.xaxis.set_ticks_position('bottom')
    plott.spines['right'].set_visible(False)
    plott.spines['top'].set_visible(False)
    savefig('SOX10_miRNA_Sim2_1-20-plot1.svg',
            transparent=True,
            bbox_inches='tight')
    savefig('SOX10_miRNA_Sim2_1-20-plot1.png',
            transparent=True,
            bbox_inches='tight')
    savefig('SOX10_miRNA_Sim2_1-20-plot1.pdf',
            transparent=True,
            bbox_inches='tight')