Skip to content

Commit

Permalink
Checked Style. And temporarily removed CodeCov
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkusMuck committed Nov 11, 2024
1 parent a9b00ef commit 154a1ab
Show file tree
Hide file tree
Showing 41 changed files with 589 additions and 493 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -133,12 +133,12 @@ jobs:
arguments: '--no-check-bioc-views --no-check-bioc-help'
error-on: 'error'

- name: Test coverage
if: matrix.config.os == 'macOS-12' && matrix.config.bioc == 'devel'
run: |
install.packages("covr")
covr::codecov(token = "${{secrets.CODECOV_TOKEN}}")
shell: Rscript {0}
#- name: Test coverage
# if: matrix.config.os == 'macOS-12' && matrix.config.bioc == 'devel'
# run: |
# install.packages("covr")
# covr::codecov(token = "${{secrets.CODECOV_TOKEN}}")
# shell: Rscript {0}

- name: Deploy
if: github.event_name == 'push' && github.ref == 'refs/heads/devel' && matrix.config.deploy == 'yes'
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
.Rhistory
.RData
.Ruserdata
.github
inst/doc
22 changes: 11 additions & 11 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -34,30 +34,30 @@ Suggests:
knitr,
devtools,
qpdf,
BiocStyle,
ggplot2
BiocStyle
DEPENDS:
dplyr (>= 1.1.2),
GenomicRanges,
tidyr,
dplyr,
tidyselect,
stringr,
usethis,
utils
utils,
stats
Imports:
tidyr,
dplyr,
IRanges,
GenomicRanges,
tidyselect,
ggplot2,
purrr (>= 1.0.1),
readr (>= 2.1.2),
tibble (>= 3.2.1),
stats,
IRanges,
rlang,
GenomicRanges,
tidyselect,
dplyr,
tidyr,
here
URL:https://github.com/novartis/peakCombiner/,
URL:
https://github.com/novartis/peakCombiner/,
https://bioconductor.org/packages/peakCombiner
BugReports:https://github.com/novartis/peakCombiner/issues
Config/testthat/edition: 3
Expand Down
2 changes: 1 addition & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ export(combine_regions)
export(filter_regions)
export(prepare_input_regions)
import(here)
import(rlang)
import(tidyr)
importFrom(rlang,.data)
25 changes: 12 additions & 13 deletions R/center_expand_regions.R
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,13 @@
#' named `chrom`, `start`, `end`, `name`,
#' `score`, `strand`, `center`, `sample_name`. Additional
#' columns will be maintained.
#' @param center_by Allowed values are 'center_column' (default) or
#' @param center_by Allowed values are 'center_column' (default) or
#' 'midpoint'.
#' * 'center_column' uses the value stored in the column `center` to center.
#' * 'midpoint' replaces the value stored in the column `center` with the
#' mathematical mean of each genomic region (e.g., round(end - start / 2)),
#' * 'midpoint' replaces the value stored in the column `center` with the
#' mathematical mean of each genomic region (e.g., round(end - start / 2)),
#' which is then used.
#'
#'
#' @param expand_by Allowed values a numeric vector of length 1 or 2,
#' or 'NULL' (default).
#' * The value from the numeric vector of length 1
Expand Down Expand Up @@ -94,21 +94,21 @@
#'
#' @export
#'
#' @import rlang
#' @importFrom rlang .data
#' @import tidyr
#' @import here
#'
#' @examples
#' #Load in and prepare a an accepted tibble
#' # Load in and prepare a an accepted tibble
#' input_data <- peakCombiner::syn_data_bed
#' input_data
#'
#' #Prepare input data
#' # Prepare input data
#' data_prepared <- prepare_input_regions(
#' data = input_data,
#' show_messages = TRUE
#' )
#' #Run center and expand
#' # Run center and expand
#' data_center_expand <- center_expand_regions(
#' data = data_prepared,
#' center_by = "center_column",
Expand All @@ -118,7 +118,7 @@
#'
#' data_center_expand
#'
#' #You can choose to use the midpoint and predefined values to expand
#' # You can choose to use the midpoint and predefined values to expand
#'
#' data_center_expand <- center_expand_regions(
#' data = data_prepared,
Expand All @@ -133,7 +133,6 @@ center_expand_regions <- function(data,
center_by = "center_column",
expand_by = NULL,
show_messages = TRUE) {

### -----------------------------------------------------------------------###
### Show or hide messages
### -----------------------------------------------------------------------###
Expand All @@ -159,7 +158,7 @@ center_expand_regions <- function(data,
"i" = "Argument {.arg show_messages} is {.val {show_messages}}."
))
}

