Skip to content

Commit

Permalink
update script for living tree
Browse files Browse the repository at this point in the history
  • Loading branch information
sdgamboa committed Sep 11, 2023
1 parent c547c41 commit 5a4a201
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions inst/scripts/get_living.tree.R
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5a4a201

Please sign in to comment.