Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(2)  |  Call(1)  |  Derive(0)  |  Import(1)
Calculates pairwise semantic similarity scores between GO terms in a given annotation set

        def GOSet_Similarity(G, GO, metric="GS2", **kargs):
    """
    Calculates pairwise semantic similarity scores between GO terms in a given annotation set
    """
    
    if len(GO)<2:
        allD=list([1.])
    else:
        if metric=="GS2":
            allD=[ G.GS2([G.GOtoInt([g1]), G.GOtoInt([g2])])[0] for i,g1 in enumerate(GO) for j,g2 in enumerate(GO) if i 
    


src/a/i/AIGO-0.1.0/AIGO/Analyse.py   AIGO(Download)
from AIGO import logger, logFun
 
from AIGO.Similarity import GOSet_Similarity, GO_Similarity
 
class AnalyseFA(dict):
            allCoherence=dict()
            for a in FA.G.aspect:
                allCoherence[a]= [GOSet_Similarity(FA.G, FA.GPtoGO[a][g])[0] for g in FA.GPtoGO[a] ]
 
            allCoherence['All_aspects_of_GO'] = mean([mean(allCoherence[a]) for a in FA.G.aspect])