diff --git a/R/create_fit_dataset.R b/R/create_fit_dataset.R index 1f3643c..4c47140 100644 --- a/R/create_fit_dataset.R +++ b/R/create_fit_dataset.R @@ -26,8 +26,8 @@ create_fit_dataset <- function(kin_dat, fit_k_params, control = list(maxiter = 1000, scale = "levenberg"), - trace = F, - fractional = F, + trace = FALSE, + fractional = FALSE, workflow = 321){ peptide_list <- kin_dat %>% diff --git a/R/fit_1_exp.R b/R/fit_1_exp.R index ed76b6d..ecfc97b 100644 --- a/R/fit_1_exp.R +++ b/R/fit_1_exp.R @@ -6,8 +6,8 @@ fit_1_exp <- function(fit_dat, control, fit_k_params, - fractional = T, - trace = F){ + fractional = TRUE, + trace = FALSE){ if(length(unique(fit_dat[["Sequence"]])) > 1){ diff --git a/R/fit_2_exp.R b/R/fit_2_exp.R index 211a2d3..7cf1207 100644 --- a/R/fit_2_exp.R +++ b/R/fit_2_exp.R @@ -5,8 +5,8 @@ fit_2_exp <- function(fit_dat, control, fit_k_params, - fractional = T, - trace = F){ + fractional = TRUE, + trace = FALSE){ if(length(unique(fit_dat[["Sequence"]])) > 1){ stop("More than one sequence in supplied data!") diff --git a/R/fit_3_exp.R b/R/fit_3_exp.R index 4e6231d..fdadbde 100644 --- a/R/fit_3_exp.R +++ b/R/fit_3_exp.R @@ -7,8 +7,8 @@ fit_3_exp <- function(fit_dat, control, fit_k_params, - fractional = T, - trace = F){ + fractional = TRUE, + trace = FALSE){ if(length(unique(fit_dat[["Sequence"]])) > 1){ stop("More than one sequence in supplied data!") diff --git a/R/get_fit_results.R b/R/get_fit_results.R index c38fff3..8344d0b 100644 --- a/R/get_fit_results.R +++ b/R/get_fit_results.R @@ -2,9 +2,9 @@ get_fit_results <- function(fit_dat, fit_k_params, control = list(maxiter = 1000, scale = "levenberg"), - trace = F, + trace = FALSE, workflow = 31, - fractional = T, + fractional = TRUE, edge_times = c(min(fit_dat[["Exposure"]]), max(fit_dat[["Exposure"]]))){ workflow <- match.arg(as.character(workflow), choices = c(31, 21, 321)) diff --git a/R/plot_cov_class.R b/R/plot_cov_class.R index 3bb40c3..81f9324 100644 --- a/R/plot_cov_class.R +++ b/R/plot_cov_class.R @@ -24,8 +24,8 @@ #' #' @export plot_cov_class <- function(fit_values, - fractional = T, - interactive = F){ + fractional = TRUE, + interactive = FALSE){ ## levels diff --git a/R/plot_double_uc.R b/R/plot_double_uc.R index 2ab399e..199866d 100644 --- a/R/plot_double_uc.R +++ b/R/plot_double_uc.R @@ -29,8 +29,8 @@ plot_double_uc <- function(fit_dat, fit_values, - replicate = F, - fractional = T){ + replicate = FALSE, + fractional = TRUE){ plot_left <- plot_fitted_uc(fit_dat = fit_dat, fit_values = fit_values, diff --git a/R/plot_estimated_k.R b/R/plot_estimated_k.R index e974324..4effa10 100644 --- a/R/plot_estimated_k.R +++ b/R/plot_estimated_k.R @@ -23,7 +23,7 @@ #' @export plot_estimated_k <- function(hires_params, - interactive = F){ + interactive = FALSE){ if(interactive){ sel_points <- geom_point_interactive(aes(x = position, y = k_est, diff --git a/R/plot_fitted_uc.R b/R/plot_fitted_uc.R index dbd69d1..2608356 100644 --- a/R/plot_fitted_uc.R +++ b/R/plot_fitted_uc.R @@ -31,9 +31,9 @@ #' @export plot_fitted_uc <- function(fit_dat, fit_values, - replicate = F, - fractional = T, - interactive = F){ + replicate = FALSE, + fractional = TRUE, + interactive = FALSE){ plot_title <- paste0(fit_values[["sequence"]], " (", fit_values[["start"]], "-", fit_values[["end"]], ") ") diff --git a/R/plot_hires.R b/R/plot_hires.R index 0d1f30b..cef4e93 100644 --- a/R/plot_hires.R +++ b/R/plot_hires.R @@ -26,7 +26,7 @@ #' @export plot_hires <- function(hires_params, - interactive = F){ + interactive = FALSE){ if(interactive){ @@ -97,7 +97,7 @@ plot_hires <- function(hires_params, #' @export create_monotony <- function(hires_params, - fractional = T){ + fractional = TRUE){ lapply(c(2:nrow(hires_params)), function(i){ @@ -133,8 +133,8 @@ plot_monotony <- function(mono_dat){ #' #' @export plot_hires_components <- function(hires_params, - fractional = F, - interactive = F){ + fractional = FALSE, + interactive = FALSE){ protein_length = max(hires_params[["position"]]) diff --git a/R/plot_lm.R b/R/plot_lm.R index 4a7c6df..a78f83a 100644 --- a/R/plot_lm.R +++ b/R/plot_lm.R @@ -23,7 +23,7 @@ plot_lm <- function(fit_dat, class_name = NA, - interactive = T){ + interactive = TRUE){ sequence <- unique(fit_dat[["Sequence"]]) start <- unique(fit_dat[["Start"]]) diff --git a/R/plot_n.R b/R/plot_n.R index 298894d..4303583 100644 --- a/R/plot_n.R +++ b/R/plot_n.R @@ -22,8 +22,8 @@ #' #' @export plot_n <- function(list_params, - fractional = F, - interactive = F){ + fractional = FALSE, + interactive = FALSE){ if(fractional){ diff --git a/R/plot_params_map.R b/R/plot_params_map.R index 41c689b..78afcf1 100644 --- a/R/plot_params_map.R +++ b/R/plot_params_map.R @@ -10,7 +10,7 @@ #' #' @export plot_params_map <- function(fit_values, - interactive = F){ + interactive = FALSE){ if(interactive){ sel_points <- geom_point_interactive(aes(x = dom_exp, y = sec_dom_exp, diff --git a/R/plot_rss_hist.R b/R/plot_rss_hist.R index 9d6e50e..4df9851 100644 --- a/R/plot_rss_hist.R +++ b/R/plot_rss_hist.R @@ -19,7 +19,7 @@ #' #' @export plot_rss_hist <- function(fit_values, - interactive = F){ + interactive = FALSE){ if(interactive){ sel_histogram <- geom_histogram_interactive(aes(x = rss, diff --git a/R/plot_singular_uc.R b/R/plot_singular_uc.R index f23824f..b7ef6a2 100644 --- a/R/plot_singular_uc.R +++ b/R/plot_singular_uc.R @@ -23,10 +23,10 @@ plot_singular_uc <- function(fit_dat, fit_values, - include_uc = T, - replicate = F, - fractional = T, - interactive = F){ + include_uc = TRUE, + replicate = FALSE, + fractional = TRUE, + interactive = FALSE){ plot_title <- paste0(unique(fit_values[["sequence"]]), " (", unique(fit_values[["start"]]), "-", unique(fit_values[["end"]]), ") ") diff --git a/R/recreate_uc.R b/R/recreate_uc.R index d72c18b..4b75a38 100644 --- a/R/recreate_uc.R +++ b/R/recreate_uc.R @@ -16,7 +16,7 @@ #' calculate_uc_from_hires_peptide <- function(fit_dat, ## uc filtered dat fit_values_all, ## fit unfiltered - fractional = T, + fractional = TRUE, hires_method = c("shortest", "weighted")){ # hires_method <- "weighted" @@ -26,7 +26,7 @@ calculate_uc_from_hires_peptide <- function(fit_dat, ## uc filtered dat peptide_start <- unique(fit_dat[["Start"]]) peptide_end <- unique(fit_dat[["End"]]) - hires <- calculate_hires(fit_values_all, method = hires_method, fractional = T) + hires <- calculate_hires(fit_values_all, method = hires_method, fractional = fractional) fit_values <- filter(fit_values_all, sequence == peptide_sequence, @@ -78,7 +78,7 @@ calculate_uc_from_hires_peptide <- function(fit_dat, ## uc filtered dat #' @export create_uc_from_hires_dataset <- function(kin_dat, fit_values_all, - fractional = T, + fractional = TRUE, hires_method = c("shortest", "weighted")){ peptide_list <- unique(select(kin_dat, ID, Sequence, Start, End)) @@ -89,7 +89,7 @@ create_uc_from_hires_dataset <- function(kin_dat, calculate_uc_from_hires_peptide(fit_dat, fit_values_all, - fractional = T, + fractional = fractional, hires_method = hires_method) }) %>% bind_rows() diff --git a/R/two_states_distance.R b/R/two_states_distance.R index 8ad154f..5980e92 100644 --- a/R/two_states_distance.R +++ b/R/two_states_distance.R @@ -24,7 +24,7 @@ #' @export plot_k_distance <- function(two_state_dataset, - interactive = F){ + interactive = FALSE){ protein_length <- max(two_state_dataset[["position"]]) @@ -74,9 +74,9 @@ plot_k_distance <- function(two_state_dataset, #' @export plot_uc_real_dist <- function(uc_distance_dataset, - squared = F, - fractional = T, - interactive = F){ + squared = FALSE, + fractional = TRUE, + interactive = FALSE){ y_axis_label <- "" @@ -267,7 +267,7 @@ plot_two_states <- function(hires_params_1, #' @export plot_color_distance plot_color_distance <- function(two_state_dataset, - interactive = T){ + interactive = FALSE){ protein_length <- max(two_state_dataset[["position"]]) @@ -323,9 +323,9 @@ plot_color_distance <- function(two_state_dataset, #' @export plot_uc_distance plot_uc_distance <- function(uc_distance_dataset, - squared = F, - fractional = T, - interactive = F){ + squared = FALSE, + fractional = TRUE, + interactive = FALSE){ protein_length <- max(uc_distance_dataset[["End"]]) @@ -424,8 +424,8 @@ plot_uc <- function(fit_dat_1, fit_dat_2, fit_values_1, fit_values_2, - fractional = F, - interactive = F){ + fractional = FALSE, + interactive = FALSE){ v_sequence = paste(unique(na.omit(c(fit_dat_1[["Sequence"]][1], fit_dat_2[["Sequence"]][1]))), collapse = "/") v_start = unique(na.omit(c(fit_dat_1[["Start"]][1], fit_dat_2[["Start"]][1]))) diff --git a/inst/benchmark.R b/inst/benchmark.R index a1ed309..84beb2b 100644 --- a/inst/benchmark.R +++ b/inst/benchmark.R @@ -5,7 +5,7 @@ library(HRaDeX) calculate_uc_from_hires_peptide <- function(fit_dat, ## uc filtered dat fit_values_all, ## fit unfiltered - fractional = T, + fractional = TRUE, hires_method = c("shortest", "weighted")){ # hires_method <- "weighted"