Given an ExpressionSet
or a matrix
of gene expressions, and the
indices of the genes of interest, genefinder
returns a list
of the
numResults
closest genes.
The user can specify one of the standard distance measures listed
below.
The number of values to return can be specified. The return value is a
list
with two components:
genes (measured through the desired distance method) to the genes
of interest (where X is the number of desired results returned) and
their distances.
1  genefinder(X, ilist, numResults=25, scale="none", weights, method="euclidean")

X 
A numeric 
ilist 
A 
numResults 
Number of results to display, starting from the least distance to the greatest. 
scale 
One of "none", "range", or "zscore". Scaling is carried out separately on each row. 
weights 
A vector of weights applied across the columns of

method 
One of "euclidean", "maximum", "manhattan", "canberra", "correlation", "binary". 
If the scale
option is "range", then the input matrix is scaled using
genescale()
. If it is "zscore", then the input matrix is scaled using
the scale
builtin with no arguments.
The method option specifies the metric used for gene comparisons. The
metric is applied, row by row, for each gene specified in ilist
.
The "correlation" option for the distance method will return a value equal to 1correlation(x).
See dist
for a more detailed description of the distances.
The returned value is a list
containing an entry for each gene
specified in ilist
. Each list
entry contains an array of
distances for that gene of interest.
J. Gentry and M. Kajen
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21  set.seed(12345)
#create some fake expression profiles
m1 < matrix (1:12, 4, 3)
v1 < 1
nr < 2
#find the 2 rows of m1 that are closest to row 1
genefinder (m1, v1, nr, method="euc")
v2 < c(1,3)
genefinder (m1, v2, nr)
genefinder (m1, v2, nr, scale="range")
genefinder (m1, v2, nr, method="manhattan")
m2 < matrix (rnorm(100), 10, 10)
v3 < c(2, 5, 6, 8)
nr2 < 6
genefinder (m2, v3, nr2, scale="zscore")

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.
Please suggest features or report bugs with the GitHub issue tracker.
All documentation is copyright its authors; we didn't write any of that.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.