### -----------------------------------------------------------------------###
### Prepare parameters
### -----------------------------------------------------------------------###
Expand Down Expand Up @@ -229,12 +228,12 @@ center_expand_regions <- function(data,
### -----------------------------------------------------------------------###
### Center and expand
### -----------------------------------------------------------------------###

cli::cli_inform(c(
">" = "Genomic regions will be centered and expanded.",
" " = " "
))

if (center_by == "center_column") {
cli::cli_inform(c(
">" = "Starting with expanding genomic regions from the column {.field
Expand Down
1 change: 0 additions & 1 deletion R/center_expand_regions_helper.R
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

define_expansion <- function(data = data,
expand_by = expand_by) {

### -----------------------------------------------------------------------###
### Pre-Check up
### -----------------------------------------------------------------------###
Expand Down
1 change: 0 additions & 1 deletion R/check_data_structure.R
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#' [peakCombiner::combine_regions()].
#'
check_data_structure <- function(data) {

### -----------------------------------------------------------------------###
### Define variables
### -----------------------------------------------------------------------###
Expand Down
9 changes: 4 additions & 5 deletions R/combine_regions.R
Original file line number Diff line number Diff line change
Expand Up @@ -93,13 +93,13 @@
#' [peakCombiner::center_expand_regions] and [peakCombiner::filter_regions].
#'
#' @export
#'
#' @import rlang
#'
#' @importFrom rlang .data
#' @import tidyr
#' @import here
#'
#'
#' @examples
#' #Load in and prepare a an accepted tibble
#' # Load in and prepare a an accepted tibble
#' input_data <- peakCombiner::syn_data_bed
#' input_data
#'
Expand All @@ -124,7 +124,6 @@ combine_regions <- function(data,
annotate_with_input_names = FALSE,
combined_sample_name = NULL,
show_messages = TRUE) {

### -----------------------------------------------------------------------###
### Correct parameters & load needed variables
### -----------------------------------------------------------------------###
Expand Down
20 changes: 9 additions & 11 deletions R/combine_regions_helper.R
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#'
cr_disjoin_filter <- function(data,
found_in_samples) {

### -----------------------------------------------------------------------###
### Pre-Check up
### -----------------------------------------------------------------------###
Expand Down Expand Up @@ -100,11 +99,13 @@ cr_disjoin_filter <- function(data,
dplyr::ungroup() |>
tidyr::unnest("revmap") |>
dplyr::rename(chrom = "seqnames") |>
dplyr::left_join(data |>
tibble::rownames_to_column(var = "revmap") |>
dplyr::mutate(revmap = as.integer(.data$revmap)) |>
dplyr::select("revmap", "sample_name"),
by = "revmap")
dplyr::left_join(
data |>
tibble::rownames_to_column(var = "revmap") |>
dplyr::mutate(revmap = as.integer(.data$revmap)) |>
dplyr::select("revmap", "sample_name"),
by = "revmap"
)

data_disjoin_meta <- data_disjoin |>
dplyr::left_join(
Expand Down Expand Up @@ -186,7 +187,6 @@ cr_disjoin_filter <- function(data,
#'
#'
cr_reduce <- function(data) {

### -----------------------------------------------------------------------###
### Correct parameters & load needed variables
### -----------------------------------------------------------------------###
Expand Down Expand Up @@ -298,7 +298,6 @@ cr_reduce <- function(data) {
#'
cr_overlap_with_summits <- function(data,
input) {

### -----------------------------------------------------------------------###
### Correct parameters & load needed variables
### -----------------------------------------------------------------------###
Expand Down Expand Up @@ -452,9 +451,9 @@ cr_overlap_with_summits <- function(data,
#'
#' In addition, the output data.frame columns `sample_name`, `name` and `score`
#' will be updated.
#'
#'
#' @inheritParams combine_regions
#'
#'
#' @param input The original input file from `combine_regions` to extract center
#' information
#'
Expand All @@ -466,7 +465,6 @@ cr_add_summit <- function(data,
combined_center = "nearest",
annotate_with_input_names = FALSE,
combined_sample_name = NULL) {

### -----------------------------------------------------------------------###
### Correct parameters & load needed variables
### -----------------------------------------------------------------------###
Expand Down
Loading

0 comments on commit 154a1ab

Please sign in to comment.