Skip to content

Commit

Permalink
added warning message with all taxa ids which are not in the local da…
Browse files Browse the repository at this point in the history
…tabase (#131)

Co-authored-by: Pavel Vychyk <pavel@wks10.izn-ffm.intern>
  • Loading branch information
p-vychik and Pavel Vychyk authored Dec 17, 2024
1 parent 4491303 commit f27f1fc
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions R/createTaxonomyMatrix.R
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,20 @@ getTaxonomyInfo <- function(inputTaxa = NULL, currentNCBIinfo = NULL) {
tmp <- list()
outList <- list()
k <- 1
missingTaxa <- setdiff(inputTaxa, currentNCBIinfo$ncbiID)
if (length(missingTaxa) > 0) {
warning(
cat(length(missingTaxa),
"id(s) missed in currentNCBIinfo, check taxon database: ",
paste(missingTaxa, collapse = ", ")
)
)
}
for (refID in inputTaxa) {
# get info for this taxon
if (refID %in% missingTaxa) {
next
}
refEntry <- currentNCBIinfo[currentNCBIinfo$ncbiID == refID, ]
lastID <- refEntry$parentID
inputTaxaInfo <- refEntry
Expand Down

0 comments on commit f27f1fc

Please sign in to comment.