RLRanges is a subclass of GRanges, which stores R-loop peaks and metadata about the R-loop-mapping experiment, along with results from the analyses in RLSeq.

RLRanges(
  peaks = GenomicRanges::GRanges(),
  coverage = character(1),
  genome = character(1),
  mode = character(1),
  label = character(1),
  sampleName = "User-selected sample",
  qcol = NULL
)

Arguments

peaks

Path/URL to peak file or a GRanges object. This file should be in "broadPeak" format if possible. If not, then qcol should be specified.

coverage

Path/URL to the coresponding coverage file (in "bigWig" format). If not supplied, correlation tests will be skipped.

genome

UCSC genome ID. Acceptable types are listed in auxdata (available_genomes entry).

mode

Type of R-loop mapping from which peaks and coverage were derived. Acceptable types are listed in auxdata (available_modes entry). Can be unspecified.

label

"POS" (positive R-loop-mapping sample; e.g., DRIP-Seq S9.6 -RNH1) or "NEG" (negative control sample; e.g., DRIP-Seq S9.6 +RNH1 or Input). Can be unspecified.

sampleName

A unique name for identifying this sample. Can be unspecified.

qcol

The name of the metadata column which contains the score or significance of each peak. For broadPeak (preferred), this is the qvalue (column 11 after accounting for extra columns created during peakset building). If not specified, the last column will be chosen by default. NOTE: if supplying narrowPeak form peaks, the last column will NOT be appropriate and QCol should be specified as 11. If FALSE or if no metadata columns exist, it will be left blank and some operations in report() will not fully run.

Value

An object of class RLRanges. These objects are an extension of GRanges with the addition of sample metadata entries and RLResults.

Examples


# Example dataset
rlbase <- "https://rlbase-data.s3.amazonaws.com"
cvg <- file.path(rlbase, "coverage", "SRX7671349_hg38.bw")
pks <- system.file("extdata", "SRX7671349_hg38.broadPeak", package = "RLSeq")

# Get RLRanges object
rlr <- RLRanges(pks,
    coverage = cvg, genome = "hg38", label = "NEG",
    mode = "RDIP", sampleName = "RDIP-Seq +RNH1", qcol = 9
)
#> Column V7 out of 11 chosen as 'qcol'. Are you sure this is correct? View available columns with `colnames(as.data.frame(rlranges))`
#> Loading required package: BiocGenerics
#> 
#> Attaching package: ‘BiocGenerics’
#> The following objects are masked from ‘package:stats’:
#> 
#>     IQR, mad, sd, var, xtabs
#> The following objects are masked from ‘package:base’:
#> 
#>     Filter, Find, Map, Position, Reduce, anyDuplicated, append,
#>     as.data.frame, basename, cbind, colnames, dirname, do.call,
#>     duplicated, eval, evalq, get, grep, grepl, intersect, is.unsorted,
#>     lapply, mapply, match, mget, order, paste, pmax, pmax.int, pmin,
#>     pmin.int, rank, rbind, rownames, sapply, setdiff, sort, table,
#>     tapply, union, unique, unsplit, which.max, which.min
#> Loading required package: S4Vectors
#> Loading required package: stats4
#> 
#> Attaching package: ‘S4Vectors’
#> The following objects are masked from ‘package:base’:
#> 
#>     I, expand.grid, unname