コード例 #1
0
ファイル: main.py プロジェクト: dhakim87/netseq
                    edgeAB.pairwiseScore3 = spectralPlotting.associateMassDeltasEps(
                        candidateDeltas, massDeltaValue, .02)

                totalPairwiseScore += edgeAB.pairwiseScore
                totalPairwiseScore2 += edgeAB.pairwiseScore2
                totalPairwiseScore3 += edgeAB.pairwiseScore3
                candidateEdgeList.append(edgeAB)

        candidateNetwork.pairwiseScore = totalPairwiseScore
        candidateNetwork.pairwiseScore2 = totalPairwiseScore2
        candidateNetwork.pairwiseScore3 = totalPairwiseScore3
        candidateNetwork.candidateEdges = candidateEdgeList

        #Using the set of edges in the candidate network, construct an Maximum Spanning Tree using pairwiseScore as the edge weight.
        maximalSpanningTree = MST.spanningTree(candidateEdgeList,
                                               lambda x: x.pairwiseScore,
                                               maximal=True)

        mstScore = 0
        for edge in maximalSpanningTree:
            mstScore += edge.pairwiseScore
        candidateNetwork.mstScore = mstScore
        candidateNetwork.mstEdges = maximalSpanningTree

    #Double check results before sending to bahar :D
    totalEdgesSG = 0
    for nodeID in group:
        totalEdgesSG += len(SG.nodes[nodeID].neighbors)

    for candidateNetwork in allSequences[1]:
        candidateSet = set([])