Skip to content

Commit

Permalink
bug fixes with DIANN import sample count
Browse files Browse the repository at this point in the history
  • Loading branch information
weaversd committed Jul 31, 2024
1 parent 2fb6343 commit 5680ced
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
6 changes: 5 additions & 1 deletion Documentation/Release Updates.txt
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,8 @@ Version 0.1.13

Version 0.1.14
2024-02-22
- Bug fixed for importing peaks files
- 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.
2 changes: 1 addition & 1 deletion ui.R
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
3 changes: 2 additions & 1 deletion www/basic_functions.R
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand All @@ -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 {
Expand Down

0 comments on commit 5680ced

Please sign in to comment.