View source: R/transform_seg_table.R
transform_seg_table | R Documentation |
Transform Copy Number Table
transform_seg_table(
data,
genome_build = c("hg19", "hg38", "T2T", "mm10", "mm9", "ce11"),
ref_type = c("cytoband", "gene"),
values_fill = NA,
values_fn = function(x, ...) {
round(mean(x, ...))
},
resolution_factor = 1L
)
data |
a |
genome_build |
genome build version, used when |
ref_type |
annotation data type used for constructing matrix. |
values_fill |
Optionally, a (scalar) value that specifies what each
This can be a named list if you want to apply different fill values to different value columns. |
values_fn |
Optionally, a function applied to the value in each cell
in the output. You will typically use this when the combination of
This can be a named list if you want to apply different aggregations
to different |
resolution_factor |
an integer to control the resolution.
When it is |
a data.table
.
load(system.file("extdata", "toy_copynumber.RData",
package = "sigminer", mustWork = TRUE
))
# Compute the mean segVal in each cytoband
x <- transform_seg_table(cn, resolution_factor = 1)
x
# Compute the mean segVal in each half-cytoband
x2 <- transform_seg_table(cn, resolution_factor = 2)
x2
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.