From 9d597ccc491f32a5e84bed70db6dcd241dd52fd3 Mon Sep 17 00:00:00 2001 From: ehwenk Date: Tue, 23 Apr 2024 12:42:44 +1000 Subject: [PATCH 1/2] Update align_taxa.R Add message that indicates how many taxa have perfect matches to APC. --- R/align_taxa.R | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/R/align_taxa.R b/R/align_taxa.R index 5a6d409b..83d32f6c 100644 --- a/R/align_taxa.R +++ b/R/align_taxa.R @@ -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( @@ -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) %>% From bc163920e6747a2918151746e9e05a11d77c9b70 Mon Sep 17 00:00:00 2001 From: ehwenk Date: Tue, 23 Apr 2024 14:04:59 +1000 Subject: [PATCH 2/2] update documentation --- man/download_taxonomic_resources_for_release.Rd | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 man/download_taxonomic_resources_for_release.Rd diff --git a/man/download_taxonomic_resources_for_release.Rd b/man/download_taxonomic_resources_for_release.Rd new file mode 100644 index 00000000..d4a94a65 --- /dev/null +++ b/man/download_taxonomic_resources_for_release.Rd @@ -0,0 +1,17 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/release.R +\name{download_taxonomic_resources_for_release} +\alias{download_taxonomic_resources_for_release} +\title{Download taxonomic resources for GitHub Release} +\usage{ +download_taxonomic_resources_for_release(version_name = NULL, path = "ignore/") +} +\arguments{ +\item{version_name}{character string of version name, follow semantic versioning} + +\item{path}{to download parquets to upload} +} +\description{ +Download taxonomic resources for GitHub Release +} +\keyword{internal}