Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Message updates #201

Merged
merged 2 commits into from
Apr 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions R/align_taxa.R
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ align_taxa <- function(original_name,
# move all checked taxa to "checked"
taxa <- redistribute(taxa)

# messages if there is an saved list being added to
if (!is.null(output) && file.exists(output) && !all(taxa$tocheck$checked)) {
# check unknown taxa
message(
Expand All @@ -180,6 +181,23 @@ align_taxa <- function(original_name,
" taxa yet to be checked"
)
}

# otherwise if there are taxa that require checking add
# simple message that indicates number of perfect matches.
if (!all(taxa$tocheck$checked)) {

perfect_matches <- taxa$tocheck %>%
filter(original_name %in% resources$`APC list (accepted)`$canonical_name) %>%
distinct() %>%
nrow()

message(
" -> of these ",
crayon::blue(perfect_matches),
" names have a perfect match to a scientific name in the APC. Alignments being sought for remaining names."
)
}

# do the actual matching
taxa <-
match_taxa(taxa, resources, fuzzy_abs_dist, fuzzy_rel_dist, fuzzy_matches, imprecise_fuzzy_matches, APNI_matches, identifier) %>%
Expand Down
17 changes: 17 additions & 0 deletions man/download_taxonomic_resources_for_release.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading