OrderedList (version 1.44.0)

compareLists: Compare Ordered Lists with Weighted Overlap Score

Description

The two orderings received as parameters are compared using the weighted overlap score and compared with a random distribution of that score (yielding an empirical p-value).

Usage

compareLists(ID.List1, ID.List2, mapping = NULL, two.sided=TRUE, B = 1000, alphas = NULL, invar.q = 0.5, min.weight = 1e-5, no.reverse=FALSE)

Arguments

ID.List1
first ordered list of identifiers to be compared.
ID.List2
second ordered list to be compared, must have the same length as ID.List1.
mapping
maps identifiers between the two lists. This is a matrix with two columns. All items in ID.List1 must match to exactly one entry of column 1 of the mapping, each element in ID.List2 must match exactly one element in column 2 of the mapping. If mapping is NULL, the two lists are expected to contain the same identifiers and there must be a one-to-one relationship between the two.
two.sided
whether the score is to be computed considering both ends of the list, or just the top members.
B
the number of permutations used to estimate empirical p-values.
alphas
a set of alpha candidates to be evaluated. If set to NULL, alphas are determined such that reasonable maximal ranks to be considered result.
invar.q
quantile of genes expected to be invariant. These are not used during shuffling, since they are expected to stay away from the ends of the lists, even when the data is perturbed to generate the NULL distribution. The default of 0.5 is reasonable for whole-genome gene expression analysis, but must be reconsidered when the compared lists are deduced from other sources.
min.weight
the minimal weight to be considered.
no.reverse
skip computing scores for reversed second list.

Value

An object of class listComparison is returned. It contains the following list elements:
n
the length of the lists
call
the input parameters
nn
the maximal number of genes corresponding to the alphas and the minimal weight
scores
scores for the straight list comparisons
revScores
scores for the reversed list comparison
pvalues
p-values for the straight list comparison
revPvalues
p-values for the reversed list comparison
overlap
number of overlapping identifiers per rank in straight comparison
revOverlap
number of overlapping identifiers per rank in reversed comparison
randomScores
random scores per weighting parameter
ID.List1
same as input ID.List1
ID.List2
same as input ID.List2
There are print and plot methods for listComparison objects. The plot method takes a parameter which to specify whether "overlap" or "density" is to be drawn.

Details

The two lists received as arguments are matched against each other according to the given mapping. The comparison is performed from both ends by default. Permutations of lists are used to generate random scores and compute empirical p-values. The evaluation is also performed for the case the lists should be reversed. From the resulting output, the set of overlapping list identifiers can be extracted using function getOverlap.

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, getOverlap

Examples

Run this code
### 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)

Run the code above in your browser using DataLab