Skip to content

Commit

Permalink
Merge pull request #83 from fmichonneau/add-score
Browse files Browse the repository at this point in the history
add score to hard-coded Mus
  • Loading branch information
LunaSare authored Jun 17, 2023
2 parents 4170b61 + a561d78 commit e4a9f53
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion R/opentree_taxonomy_general.R
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,11 @@ tnrs_match.default <- function(input, reference_taxonomy = "ott", ...) { # enhan
# cat("\n") # just to make the progress bar look better
# hardcoding Mus:
if (sum("mus" == tolower(input)) > 0) {
df["mus" == tolower(input), ] <- list("mus", "Mus (genus in Deuterostomia)", FALSE, 1068778, FALSE, "SIBLING_HIGHER", 3)
if (packageVersion("rotl") >= 3.1.0) {
df["mus" == tolower(input), ] <- list("mus", "Mus (genus in Deuterostomia)", FALSE, 1, 1068778, FALSE, "SIBLING_HIGHER", 3)
} else {
df["mus" == tolower(input), ] <- list("mus", "Mus (genus in Deuterostomia)", FALSE, 1068778, FALSE, "SIBLING_HIGHER", 3)
}
}
rownames(df)[1] <- "1"
# df[is.na(df$unique_name),1] <- input[is.na(df$unique_name)] # in case the unmatched input are dropped from final df
Expand Down

0 comments on commit e4a9f53

Please sign in to comment.