pathSim: Calculates the Dice similarity between pathways

Description Usage Arguments Details Value Note Author(s) See Also Examples

View source: R/pathSim.R

Description

Calculates the similarity between pathways using dice similarity score.

Usage

1
2
3
pathSim(pathway1, pathway2, info)

mpathSim(pathways, info, method = NULL, ...)

Arguments

pathway1, pathway2

A single pathway to calculate the similarity

info

A list of genes and the pathways they are involved.

pathways

Pathways to calculate the similarity for

method

To combine the scores of each pathway, one of c("avg", "max", "rcmax", "rcmax.avg", "BMA"), if NULL returns the matrix of similarities.

...

Other arguments passed to combineScores

Details

diceSim is used to calculate similarities between the two pathways.

mpathSim compares the similarity between several pathways and can use combineScores to extract the similarity between those pathways. If one needs the matrix of similarities between pathways set the argument methods to NULL.

Value

The similarity between those pathways or all the similarities between each comparison.

Note

pathways accept named characters, and then the output will have the names

Author(s)

Llu<c3><ad>s Revilla

See Also

diceSim and combineScores and conversions help page to transform Dice score to Jaccard score.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
if (require("reactome.db")){
    # Extracts the paths of all genes of org.Hs.eg.db from reactome
    genes.react <- as.list(reactomeEXTID2PATHID)
    (paths <- sample(unique(unlist(genes.react)), 2))
    pathSim(paths[1], paths[2], genes.react)

    (pathways <- sample(unique(unlist(genes.react)), 10))
    mpathSim(pathways, genes.react, NULL)
    named_paths <- structure(
        c("R-HSA-112310", "R-HSA-112316", "R-HSA-112315"),
        .Names = c("Neurotransmitter Release Cycle",
                   "Neuronal System",
                   "Transmission across Chemical Synapses"))
    mpathSim(named_paths, genes.react, NULL)
} else {
    warning('You need reactome.db package for this example')
}

Bioconductor-mirror/BioCor documentation built on May 29, 2017, 12:07 a.m.