forked from PhanstielLab/plotgardener
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbb_annoLoops.Rd
57 lines (47 loc) · 2.51 KB
/
bb_annoLoops.Rd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/bb_annoLoops.R
\name{bb_annoLoops}
\alias{bb_annoLoops}
\title{Annotate DNA loops in a Hi-C plot}
\usage{
bb_annoLoops(hicPlot, bedpeData)
}
\arguments{
\item{hicPlot}{Hi-C plot object from \code{bb_plotHicSquare} or \code{bb_plotHicTriangle} on which to annotate loops.}
\item{bedpeData}{A string specifying the BEDPE file path or a dataframe in BEDPE format specifying loop positions.}
\item{type}{Character value specifying type of annotation. Default value is \code{type = "box"}. Options are:
\itemize{
\item{\code{"box"}: }{Boxes are drawn around each loop.}
\item{\code{"circle"}: }{Circles are drawn around each loop.}
\item{\code{"arrow"}: }{Arrows are drawn pointing to each loop.}
}}
\item{half}{Character value specifying which half of hic plots to annotate. Triangle Hi-C plots will always default to the entirety of the triangular plot. Default value is \code{half = "inherit"}. Options are:
\itemize{
\item{\code{"inherit"}: }{Loops will be annotated on the \code{half} inherited by the input Hi-C plot.}
\item{\code{"both"}: }{Loops will be annotated on both halves of the diagonal of a square Hi-C plot.}
\item{\code{"top"}: }{Loops will be annotated on the upper diagonal half of a square Hi-C plot.}
\item{\code{"bottom"}: }{Loops will be annotated ont the bottom diagonal half of a square Hi-C plot.}
}}
\item{shift}{Numeric specifying the number of pixels on either end of loop in a box or circle. Numeric specifying number of pixels for the length of an arrow.}
\item{params}{An optional \link[BentoBox]{bb_assembly} object containing relevant function parameters.}
\item{...}{Additional grid graphical parameters. See \link[grid]{gpar}.}
}
\value{
Returns a \code{bb_loops} object containing relevant genomic region, placement, and \link[grid]{grob} information.
}
\description{
Annotate DNA loops in a Hi-C plot
}
\examples{
## Load Hi-C data and BEDPE data
data("bb_hicData")
data("bb_bedpeData")
## Create BentoBox page
bb_pageCreate(width = 3, height = 3, default.units = "inches", xgrid = 0, ygrid = 0)
## Plot and place a square Hi-C plot
hicPlot <- bb_plotHicSquare(hicData = bb_hicData, resolution = 10000, zrange = c(0, 70),
chrom = "chr21", chromstart = 28000000, chromend = 30300000,
x = 0, y = 0, width = 3, height = 3, just = c("left", "top"), default.units = "inches")
## Annotate loops of Hi-C plot
bb_annoLoops(hicPlot = hicPlot, bedpeData = bb_bedpeData, type = "box", half = "both")
}