Skip to content

Commit

Permalink
missing epsilon correction in R implementation to fix MassBank/MassBa…
Browse files Browse the repository at this point in the history
  • Loading branch information
ssmehta committed Nov 14, 2023
1 parent 174fbf2 commit 030b4a5
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions splashR/R/getSplash.R
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,10 @@ getBlockHist <- function(peaks, histBase, histLength, binSize) {
summedintensities <- tapply(peaks[,2], binindex, sum)
wrappedbinindex <- unique(binindex) %% histLength
wrappedintensities <- tapply(summedintensities, wrappedbinindex, sum)
normalisedintensities <- as.integer(wrappedintensities/max(wrappedintensities)*(histBase-1))
normalisedintensities <- as.integer(EPS_CORRECTION + (histBase-1) * wrappedintensities / max(wrappedintensities))

wrappedhist[sort(unique(wrappedbinindex))+1] <- normalisedintensities
paste(integer2base36(wrappedhist), collapse="")

}

getSplash <- function(peaks) {
Expand Down

0 comments on commit 030b4a5

Please sign in to comment.