mpathSim {BioCor} | R Documentation |
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
.
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, ...)
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 |
... |
Other arguments passed to |
The similarity between those pathways or all the similarities between each comparison.
pathways = character,info = GeneSetCollection,method = ANY
: Calculates the similarity between the provided pathways
of the GeneSetCollection using combineScoresPar
pathways = missing,info = GeneSetCollection,method = ANY
: Calculates all the similarities of the
GeneSetCollection and combine them using combineScoresPar
pathways = missing,info = list,method = ANY
: Calculates all the similarities of the list and
combine them using combineScoresPar
pathways = missing,info = list,method = missing
: Calculates all the similarities of the list
pathways
accept named characters, and then the output will have
the names
pathSim
For single pairwise comparison.
conversions
To convert the Dice similarity to Jaccard similarity
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') }