-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMOTIFBREAKR_plot.Rd
74 lines (67 loc) · 2.13 KB
/
MOTIFBREAKR_plot.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/MOTIFBREAKR_plot.R
\name{MOTIFBREAKR_plot}
\alias{MOTIFBREAKR_plot}
\title{Plot \pkg{motifbreakR} results}
\source{
\href{https://pubmed.ncbi.nlm.nih.gov/26272984/}{Publication}
\href{https://github.com/Simon-Coetzee/MotifBreakR}{GitHub}
\href{https://github.com/Simon-Coetzee/motifBreakR/issues/31}{Viewport bug}
}
\usage{
MOTIFBREAKR_plot(
mb_res,
mb_filter = NULL,
rsid = NULL,
effect = c("strong", "weak"),
results_dir = file.path(tempdir(), "results"),
height = 3,
width = 7,
verbose = TRUE
)
}
\arguments{
\item{mb_res}{Results generated by \link[echoannot]{MOTIFBREAKR}, in
\link[GenomicRanges]{GRanges} format.}
\item{mb_filter}{\link[GenomicRanges]{GRanges} object
used to filter \code{mb_res} before plotting.}
\item{rsid}{Character; the identifier of the variant to be visualized}
\item{effect}{Character; show motifs that are strongly effected \code{c("strong")},
weakly effected \code{c("weak")}, or both \code{c("strong", "weak")}}
\item{results_dir}{Directory where results should be saved
as a file named:
\emph{<results_dir>/_genome_wide/motifbreakR/motifbreakR_results.rds}.
If \code{NULL}, results will not be saved to disk.}
\item{height}{the height of the device.}
\item{width}{the width of the device.}
\item{verbose}{Print messages.}
}
\value{
Named list of motif plot paths.
}
\description{
Plot motif disruption results generated by \link[echoannot]{MOTIFBREAKR}.
}
\details{
\emph{Notes:}\cr
\itemize{
\item{Saving as a PDF seems to work much better than PNG format
(at least when using \pkg{grDevices}).
}
}
}
\examples{
library(BSgenome) ## <-- IMPORTANT!
library(BSgenome.Hsapiens.UCSC.hg19) ## <-- IMPORTANT!
#### Example fine-mapping results ####
merged_DT <- echodata::get_Nalls2019_merged()
#### Run motif analyses ####
mb_res <- MOTIFBREAKR(rsid_list = c("rs11175620"),
# limit the number of datasets tested
# for demonstration purposes only
pwmList_max = 5,
calculate_pvals = FALSE)
\dontrun{
plot_paths <- MOTIFBREAKR_plot(mb_res = mb_res)
}
}