mpathSim: Calculates the Dice similarity between pathways

Description Usage Arguments Value Methods (by class) Note See Also Examples

View source: R/mpathSim.R

Description

Calculates the similarity between several pathways using dice similarity score. If one needs the matrix of similarities between pathways set the argument methods to NULL.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
mpathSim(pathways, info, method = NULL, ...)

## S4 method for signature 'character,GeneSetCollection,ANY'
mpathSim(pathways, info, method = NULL, ...)

## S4 method for signature 'missing,GeneSetCollection,ANY'
mpathSim(pathways, info, method = NULL, ...)

## S4 method for signature 'missing,list,ANY'
mpathSim(pathways, info, method = NULL, ...)

## S4 method for signature 'missing,list,missing'
mpathSim(pathways, info, method = NULL, ...)

Arguments

pathways

Pathways to calculate the similarity for

info

A list of genes and the pathways they are involved or a GeneSetCollection object

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 combineScoresPar

Value

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

Methods (by class)

Note

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

See Also

pathSim For single pairwise comparison. conversions To convert the Dice similarity to Jaccard similarity

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
if (require("reactome.db")){
    genes.react <- as.list(reactomeEXTID2PATHID)
    (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)
    many_pathways <- sample(unique(unlist(genes.react)), 152)
    mpathSim(many_pathways, genes.react, "avg")
} else {
    warning('You need reactome.db package for this example')
}

BioCor documentation built on Nov. 8, 2020, 4:56 p.m.