Skip to content

Commit

Permalink
Reduce time for examples to run by using \donttest{}
Browse files Browse the repository at this point in the history
  • Loading branch information
arisp99 committed Aug 8, 2022
1 parent 4f1d7a6 commit 9ed128a
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 64 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ repos:
hooks:
- id: style-files
args: [--style_pkg=styler, --style_fun=tidyverse_style]
exclude: "filter.R"
exclude: ^R/chromosome-map.*
# - id: roxygenize
- id: use-tidy-description
- id: spell-check
Expand Down
23 changes: 5 additions & 18 deletions R/chromosome-map-deprecated.R
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,14 @@
#' @param ... <[`dynamic-dots`][rlang::dyn-dots]> Additional arguments passed to
#' internal plotting functions.
#'
#' @return A [chromoMap][chromoMap::chromoMap] or
#' [karyoploteR](https://bernatgel.github.io/karyoploter_tutorial/) object.
#'
#' @seealso [chromoMap::chromoMap()] [karyoploteR::plotKaryotype()]
#' @keywords internal
#' @export
#' @examples
#' \donttest{
#' probes <- tibble::tribble(
#' ~chrom, ~start, ~end, ~probe_set,
#' "chr14", 2342135L, 2342284L, "IBC",
Expand All @@ -52,28 +56,11 @@
#' "chr10", 93054L, 93223L, "IBC",
#' "chr7", 162127L, 162277L, "IBC"
#' )
#' single_probe <- tibble::tribble(
#' ~chrom, ~start, ~end, ~probe_set,
#' "chr14", 2342135L, 2342284L, "IBC",
#' "chr5", 482233L, 482391L, "IBC",
#' "chr9", 375274L, 375417L, "IBC",
#' "chr14", 1401991L, 1402160L, "IBC",
#' "chr10", 93054L, 93223L, "IBC",
#' "chr7", 162127L, 162277L, "IBC"
#' )
#'
#' chromosome_map(genome_Pf3D7, single_probe, "karyoploteR")
#' # ->
#' plot_karyoploteR(genome_Pf3D7, single_probe)
#'
#' chromosome_map(genome_Pf3D7, probes, "chromoMap")
#' # ->
#' plot_chromoMap(genome_Pf3D7, probes)
#'
#' chromosome_map(genome_Pf3D7, single_probe, "chromoMap", colours = "red")
#' # ->
#' plot_chromoMap(genome_Pf3D7, single_probe, colours = "red")
#'
#' chromosome_map(
#' genome_Pf3D7,
#' probes,
Expand All @@ -87,7 +74,7 @@
#' probes,
#' title = "Example Chromosome Map",
#' colours = c("#006A8EFF", "#A8A6A7FF", "#B1283AFF")
#' )
#' )}
chromosome_map <- function(genome,
probes,
map_pkg = c("chromoMap", "karyoploteR"),
Expand Down
16 changes: 3 additions & 13 deletions R/chromosome-map.R
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@
#' [karyoploteR](https://bernatgel.github.io/karyoploter_tutorial/) packages
#' to create custom chromosome maps.
#' @name chromosome-map
#' @examplesIf interactive()
#' @examples
#' \donttest{
#' probes <- tibble::tribble(
#' ~chrom, ~start, ~end, ~probe_set,
#' "chr14", 2342135L, 2342284L, "IBC",
Expand All @@ -46,26 +47,15 @@
#' "chr10", 93054L, 93223L, "IBC",
#' "chr7", 162127L, 162277L, "IBC"
#' )
#' single_probe <- tibble::tribble(
#' ~chrom, ~start, ~end, ~probe_set,
#' "chr14", 2342135L, 2342284L, "IBC",
#' "chr5", 482233L, 482391L, "IBC",
#' "chr9", 375274L, 375417L, "IBC",
#' "chr14", 1401991L, 1402160L, "IBC",
#' "chr10", 93054L, 93223L, "IBC",
#' "chr7", 162127L, 162277L, "IBC"
#' )
#'
#' plot_chromoMap(genome_Pf3D7, probes)
#' plot_chromoMap(genome_Pf3D7, single_probe, colours = "red")
#'
#' plot_karyoploteR(genome_Pf3D7, single_probe)
#' plot_karyoploteR(
#' genome_Pf3D7,
#' probes,
#' title = "Example Chromosome Map",
#' colours = c("#006A8EFF", "#A8A6A7FF", "#B1283AFF")
#' )
#' )}
NULL

#' @rdname chromosome-map
Expand Down
16 changes: 2 additions & 14 deletions man/chromosome-map.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 6 additions & 18 deletions man/chromosome_map.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 9ed128a

Please sign in to comment.