Skip to content

Commit

Permalink
[FIX] Add fraction col as required to OpenMS parser
Browse files Browse the repository at this point in the history
  • Loading branch information
Julianus Pfeuffer committed Sep 9, 2020
1 parent aa916e8 commit d78e2aa
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions R/OpenMStoMSstatsFormat.R
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ OpenMStoMSstatsFormat <- function(input,
## Check correct option or input
requiredinput.general <- c("ProteinName", "PeptideSequence", "PrecursorCharge",
"FragmentIon", "ProductCharge", "IsotopeLabelType",
"Condition", "BioReplicate", "Run", "Intensity")
"Condition", "BioReplicate", "Run", "Intensity", "Fraction")

################################
## 1. check general input and use only required columns.
Expand All @@ -48,11 +48,11 @@ OpenMStoMSstatsFormat <- function(input,

## get annotation
if (is.null(annotation)) {
annotinfo <- unique(input[, c("Run", "Condition", 'BioReplicate')])
annotinfo <- unique(input[, c("Run", "Condition", 'BioReplicate', 'Fraction')])
} else {

## check annotation
required.annotation <- c('Condition', 'BioReplicate', 'Run')
required.annotation <- c('Condition', 'BioReplicate', 'Run', 'Fraction')

if (!all(required.annotation %in% colnames(annotation))) {

Expand Down Expand Up @@ -235,6 +235,7 @@ OpenMStoMSstatsFormat <- function(input,
"Condition" = input$Condition,
"BioReplicate" = input$BioReplicate,
"Run" = input$Run,
"Fraction" = input$Fraction,
"Intensity" = input$Intensity)

input <- input.final
Expand Down

0 comments on commit d78e2aa

Please sign in to comment.