Commit 2d8a1745 authored by joerg.buescher's avatar joerg.buescher
Browse files

fixing some old merge mess in generate_ml_training_data.R

parent d3106dfa
......@@ -74,10 +74,20 @@ generate_ml_training_data <- function(tsv_path, xlsx_path){
next
}
# get column by column name rather than assuming column order
rtcol <- which(tolower(td[2, ]) == 'rt')
rtcol <- min(rtcol[rtcol > met_index], na.rm = TRUE)
startcol <- which(tolower(td[2, ]) == 'int. start')
startcol <- min(startcol[startcol > met_index], na.rm = TRUE)
endcol <- which(tolower(td[2, ]) == 'int. end')
endcol <- min(endcol[endcol > met_index], na.rm = TRUE)
# Get rt, peakstart, peakend from training data for peak evaluation
rt <- as.numeric(td[3:dim(td)[1],met_index + 1 ])
start <- as.numeric(td[3:dim(td)[1],met_index + 2])
end <- as.numeric(td[3:dim(td)[1],met_index + 3])
rt <- as.numeric(td[3:dim(td)[1], rtcol])
start <- as.numeric(td[3:dim(td)[1], startcol])
end <- as.numeric(td[3:dim(td)[1], endcol])
goodpos <- which((as.numeric(!is.na(rt)) * as.numeric(!is.na(start)) * as.numeric(!is.na(end)) ) == 1)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment