Description Usage Arguments Details Value Note See Also Examples
View source: R/prepareParameters2.R
Prepare and normalize the parameters for functions with x and y parameters
1 |
function.name |
(character) The name of the function calling |
karyoplot |
(KaryoPlot) A karyoplot object. |
data |
A GRanges. It can be NULL or a GRanges. |
chr |
A character representing the chromosome names. |
x |
The position in the chromosome in number of bases. |
y |
The value to be plotted. |
ymax |
The maximum value of y |
ymin |
The minimum value of y |
r0 |
The start of the range to use for plotting |
r1 |
The end of the range to use for plotting |
data.panel |
The data panel to use |
filter.data |
A boolean indicating if data should be filtered so only data in visible chromosomes is kept. (defaults to TRUE, filter data) |
... |
Any additional parameter |
This function prepares and normalizes the parameters for plotting functions
with x and y parameters (as opposed to x0, x1, y0 and y1) so functions can
offer a richer interface while internally dealing only with standard and
simple code. It extracts the
positions from data
if available and applies the r0
and
r1
scaling. It returns the ready to plot values in a list with
only chr
, x
and y
. Individual parameters (chr
,
x
and y
) take precedence over data
. All parameters are
interpreted and used as explained in kpPoints
. It also filters
out any data points corresponding to chromosomes not present in the current
karyoplot.
A list with three values: chr
, x
and y
. Each of them
a vector of the same length with the normalized values to plot.
This function is only useful when creating custom plotting functions. It is not intended to the general user.
For detailed documentation on the parameters, see kpPoints
1 2 3 4 | kp <- plotKaryotype()
prepareParameters2("TestFunc", kp, data=NULL, chr="chr1", x=c(10, 20, 30), y=c(0, 1, 2), r0=0, r1=0.5, ymin=0, ymax=2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.