Skip to content

Commit

Permalink
fixed PUBLICATION tag order when drawn from infolist and absent in se…
Browse files Browse the repository at this point in the history
…ttings
  • Loading branch information
Michele Stravs committed Feb 22, 2024
1 parent 320f52e commit f2e4271
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions R/createMassBank.R
Original file line number Diff line number Diff line change
Expand Up @@ -1352,6 +1352,8 @@ readMbdata <- function(row)
if(getOption("RMassBank")$annotations$publication!="") {
mbdata[['PUBLICATION']] <- getOption("RMassBank")$annotations$publication
}
if(!is.na(row[["PUBLICATION"]]))
mbdata[["PUBLICATION"]] = row[["PUBLICATION"]]
commentNames <- names(row)[grepl(x = names(row), pattern = "^COMMENT\\.")]
commentNames <- c(commentNames, names(row)[grepl(x = names(row), pattern = "^COMMENT\\_")])
commentNames <- commentNames[!is.na(row[commentNames])]
Expand Down Expand Up @@ -1422,8 +1424,7 @@ readMbdata <- function(row)
mbdata[["COPYRIGHT"]] = row[["COPYRIGHT"]]


if(!is.na(row[["PUBLICATION"]]))
mbdata[["PUBLICATION"]] = row[["PUBLICATION"]]



return(mbdata)
Expand Down

0 comments on commit f2e4271

Please sign in to comment.