getOverlap: Extracting the Intersecting IDs From a listComparison Object

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

View source: R/getOverlap.R

Description

This function extracts the intersecting set of list identifiers from an object of class listComparison as output of function compareLists. The user has to specify the maximum rank to be considered to receive the intersecting set up to this rank.

Usage

1
2
3
4
getOverlap(x, max.rank = NULL, percent = 0.95)
## S3 method for class 'listComparisonOverlap'
plot(x, which="overlap", no.title=FALSE,  no.legend=FALSE,
     list.name1="List 1", list.name2="List 2", ...)

Arguments

x

An object of class listComparison.

max.rank

The maximum rank to be considered.

percent

The final list of overlapping genes consists of those probes that contribute a certain percentage to the overall similarity score. Default is percent=0.95. To get the full list of genes, set percent=1.

which

select what to draw, either 'overlap' or'scores'.

no.title

whether to generate a title automatically.

no.legend

whether to generate a legend automatically.

list.name1

A name for the first list provided to compareLists.

list.name2

A name for the second list provided to compareLists.

...

Further arguments passed on to generic plot.

Details

Function compareLists returns a list comparison for several choices of alpha. The number of genes to be taken into account differs dependent on alpha. One might now want to fix the number of genes and receive the resulting set of intersecting list identifiers. To this end, the user chooses a maximum rank to be considered from the values in column 'Genes' of the listComparison object. The direction (original or reversed) will internally be set to the direction yielding the higher similarity score.

If two.sided was TRUE, the first max.rank IDs on top of the lists and the first max.rank identifiers at the end of the lists are considered. If two.sided was FALSE, only the max.rank top identifiers are evaluated for overlap.

Value

An object of class listComparisonOverlap is returned. It contains the following list elements:

n

the length of the lists.

call

the parameters of the input object.

nn

the input max.rank.

score

the observed similarity score.

pvalue

p-values for the observed score.

overlaps

number of overlapping identifiers per rank.

randomScores

random scores for given parameters.

direction

numerical value. Returns '1' if the similarity score is higher for the originally ordered lists and '-1' if the score is higher for the comparison of one original to one reversed list.

intersect

Vector with the sorted overlapping list identifiers, which contribute percent to the overall similarity score.

There are print and plot methods for listComparisonOverlap objects. The plot method takes a parameter which to specify whether "overlap" or "scores" is to be drawn.

Author(s)

Claudio Lottaz, Stefanie Scheid

References

Yang X, Bentink S, Scheid S, and Spang R (2006): Similarities of ordered gene lists, to appear in Journal of Bioinformatics and Computational Biology.

See Also

OrderedList, compareLists

Examples

1
2
3
4
5
6
7
### Compare two artificial lists with some overlap
data(OL.data)
list1 <- as.character(OL.data$map$prostate)
list2 <- c(sample(list1[1:500]),sample(list1[501:1000]))
x <- compareLists(list1,list2)
x
getOverlap(x)

Example output

Loading required package: Biobase
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, cbind, colMeans, colSums, colnames, 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

Welcome to Bioconductor

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

Loading required package: twilight
Loading required package: splines
  Simulating random scores...
  0%.......:.........:.........:.........:......100%
  --------------------------------------------------
List comparison
  Assessing similarity of     : top and bottom ranks
  Length of lists             : 1000
  Quantile of invariant genes : 0.5
  Number of random samples    : 1000
--------------------------------------
      Genes      Scores p.values Rev.Scores Rev.p.values
0.115   100    1.073385    0.961   0.000000            1
0.077   150    7.490459    0.949   0.000000            1
0.058   200   24.187855    0.939   0.000000            1
0.038   300  104.685686    0.933   0.000000            1
0.029   400  272.780774    0.921   0.000000            1
0.023   500  559.029968    0.920   0.000000            1
0.015   750 1998.820224    0.923   7.062765            1
List comparison
  Assessing similarity of               : top and bottom ranks
  Length of lists                       : 1000
  Number of random samples              : 1000
----------------------------------------------------------
  Lists are more alike in direct order
  Chosen regularization parameter       : alpha = 0.023 ( 500 genes)
  Weighted overlap score                : 559.03
  Significance of similarity            : p-value = 0.92
  Score percentage for common entries   : 95
  Entries contributing score percentage : 313

OrderedList documentation built on Nov. 8, 2020, 5:41 p.m.