PR2 version 5.0.0
Chytrids - Alexei Seliuk

Author

Daniel Vaulot

Published

March 17, 2023

Comments

pr2_taxonomy

  • Remove manually all taxa belonging to class %in% c("Chytridiomycota", "Fungi_X")
  • Verify new taxonomy in xlsx file
  • Import new taxonomy from xlsx file

pr2_main

  • A couple of changes made manually into pr2_main
  • New sequences added to the sequences to add latter

Init

source(here::here("R",'PR2_init.R'), echo=FALSE)

Set up the files

target_group =  c("Chytridiomycota", "Fungi_X")
target_level = "class"

dir_pr2_update <- "J - Fungi chytrids"

pr2.env$editor <- "A. Seliuk"

full_path <- function(file_name){here::here("5.0",dir_pr2_update , file_name)}

# create the directory for taxonomy output
dir.create(full_path("taxo"))

Read the pr2_taxonomy from file

  • Number of taxa = 191
pr2_taxo_updated = rio::import(full_path("pr2_Chytrids_Fungi_X_2022-09-19-final_edited.xlsx"), 
                               sheet = "taxonomy")

str_c("Number of taxa : ", nrow(pr2_taxo_updated))

Check taxonomy

pr2_taxo_check(pr2_taxo_updated, 
               pr2.env$taxo_levels[[pr2.env$taxo_levels_number]], 
               full_path("taxo"))

Check if there is any missing taxa

pr2_db <- db_info("pr2_google")

pr2_db_con <- db_connect(pr2_db)

pr2_main <- tbl(pr2_db_con, "pr2_main") %>%
  filter(!is.na(species),
         is.na(removed_version)) %>% 
  collect() 

pr2_taxo <- tbl(pr2_db_con, "pr2_taxonomy") %>%
  filter (is.na(taxo_removed_version)) %>%
  collect()

pr2 <- pr2_main %>%
  left_join(pr2_taxo, by = join_by(species==species)) 

db_disconnect(pr2_db_con)


pr2_missing <- pr2 %>% 
  filter(is.na(domain))

pr2_missing