Skip to content

Commit

Permalink
Update instrument_17_DIA_MS1_counts.R
Browse files Browse the repository at this point in the history
Fixed bug with the source_file not being initialized. Added missing line of code, so DO-MS is able to start up.
  • Loading branch information
OrhunKok authored Oct 28, 2023
1 parent 0139d0d commit 4f3b95b
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,17 @@ init <- function() {
type <- 'plot'
box_title <- 'Channel-wise MS1 Copy Number for Precursors'
help_text <- 'Plotting the MS1 copy numbers for all precursors associated with one of the defined channels. The copy numbers are calculated using the signal-to-noise ratio as described in Derks et al. 2022. By default, a resolution of 70,000 is used during preprocessing. It can be changed with the –resolution parameter.'
source_file <- 'report'

.validate <- function(data, input) {
validate(need(data()[['sn']], paste0('Upload report.txt')))
validate(need((nrow(data()[['sn']]) > 1), paste0('No Rows selected')))
validate(need(data()[['report']], paste0('Upload report.txt')))
validate(need((nrow(data()[['report']]) > 1), paste0('No Rows selected')))
validate(need(config[['ChemicalLabels']], paste0('Please provide a list of labels under the key: ChemicalLabels in the settings.yaml file')))

}

.plotdata <- function(data, input) {
plotdata <- data()[['sn']][,c('Raw.file','Precursor.Id', 'Copy.Number')]
plotdata <- data()[['report']][,c('Raw.file','Precursor.Id', 'Copy.Number')]
plotdata <- translate_diann_channel_format(plotdata, columns = c("Precursor.Id"))
plotdata <- separate_channel_info(plotdata)

Expand Down

0 comments on commit 4f3b95b

Please sign in to comment.