def run_in_out_acc_np(in_residues, dssp, g, folder):
    dssp.parseDSSP(
        'C:\\uday\\gmu\\correlations\\results\\10proteins\\acc\\NP_2IQH.dssp')
    residue_acc = dssp.getAllResAccForChain('A', delta=0)

    sav_in_network = []
    sav_out_network = []

    num_edges = []

    for key, value in residue_acc.items():
        if key in in_residues['np']:
            sav_in_network.append(int(value))
            num_edges.append(len(get_edges_from_graph(g, 'np', key)))
        else:
            sav_out_network.append(int(value))

    plot_util.plot_in_edges_acc(num_edges, sav_in_network, folder, 'np')

    ttest_result = stats.ttest_ind(sav_in_network,
                                   sav_out_network,
                                   equal_var=False)
    print('ttest for np ', ttest_result)

    if len(sav_in_network) > 0:
        avg_in_network = sum(sav_in_network) / len(sav_in_network)
    else:
        avg_in_network = 0.0

    avg_out_network = sum(sav_out_network) / len(sav_out_network)

    return avg_in_network, avg_out_network
def run_in_out_acc_ha(in_residues, dssp, g, folder):
    dssp.parseDSSP(
        'C:\\uday\\gmu\\correlations\\results\\10proteins\\acc\\HA_1RU7.dssp')
    residue_acc_a = dssp.getAllResAccForChain('A', delta=13)
    residue_acc_b = dssp.getAllResAccForChain('B', delta=-157)

    residue_acc = {}
    residue_acc.update(residue_acc_a)
    residue_acc.update(residue_acc_b)

    sav_in_network = []
    sav_out_network = []
    num_edges = []

    for key, value in residue_acc.items():
        if key in in_residues['ha']:
            sav_in_network.append(int(value))
            num_edges.append(len(get_edges_from_graph(g, 'ha', key)))
        else:
            sav_out_network.append(int(value))

    plot_util.plot_in_edges_acc(num_edges, sav_in_network, folder, 'ha')
    ttest_result = stats.ttest_ind(sav_in_network,
                                   sav_out_network,
                                   equal_var=False)
    print('ttest for ha ', ttest_result)

    avg_in_network = sum(sav_in_network) / len(sav_in_network)
    avg_out_network = sum(sav_out_network) / len(sav_out_network)

    return avg_in_network, avg_out_network
Exemplo n.º 3
0
def run_in_out_acc_ha(in_residues, dssp, g, folder):
    dssp.parseDSSP('HA_1RU7.dssp')
    residue_acc_a = dssp.getAllResAccForChain('A', delta=13)
    residue_acc_b = dssp.getAllResAccForChain('B', delta=-157)

    residue_acc = {}
    residue_acc.update(residue_acc_a)
    residue_acc.update(residue_acc_b)

    sav_in_network=[]
    sav_out_network=[]
    num_edges = []

    for key, value in residue_acc.items():
        if key in in_residues['ha']:
            sav_in_network.append(int(value))
            num_edges.append(len(get_edges_from_graph(g, 'ha', key)))
        else:
            sav_out_network.append(int(value))

    plot_util.plot_in_edges_acc(num_edges, sav_in_network, folder, 'ha')
    ttest_result = stats.ttest_ind(sav_in_network, sav_out_network, equal_var=False)
    print('ttest for ha ', ttest_result)
    print('average in-network ACC for HA ', sum(sav_in_network)/len(sav_in_network))
    print('average out-network ACC for HA ', sum(sav_out_network)/len(sav_out_network))
def run_in_out_acc_np(in_residues, dssp, g, folder):
    dssp.parseDSSP('C:\\uday\\gmu\\correlations\\results\\10proteins\\acc\\NP_2IQH.dssp')
    residue_acc = dssp.getAllResAccForChain('A', delta=0)

    sav_in_network=[]
    sav_out_network=[]

    num_edges = []

    for key, value in residue_acc.items():
        if key in in_residues['np']:
            sav_in_network.append(int(value))
            num_edges.append(len(get_edges_from_graph(g, 'np', key)))
        else:
            sav_out_network.append(int(value))

    plot_util.plot_in_edges_acc(num_edges, sav_in_network, folder, 'np')

    ttest_result = stats.ttest_ind(sav_in_network, sav_out_network, equal_var=False)
    print('ttest for np ', ttest_result)

    if len(sav_in_network) > 0:
        avg_in_network = sum(sav_in_network) / len(sav_in_network)
    else:
        avg_in_network = 0.0

    avg_out_network = sum(sav_out_network) / len(sav_out_network)

    return avg_in_network, avg_out_network
def run_in_out_acc_ha(in_residues, dssp, g, folder):
    dssp.parseDSSP('C:\\uday\\gmu\\correlations\\results\\10proteins\\acc\\HA_1RU7.dssp')
    residue_acc_a = dssp.getAllResAccForChain('A', delta=13)
    residue_acc_b = dssp.getAllResAccForChain('B', delta=-157)

    residue_acc = {}
    residue_acc.update(residue_acc_a)
    residue_acc.update(residue_acc_b)

    sav_in_network=[]
    sav_out_network=[]
    num_edges = []

    for key, value in residue_acc.items():
        if key in in_residues['ha']:
            sav_in_network.append(int(value))
            num_edges.append(len(get_edges_from_graph(g, 'ha', key)))
        else:
            sav_out_network.append(int(value))

    plot_util.plot_in_edges_acc(num_edges, sav_in_network, folder, 'ha')
    ttest_result = stats.ttest_ind(sav_in_network, sav_out_network, equal_var=False)
    print('ttest for ha ', ttest_result)

    avg_in_network = sum(sav_in_network)/len(sav_in_network)
    avg_out_network = sum(sav_out_network)/len(sav_out_network)

    return avg_in_network, avg_out_network
Exemplo n.º 6
0
def run_in_out_acc_ns1(in_residues, dssp, g, folder):
    dssp.parseDSSP('NS1_2GX9.dssp')
    residue_acc = dssp.getAllResAccForChain('A', delta=0)

    sav_in_network=[]
    sav_out_network=[]
    num_edges = []

    for key, value in residue_acc.items():
        if key in in_residues['ns1']:
            sav_in_network.append(int(value))
            num_edges.append(len(get_edges_from_graph(g, 'ns1', key)))
        else:
            sav_out_network.append(int(value))

    plot_util.plot_in_edges_acc(num_edges, sav_in_network, folder, 'ns1')
    ttest_result = stats.ttest_ind(sav_in_network, sav_out_network, equal_var=False)
    print('ttest for ns1 ', ttest_result)

    print('average in-network ACC for NS1 ', sum(sav_in_network)/len(sav_in_network))
    print('average out-network ACC for NS1 ', sum(sav_out_network)/len(sav_out_network))