From 5680ced129b1188368d800b60cffc1096dcd03dc Mon Sep 17 00:00:00 2001 From: weaversd Date: Tue, 30 Jul 2024 20:25:01 -0400 Subject: [PATCH] bug fixes with DIANN import sample count --- Documentation/Release Updates.txt | 6 +++++- ui.R | 2 +- www/basic_functions.R | 3 ++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/Documentation/Release Updates.txt b/Documentation/Release Updates.txt index 300b638..bc4501d 100644 --- a/Documentation/Release Updates.txt +++ b/Documentation/Release Updates.txt @@ -65,4 +65,8 @@ Version 0.1.13 Version 0.1.14 2024-02-22 - - Bug fixed for importing peaks files \ No newline at end of file + - Bug fixed for importing peaks files + +Version 0.1.15 +2024-07-30 + - Bug fixed for importing DIANN files where the sample count was calculated improperly when filtering based on Regex. \ No newline at end of file diff --git a/ui.R b/ui.R index 8fb7caa..f4fcc25 100644 --- a/ui.R +++ b/ui.R @@ -2,7 +2,7 @@ library(shiny) ui <- navbarPage(title = "PrIntMap-R", tabPanel("Documentation", includeMarkdown("Documentation/Documentation.md"), - "Version 0.1.14"), #update version here for each push + "Version 0.1.15"), #update version here for each push tabPanel("Run", flowLayout( fileInput(inputId = "database_file", label = "Upload fasta database file", diff --git a/www/basic_functions.R b/www/basic_functions.R index 2de4f9e..cd3cb87 100644 --- a/www/basic_functions.R +++ b/www/basic_functions.R @@ -531,7 +531,7 @@ read_peptide_tsv_DIANN_comb <- function(peptide_file, sample_pattern, sample = N names(peptides)[grepl("Stripped.Sequence", names(peptides))] <- "sequence" names(peptides)[grepl("Precursor.Quantity", names(peptides))] <- "Intensity" - sample_count <- length(unique(peptide_import$File.Name)) + sample_count <- length(unique(peptides$File.Name)) if (comb_method=="Average"){ peptides$Intensity <- peptides$Intensity / sample_count } @@ -549,6 +549,7 @@ read_peptide_tsv_DIANN_comb <- function(peptide_file, sample_pattern, sample = N } } else{ if (sample_pattern != ""){ + peptides <- peptide_import if(length(names(peptides)[grepl(sample_pattern, names(peptides))])<=0){ stop("Sample Pattern not found in file.") } else {