averageMatrixEdges {CNVScope} | R Documentation |
Average edges of a matrix to facilitate downsampling.
Description
Averages the columns and rows of a matrix by a certain amount.
Usage
averageMatrixEdges(unchangedmatrix, nedges = 1, dimension = c("row", "column"))
Arguments
unchangedmatrix |
A matrix to have edges averaged with genomic coordinates in the form chr1_50_100 set as the column and row names. |
nedges |
The number of edges to be averaged |
dimension |
Selectively averages edges in one dimension. Performs symmetric edge averaging by default. |
Value
averaged_matrix A matrix with edges averaged, which may be more amenable to downsampling
Examples
load(system.file("extdata","nbl_result_matrix_sign_small.rda",package = "CNVScope"))
dim(nbl_result_matrix_sign_small)
nbl_result_matrix_sign_small_avg<-averageMatrixEdges(nbl_result_matrix_sign_small,
nedges=1,dimension="row")
dim(nbl_result_matrix_sign_small_avg)
nbl_result_matrix_sign_small_avg<-averageMatrixEdges(nbl_result_matrix_sign_small,
nedges=1,dimension="column")
dim(nbl_result_matrix_sign_small_avg)
[Package CNVScope version 3.7.2 Index]