Skip to content

Commit

Permalink
explicite logical values
Browse files Browse the repository at this point in the history
  • Loading branch information
werpuc committed Oct 10, 2024
1 parent 3eee6a8 commit bacaf00
Show file tree
Hide file tree
Showing 18 changed files with 46 additions and 46 deletions.
4 changes: 2 additions & 2 deletions R/create_fit_dataset.R
Original file line number Diff line number Diff line change
Expand Up @@ -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 %>%
Expand Down
4 changes: 2 additions & 2 deletions R/fit_1_exp.R
Original file line number Diff line number Diff line change
Expand Up @@ -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){
Expand Down
4 changes: 2 additions & 2 deletions R/fit_2_exp.R
Original file line number Diff line number Diff line change
Expand Up @@ -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!")
Expand Down
4 changes: 2 additions & 2 deletions R/fit_3_exp.R
Original file line number Diff line number Diff line change
Expand Up @@ -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!")
Expand Down
4 changes: 2 additions & 2 deletions R/get_fit_results.R
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
4 changes: 2 additions & 2 deletions R/plot_cov_class.R
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
#'
#' @export
plot_cov_class <- function(fit_values,
fractional = T,
interactive = F){
fractional = TRUE,
interactive = FALSE){


## levels
Expand Down
4 changes: 2 additions & 2 deletions R/plot_double_uc.R
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion R/plot_estimated_k.R
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
6 changes: 3 additions & 3 deletions R/plot_fitted_uc.R
Original file line number Diff line number Diff line change
Expand Up @@ -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"]], ") ")

Expand Down
8 changes: 4 additions & 4 deletions R/plot_hires.R
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#' @export

plot_hires <- function(hires_params,
interactive = F){
interactive = FALSE){


if(interactive){
Expand Down Expand Up @@ -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){

Expand Down Expand Up @@ -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"]])

Expand Down
2 changes: 1 addition & 1 deletion R/plot_lm.R
Original file line number Diff line number Diff line change
Expand Up @@ -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"]])
Expand Down
4 changes: 2 additions & 2 deletions R/plot_n.R
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
#'
#' @export
plot_n <- function(list_params,
fractional = F,
interactive = F){
fractional = FALSE,
interactive = FALSE){

if(fractional){

Expand Down
2 changes: 1 addition & 1 deletion R/plot_params_map.R
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion R/plot_rss_hist.R
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
8 changes: 4 additions & 4 deletions R/plot_singular_uc.R
Original file line number Diff line number Diff line change
Expand Up @@ -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"]]), ") ")

Expand Down
8 changes: 4 additions & 4 deletions R/recreate_uc.R
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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,
Expand Down Expand Up @@ -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))
Expand All @@ -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()
Expand Down
20 changes: 10 additions & 10 deletions R/two_states_distance.R
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#' @export

plot_k_distance <- function(two_state_dataset,
interactive = F){
interactive = FALSE){

protein_length <- max(two_state_dataset[["position"]])

Expand Down Expand Up @@ -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 <- ""

Expand Down Expand Up @@ -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"]])

Expand Down Expand Up @@ -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"]])

Expand Down Expand Up @@ -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])))
Expand Down
2 changes: 1 addition & 1 deletion inst/benchmark.R
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit bacaf00

Please sign in to comment.