compareLists {OrderedList} | R Documentation |
The two orderings recieved as parameters are compared using the weighted overlap score and compared with a random distribution of that score (yielding an empirical p-value).
compareLists(ID.List1, ID.List2, mapping = NULL, two.sided=TRUE, B = 1000, alphas = NULL, min.weight = 1e-5)
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. |
min.weight |
the minimal weight to be considered. |
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
.
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.
Claudio Lottaz, Stefanie Scheid
Yang X, Bentink S, Scheid S, and Spang R (2006): Similarities of ordered gene lists, to appear in Journal of Bioinformatics and Computational Biology.
### 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)