compute_corr | R Documentation |
Compute correlation matrix on all peak files.
compute_corr(
peakfiles,
reference = NULL,
genome_build,
keep_chr = NULL,
drop_empty_chr = FALSE,
bin_size = 5000,
method = "spearman",
intensity_cols = c("total_signal", "qValue", "Peak Score", "score"),
return_bins = FALSE,
fill_diag = NA,
workers = check_workers(),
save_path = tempfile(fileext = ".corr.csv.gz")
)
peakfiles |
A list of peak files as GRanges object and/or as paths to
BED files. If paths are provided, EpiCompare imports the file as GRanges
object. EpiCompare also accepts a list containing a mix of GRanges objects
and paths.Files must be listed and named using |
reference |
A named list containing reference peak file(s) as GRanges
object. Please ensure that the reference file is listed and named
i.e. |
genome_build |
The build of **all** peak and reference files to calculate the correlation matrix on. If all peak and reference files are not of the same build use liftover_grlist to convert them all before running. Genome build should be one of hg19, hg38, mm9, mm10. |
keep_chr |
Which chromosomes to keep. |
drop_empty_chr |
Drop chromosomes that are not present in any of the
|
bin_size |
Default of 100. Base-pair size of the bins created to measure correlation. Use smaller value for higher resolution but longer run time and larger memory usage. |
method |
Default spearman (i.e. non-parametric). A character string indicating which correlation coefficient (or covariance) is to be computed. One of "pearson", "kendall", or "spearman": can be abbreviated. |
intensity_cols |
Depending on which columns are present, this value will be used to get quantiles and ultimately calculate the correlations:
|
return_bins |
If |
fill_diag |
Fill the diagonal of the overlap matrix. |
workers |
Number of threads to parallelize across. |
save_path |
Path to save a table of correlation results to. |
correlation matrix
data("CnR_H3K27ac")
data("CnT_H3K27ac")
data("encode_H3K27ac")
peakfiles <- list(CnR_H3K27ac=CnR_H3K27ac, CnT_H3K27ac=CnT_H3K27ac)
reference <- list("encode_H3K27ac"=encode_H3K27ac)
#increasing bin_size for speed but lower values will give more granular corr
corr_mat <- compute_corr(peakfiles = peakfiles,
reference = reference,
genome_build = "hg19",
bin_size = 200000,
workers = 1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.