regionFinder | R Documentation |
Find regions for which a numeric vector is above (or below) predefined thresholds.
regionFinder(x, chr, pos, cluster = NULL, y = x, summary = mean,
ind = seq(along = x), order = TRUE, oneTable = TRUE,
maxGap = 300, cutoff=quantile(abs(x), 0.99),
assumeSorted = FALSE, verbose = TRUE)
x |
A numeric vector. |
chr |
A character vector with the chromosomes of each location. |
pos |
A numeric vector representing the genomic location. |
cluster |
The clusters of locations that are to be analyzed
together. In the case of microarrays, the cluster is many times
supplied by the manufacturer. If not available the function
|
y |
A numeric vector with same length as |
summary |
The function to be used to construct a summary of the |
ind |
an optional vector specifying a subset of observations to be used when finding regions. |
order |
if |
oneTable |
if |
maxGap |
If cluster is not provided this number will be used to define clusters
via the |
cutoff |
This argument is passed to |
assumeSorted |
This argument is passed to |
verbose |
Should the function be verbose? |
This function is used in the final steps of
bumphunter
. While bumphunter
does many things,
such as regression and permutation, regionFinder
simply finds
regions that are above a certain threshold (using
getSegments
) and summarizes them. The regions are found
based on x
and the summarized values are based on y
(which by default equals x
). The summary is used for the
ranking so one might, for example, use t-tests to find regions but
summarize using effect sizes.
If oneTable
is FALSE
it returns two tables otherwise it
returns one table. The rows of the table are regions. Information on
the regions is included in the columns.
Rafael A Irizarry
bumphunter
for the main usage of this function,
clusterMaker
for the typical input to the cluster
argument and getSegments
for a function used within
regionFinder
.
x <- seq(1:1000)
y <- sin(8*pi*x/1000) + rnorm(1000, 0, 0.2)
chr <- rep(c(1,2), each=length(x)/2)
tab <- regionFinder(y, chr, x, cutoff=0.8)
print(tab[tab$L>10,])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.