View source: R/density.matrix.R
density.matrix | R Documentation |
A function (completely in R) that generates a matrix given a list of regions (.bed files) and signals (.bigWig files) alternative (even though more time consuming) to computeMatrix.deeptools. The output can be passed as it is to the functions plot.density.profile, plot.density.summary and, plot.density.differences.
## S3 method for class 'matrix'
density(
mode,
regions.list,
samples.list,
region.names = NULL,
sample.names = NULL,
sort.regions.coordinates = FALSE,
reference.point = "center",
reference.point.label = NULL,
upstream = 500,
downstream = 500,
body.length = 1000,
missing.data.as.zero = FALSE,
bin.size = 10,
binning.operation = "mean",
stranded = FALSE
)
mode |
A string indicating the method for the matrix computation:
|
regions.list |
A string vector with a list of full paths to bed files or list of data.frames in at least BED3 format (eg. generated by build.bed). |
samples.list |
A string vector with a list of full paths to bigWig files. |
region.names |
A string vector with the names of the regions. If |
sample.names |
A string vector with the names of the samples. If |
sort.regions.coordinates |
Logical value to define whether the output matrix should contain the regions sorted by genomic location for each region group (sorted by sort.bed). By default |
reference.point |
The reference point for the matrix generation could be either the region start ( |
reference.point.label |
A single string with the label for the reference point that could be used for the plots. |
upstream |
Distance, in bases (bp), upstream of the reference-point, in "reference-point" mode, or the region start, in "scale-regions" mode. By default |
downstream |
Distance, in bases (bp), downstream of the reference-point, in "reference-point" mode, or the region start, in "scale-regions" mode. By default |
body.length |
Distance, in bases (bp), to which all regions will be fit. By default: |
missing.data.as.zero |
A logical value to define whether missing data (NAs) should be treated as zeros. By default |
bin.size |
Length, in bases (bp), of the non-overlapping bins for averaging the score over the regions length. By default |
binning.operation |
A single string to define the type of statistic that should be used over the bin size range. The options are: "mean", "median", "sum". By default |
stranded |
Logical value to indicate whether the strand of the region should be taken into account. When |
The function returns a named list containing:
metadata
data.frame with the parameters used to build the matrix;
matrix.data
data.frame with the computed scores;
original.file.path
with the string: "Matrix generated by Rseb::density.matrix()".
This list can be passed as it is to the functions plot.density.profile, plot.density.summary and, plot.density.differences.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.