Skip to content

Commit

Permalink
style: conform to BiocChceck recommedned coding style
Browse files Browse the repository at this point in the history
  • Loading branch information
AliSajid committed Sep 7, 2023
1 parent 82a0b2a commit 7883976
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 31 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ repos:
- id: style_files
name: Apply bioconductor style
entry: >
Rscript -e "styler::style_pkg(transformers = biocthis::bioc_style())"
Rscript -e "styler::style_pkg(transformers = styler::tidyverse_style(indent_by = 4))"
language: system
- id: lint_files
name: Apply lintr
Expand Down
9 changes: 4 additions & 5 deletions R/consensus_concordants.R
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,10 @@ target_rename <- function(input_names) {
#'
#' @examples
#' TRUE
consensus_concordants <- function(
...,
paired = FALSE,
cutoff = 0.321,
cell_line = NULL) {
consensus_concordants <- function(...,
paired = FALSE,
cutoff = 0.321,
cell_line = NULL) {
if (paired && length(list(...)) != 2L) {
stop("Paired analysis requires two data frames")
} else if (!paired && length(list(...)) != 1L) {
Expand Down
29 changes: 14 additions & 15 deletions R/investigate_signature.R
Original file line number Diff line number Diff line change
Expand Up @@ -29,21 +29,20 @@
#'
#' @examples
#' TRUE
investigate_signature <- function(
expr,
output_lib,
filter_threshold = NULL,
filter_prop = NULL,
similarity_threshold = 0.2,
paired = TRUE,
output_cell_lines = NULL,
gene_column = "Symbol",
logfc_column = "logFC",
pval_column = "PValue",
source_name = "Input",
source_cell_line = "NA",
source_time = "NA",
source_concentration = "NA") {
investigate_signature <- function(expr,
output_lib,
filter_threshold = NULL,
filter_prop = NULL,
similarity_threshold = 0.2,
paired = TRUE,
output_cell_lines = NULL,
gene_column = "Symbol",
logfc_column = "logFC",
pval_column = "PValue",
source_name = "Input",
source_cell_line = "NA",
source_time = "NA",
source_concentration = "NA") {
libs <- c("OE", "KD", "CP")

if (!output_lib %in% libs) {
Expand Down
9 changes: 4 additions & 5 deletions R/investigate_target.R
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,10 @@
#'
#' @examples
#' TRUE
investigate_target <- function(
target, input_lib, output_lib,
filter_threshold = 0.85, similarity_threshold = 0.321,
paired = TRUE, input_cell_lines = NULL,
output_cell_lines = NULL, discordant = FALSE) {
investigate_target <- function(target, input_lib, output_lib,
filter_threshold = 0.85, similarity_threshold = 0.321,
paired = TRUE, input_cell_lines = NULL,
output_cell_lines = NULL, discordant = FALSE) {
libs <- c("OE", "KD", "CP")

if (!input_lib %in% libs || !output_lib %in% libs) {
Expand Down
9 changes: 4 additions & 5 deletions R/prepare_signature.R
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,10 @@
#'
#' @examples
#' TRUE
prepare_signature <- function(
dge,
gene_column = "Symbol",
logfc_column = "logFC",
pval_column = "PValue") {
prepare_signature <- function(dge,
gene_column = "Symbol",
logfc_column = "logFC",
pval_column = "PValue") {
if (!gene_column %in% names(dge)) {
stop("gene_column should be present in the dataframe")
}
Expand Down

0 comments on commit 7883976

Please sign in to comment.