Sim_Wang_2007

Sim_Wang_2007(
  dag,
  terms,
  contribution_factor = c(is_a = 0.8, part_of = 0.6),
  calc_by = "igraph",
  verbose = simona_opt$verbose
)

Methods

Sim_Wang_2007

First, S-value of an ancestor term c on a term a (S(c->a)) is calculated (the definition of the S-value can be found in the help page of term_IC()). Similar to the Sim_AIC_2014, aggregation only to common ancestors, to a's ancestors and to b's ancestors are calculated.

SV_{common ancestors} = sum_{c in common ancestors}(S(c->a) + S(c->b))
SV_a = sum{a' in a's ancestors}(S(a'->a))
SV_b = sum{b' in b's ancestors}(S(b'->b))

Then the similarity is calculated as:

sim = SV_{common_ancestors}*2/(SV_a + SV_b)

Paper link: doi:10.1093/bioinformatics/btm087 .

The contribution of different semantic relations can be set with the contribution_factor parameter. The value should be a named numeric vector where names should cover the relations defined in relations set in create_ontology_DAG(). For example, if there are two relations "relation_a" and "relation_b" set in the DAG, the value for contribution_factor can be set as:

term_sim(dag, terms, method = "Sim_Wang_2007", 
    control = list(contribution_factor = c("relation_a" = 0.8, "relation_b" = 0.6)))