|
17 | 17 | #' begins at position 100, the junction would end at position |
18 | 18 | #' 99. |
19 | 19 | #' |
20 | | -#' @family splicejam data |
| 20 | +#' @family Splicejam data |
21 | 21 | #' |
22 | 22 | #' @examples |
23 | 23 | #' # The code below is used to create the junction test data |
|
38 | 38 | #' |
39 | 39 | #' # To plot junctions, use grl2df(..., shape="junction") |
40 | 40 | #' junc_df <- grl2df(test_junc_gr, shape="junction") |
41 | | -#' gg1 <- ggplot(junc_df, aes(x=x, y=y, group=id, fill=gr_name)) + |
| 41 | +#' gg1 <- ggplot2::ggplot(junc_df, |
| 42 | +#' ggplot2::aes(x=x, y=y, group=id, fill=gr_name)) + |
42 | 43 | #' ggforce::geom_diagonal_wide(alpha=0.7) + |
43 | 44 | #' colorjam::theme_jam() + |
44 | 45 | #' colorjam::scale_fill_jam() |
|
69 | 70 | #' begins at position 100, the junction would end at position |
70 | 71 | #' 99. |
71 | 72 | #' |
72 | | -#' @family splicejam data |
| 73 | +#' @family Splicejam data |
73 | 74 | #' |
74 | 75 | #' @examples |
75 | 76 | #' # The code below is used to create the junction test data |
|
88 | 89 | #' |
89 | 90 | #' # To plot junctions, use grl2df(..., shape="junction") |
90 | 91 | #' junc_wide_df <-grl2df(test_junc_wide_gr, shape="junction") |
91 | | -#' ggWide1 <- ggplot(junc_wide_df, aes(x=x, y=y, group=id, fill=gr_name)) + |
| 92 | +#' ggWide1 <- ggplot2::ggplot(junc_wide_df, |
| 93 | +#' ggplot2::aes(x=x, y=y, group=id, fill=gr_name)) + |
92 | 94 | #' ggforce::geom_diagonal_wide(alpha=0.7) + |
93 | 95 | #' colorjam::theme_jam() + |
94 | 96 | #' colorjam::scale_fill_jam() + |
95 | | -#' xlab("chr1") + |
96 | | -#' ggtitle("junctions (full intron width)") |
| 97 | +#' ggplot2::xlab("chr1") + |
| 98 | +#' ggplot2::ggtitle("junctions (full intron width)") |
97 | 99 | #' print(ggWide1); |
98 | 100 | #' |
99 | 101 | #' # The exons are required to define compressed ranges |
|
104 | 106 | #' ref2c <- make_ref2compressed(test_exon_wide_gr, |
105 | 107 | #' nBreaks=10); |
106 | 108 | #' ggWide1c <- ggWide1 + |
107 | | -#' scale_x_continuous(trans=ref2c$trans_grc) + |
108 | | -#' xlab("chr1 (compressed introns)") + |
109 | | -#' ggtitle("junctions (compressed introns, distorted)"); |
| 109 | +#' ggplot2::scale_x_continuous(trans=ref2c$trans_grc) + |
| 110 | +#' ggplot2::xlab("chr1 (compressed introns)") + |
| 111 | +#' ggplot2::ggtitle("junctions (compressed introns, distorted)"); |
110 | 112 | #' print(ggWide1c); |
111 | 113 | #' |
112 | 114 | #' # to fix the arc shapes, supply the transform to grl2df() |
113 | 115 | #' # Note: USE THESE STEPS |
114 | | -#' junc_wide_c_df <-grl2df(test_junc_wide_gr, |
| 116 | +#' junc_wide_c_df <- grl2df(test_junc_wide_gr, |
115 | 117 | #' shape="junction", |
116 | 118 | #' ref2c=ref2c); |
117 | | -#' ggWide1c2 <- ggplot(junc_wide_c_df, aes(x=x, y=y, group=id, fill=gr_name)) + |
| 119 | +#' ggWide1c2 <- ggplot2::ggplot(junc_wide_c_df, |
| 120 | +#' ggplot2::aes(x=x, y=y, group=id, fill=gr_name)) + |
118 | 121 | #' ggforce::geom_diagonal_wide(alpha=0.7) + |
119 | 122 | #' colorjam::theme_jam() + |
120 | 123 | #' colorjam::scale_fill_jam() + |
121 | | -#' scale_x_continuous(trans=ref2c$trans_grc) + |
122 | | -#' xlab("chr1 (compressed introns)") + |
123 | | -#' ggtitle("junctions (compressed introns)"); |
| 124 | +#' ggplot2::scale_x_continuous(trans=ref2c$trans_grc) + |
| 125 | +#' ggplot2::xlab("chr1 (compressed introns)") + |
| 126 | +#' ggplot2::ggtitle("junctions (compressed introns)"); |
124 | 127 | #' print(ggWide1c2); |
125 | 128 | #' |
126 | 129 | "test_junc_wide_gr" |
|
136 | 139 | #' exon for an arbitrary gene. It has one column of values, |
137 | 140 | #' `"gene_name"` used for Sashimi plot preparation. |
138 | 141 | #' |
139 | | -#' @family splicejam data |
| 142 | +#' @family Splicejam data |
140 | 143 | #' |
141 | 144 | #' @examples |
142 | 145 | #' # The code below is used to create the exon test data |
|
176 | 179 | #' exon for an arbitrary gene. It has one column of values, |
177 | 180 | #' `"gene_name"` used for Sashimi plot preparation. |
178 | 181 | #' |
179 | | -#' @family splicejam data |
| 182 | +#' @family Splicejam data |
180 | 183 | #' |
181 | 184 | #' @examples |
182 | 185 | #' # The code below is used to create the exon test data |
|
222 | 225 | #' with NumericList values representing RNA-seq read coverage |
223 | 226 | #' across these exons. |
224 | 227 | #' |
225 | | -#' @family splicejam data |
| 228 | +#' @family Splicejam data |
226 | 229 | #' |
227 | 230 | #' @examples |
228 | 231 | #' suppressPackageStartupMessages(library(GenomicRanges)); |
|
244 | 247 | #' exondf <- exoncov2polygon(test_cov_gr, covNames="sample_A"); |
245 | 248 | #' gg3 <- ggplot(exondf, |
246 | 249 | #' aes(x=x, y=y, group=gr, fill=gr, color=gr)) + |
247 | | -#' ggforce::geom_shape(alpha=0.8) + |
| 250 | +#' ggforce::geom_shape(alpha=0.8, |
| 251 | +#' stat="unpack_polygon") + |
248 | 252 | #' colorjam::theme_jam() + |
249 | 253 | #' colorjam::scale_fill_jam() + |
250 | 254 | #' colorjam::scale_color_jam(); |
|
275 | 279 | #' coverage data on a genomic scale. See examples |
276 | 280 | #' for steps to compress the intron sizes. |
277 | 281 | #' |
278 | | -#' @family splicejam data |
| 282 | +#' @family Splicejam data |
279 | 283 | #' |
280 | 284 | #' @examples |
281 | 285 | #' # The steps below demonstrate how to create coverage data manually |
|
291 | 295 | #' widecovdf <- exoncov2polygon(test_cov_wide_gr, covNames="sample_A"); |
292 | 296 | #' ggWide3 <- ggplot(widecovdf, |
293 | 297 | #' aes(x=x, y=y, group=gr, fill=gr, color=gr)) + |
294 | | -#' ggforce::geom_shape(alpha=0.7) + |
| 298 | +#' ggforce::geom_shape(alpha=0.7, |
| 299 | +#' stat="unpack_polygon") + |
295 | 300 | #' colorjam::theme_jam() + |
296 | 301 | #' colorjam::scale_fill_jam() + |
297 | 302 | #' colorjam::scale_color_jam(); |
|
0 commit comments