Skip to content

Commit 4e91acf

Browse files
authored
Merge pull request #23 from weaversd/DIANNimport
bug fixes with DIANN import sample count
2 parents 2fb6343 + 5680ced commit 4e91acf

3 files changed

Lines changed: 8 additions & 3 deletions

File tree

Documentation/Release Updates.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,4 +65,8 @@ Version 0.1.13
6565

6666
Version 0.1.14
6767
2024-02-22
68-
- Bug fixed for importing peaks files
68+
- Bug fixed for importing peaks files
69+
70+
Version 0.1.15
71+
2024-07-30
72+
- Bug fixed for importing DIANN files where the sample count was calculated improperly when filtering based on Regex.

ui.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ library(shiny)
22
ui <- navbarPage(title = "PrIntMap-R",
33
tabPanel("Documentation",
44
includeMarkdown("Documentation/Documentation.md"),
5-
"Version 0.1.14"), #update version here for each push
5+
"Version 0.1.15"), #update version here for each push
66
tabPanel("Run",
77
flowLayout(
88
fileInput(inputId = "database_file", label = "Upload fasta database file",

www/basic_functions.R

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,7 @@ read_peptide_tsv_DIANN_comb <- function(peptide_file, sample_pattern, sample = N
531531
names(peptides)[grepl("Stripped.Sequence", names(peptides))] <- "sequence"
532532
names(peptides)[grepl("Precursor.Quantity", names(peptides))] <- "Intensity"
533533

534-
sample_count <- length(unique(peptide_import$File.Name))
534+
sample_count <- length(unique(peptides$File.Name))
535535
if (comb_method=="Average"){
536536
peptides$Intensity <- peptides$Intensity / sample_count
537537
}
@@ -549,6 +549,7 @@ read_peptide_tsv_DIANN_comb <- function(peptide_file, sample_pattern, sample = N
549549
}
550550
} else{
551551
if (sample_pattern != ""){
552+
peptides <- peptide_import
552553
if(length(names(peptides)[grepl(sample_pattern, names(peptides))])<=0){
553554
stop("Sample Pattern not found in file.")
554555
} else {

0 commit comments

Comments
 (0)