calcSignalRange: Calculate a score range for multiple signals

View source: R/plotMultiSignal.R

calcSignalRangeR Documentation

Calculate a score range for multiple signals

Description

Calculate a score range for multiple signals

Usage

calcSignalRange(
    data,
    chrom = NULL,
    chromstart = 1,
    chromend = .Machine$integer.max,
    assembly = "hg38",
    negData = FALSE)

Arguments

data

List of data to be plotted as character values specifying multiple bigwig file paths, dataframes in BED format, or GRanges objects with metadata column score.

chrom

Chromosome of data region ragne as a string, if range for a specific chromosome is desired.

chromstart

Integer start position on chromosome to get data range.

chromend

Integer end position on chromosome to get data range.

assembly

Default genome assembly as a string or a assembly object. Default value is assembly = "hg38".

negData

A logical value indicating whether any of the data has both positive and negative scores and the signal range should be adjusted accordingly. Default value is negData = FALSE.

Value

Returns a vector of length 2 with the calculated c(min, max) range.

Examples

library("plotgardenerData")
data("GM12878_ChIP_CTCF_signal")
data("IMR90_ChIP_CTCF_signal")
data("GM12878_ChIP_H3K27ac_signal")
data("IMR90_ChIP_H3K27ac_signal")

calcSignalRange(data = list(GM12878_ChIP_CTCF_signal, 
                            GM12878_ChIP_H3K27ac_signal, 
                            IMR90_ChIP_CTCF_signal, 
                            IMR90_ChIP_H3K27ac_signal),
                chrom = "chr21",
                chromstart = 28150000, chromend = 29150000,
                assembly = "hg38", negData = FALSE)


PhanstielLab/plotgardener documentation built on July 1, 2024, 7:06 p.m.