mgeneSim: Similarity score genes based on pathways similarity

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

View source: R/mgeneSim.R

Description

Given two genes, calculates the Dice similarity between each pathway which is combined to obtain a similarity between the genes.

Usage

1
2
3
4
5
6
7
mgeneSim(genes, info, method = "max", ...)

## S4 method for signature 'character,GeneSetCollection'
mgeneSim(genes, info, method = "max", ...)

## S4 method for signature 'missing,GeneSetCollection'
mgeneSim(genes, info, method = "max", ...)

Arguments

genes

A vector of genes.

info

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

method

one of c("avg", "max", "rcmax", "rcmax.avg", "BMA", "reciprocal"), see Details.

...

Other arguments passed to combineScores

Details

Given the information about the genes and their pathways, uses the ids of the genes to find the Dice similarity score for each pathway comparison between the genes. Later this similarities are combined using combineScoresPar.

Value

mgeneSim returns the matrix of similarities between the genes in the vector

Methods (by class)

Note

genes accept named characters and the output will use the names of the genes.

See Also

geneSim, conversions help page to transform Dice score to Jaccard score. For the method to combine the scores see combineScoresPar.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
if (require("org.Hs.eg.db") & require("reactome.db")) {
   # Extract the paths of all genes of org.Hs.eg.db from KEGG
   # (last update in data of June 31st 2011)
   genes.kegg <- as.list(org.Hs.egPATH)
   # Extracts the paths of all genes of org.Hs.eg.db from reactome
   genes.react <- as.list(reactomeEXTID2PATHID)
   mgeneSim(c("81", "18", "10"), genes.react)
   mgeneSim(c("81", "18", "10"), genes.react, "avg")
   named_genes <- structure(c("81", "18", "10"),
                            .Names = c("ACTN4", "ABAT", "NAT2"))
   mgeneSim(named_genes, genes.react, "max")
} else {
    warning('You need reactome.db and org.Hs.eg.db package for this example')
}

Example output

If you use BioCor in published research, please cite:
Loading required package: org.Hs.eg.db
Loading required package: AnnotationDbi
Loading required package: stats4
Loading required package: BiocGenerics
Loading required package: parallel

Attaching package: 'BiocGenerics'

The following objects are masked from 'package:parallel':

    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
    clusterExport, clusterMap, parApply, parCapply, parLapply,
    parLapplyLB, parRapply, parSapply, parSapplyLB

The following objects are masked from 'package:stats':

    IQR, mad, sd, var, xtabs

The following objects are masked from 'package:base':

    Filter, Find, Map, Position, Reduce, anyDuplicated, append,
    as.data.frame, basename, cbind, colMeans, colSums, colnames,
    dirname, do.call, duplicated, eval, evalq, get, grep, grepl,
    intersect, is.unsorted, lapply, lengths, mapply, match, mget,
    order, paste, pmax, pmax.int, pmin, pmin.int, rank, rbind,
    rowMeans, rowSums, rownames, sapply, setdiff, sort, table, tapply,
    union, unique, unsplit, which, which.max, which.min

Loading required package: Biobase
Welcome to Bioconductor

    Vignettes contain introductory material; view with
    'browseVignettes()'. To cite Bioconductor, see
    'citation("Biobase")', and for packages 'citation("pkgname")'.

Loading required package: IRanges
Loading required package: S4Vectors

Attaching package: 'S4Vectors'

The following object is masked from 'package:base':

    expand.grid

Loading required package: reactome.db
           ACTN4       ABAT       NAT2
ACTN4 1.00000000 0.11387900 0.06404754
ABAT  0.11387900 1.00000000 0.05330413
NAT2  0.06404754 0.05330413 1.00000000

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