From 5a4a201fb8a8639c65e3d2a0c8ef45f81788202f Mon Sep 17 00:00:00 2001 From: sdgamboa Date: Mon, 11 Sep 2023 12:51:16 -0400 Subject: [PATCH] update script for living tree --- inst/scripts/get_living.tree.R | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/inst/scripts/get_living.tree.R b/inst/scripts/get_living.tree.R index 31e77f6..98c6d72 100644 --- a/inst/scripts/get_living.tree.R +++ b/inst/scripts/get_living.tree.R @@ -106,23 +106,15 @@ nodes <- data.frame(node = length(tree$tip.label) + 1:tree$Nnode) |> tree$node.label <- nodes$node_label # Export data ------------------------------------------------------------- -tree_fname <- file.path('inst', 'extdata', 'mpav31.newick') +tree_fname <- file.path('inst', 'extdata', 'livingTree.newick') ape::write.tree(tree, tree_fname) -tree_data_fname <- file.path('inst', 'extdata', 'mpav31.tsv') +tree_data_fname <- file.path('inst', 'extdata', 'livingTree.tsv') write.table( tree_data, tree_data_fname, sep = '\t', quote = TRUE, row.names = FALSE ) - - - - - - - - # taxids_ranks <- taxizedb::taxid2rank(taxids, db = 'ncbi') # pos2 <- which(is.na(taxids_ranks)) # taxids[pos2] <- as.character(taxize::get_uid(tax_names[pos2], db = 'ncbi')) # luckily, tax names were unique