source(here::here("R",'PR2_init.R'), echo=FALSE)
PR2 version 5.0.0
Chytrids - Alexei Seliuk
Init
Set up the files
= c("Chytridiomycota", "Fungi_X")
target_group = "class"
target_level
<- "J - Fungi chytrids"
dir_pr2_update
$editor <- "A. Seliuk"
pr2.env
<- function(file_name){here::here("5.0",dir_pr2_update , file_name)}
full_path
# create the directory for taxonomy output
dir.create(full_path("taxo"))
Read the pr2_taxonomy from file
- Number of taxa = 191
= rio::import(full_path("pr2_Chytrids_Fungi_X_2022-09-19-final_edited.xlsx"),
pr2_taxo_updated sheet = "taxonomy")
str_c("Number of taxa : ", nrow(pr2_taxo_updated))
Check taxonomy
pr2_taxo_check(pr2_taxo_updated,
$taxo_levels[[pr2.env$taxo_levels_number]],
pr2.envfull_path("taxo"))
Check if there is any missing taxa
<- db_info("pr2_google")
pr2_db
<- db_connect(pr2_db)
pr2_db_con
<- tbl(pr2_db_con, "pr2_main") %>%
pr2_main filter(!is.na(species),
is.na(removed_version)) %>%
collect()
<- tbl(pr2_db_con, "pr2_taxonomy") %>%
pr2_taxo filter (is.na(taxo_removed_version)) %>%
collect()
<- pr2_main %>%
pr2 left_join(pr2_taxo, by = join_by(species==species))
db_disconnect(pr2_db_con)
<- pr2 %>%
pr2_missing filter(is.na(domain))
pr2_missing
Comments
pr2_taxonomy
class %in% c("Chytridiomycota", "Fungi_X")
pr2_main