Open jrigbr opened 5 months ago
Hello @jrigbr ,
class2tree()
currently accepts a list of data frames as input, not a list of tibbles.
I have tried to convert your cl
list to data frames and it worked.
> sp_worms_id <- c(138474,138677,104108,494795,138710,125332,130722,144784,129686,231858,369350,124208,127031,133913,273021,123987,124963,132487,140389,141855)
> cl <- classification(sp_worms_id, db = 'worms')
> cl <- lapply(cl, as.data.frame)
> tr <- class2tree(cl)
Get all ranks and their taxIDs
Align taxonomy hierarchies...
Taxonomy alignment done!
Calculate distance matrix
Add node labels
> tr$phylo
Phylogenetic tree with 20 tips and 11 internal nodes.
Tip labels:
Abra, Acanthochitona fascicularis, Acartia, Acetabularia acetabulum, Aeolidiella alderi, Alcyonium coralloides, ...
Node labels:
NA, Plantae, Animalia, Demospongiae, Teleostei, Echinodermata, ...
Unrooted; includes branch lengths.
I hope it will help you! Best, Vinh
Hello, I am facing this error while running class2tree
> sp_worms_id [1] 138474 138677 104108 494795 138710 125332 130722 144784 129686 231858 369350 124208 127031 133913 273021 123987 124963 132487 140389 [20] 141855
cl <- classification(sp_worms_id, db = 'worms')
$
138677
A tibble: 11 × 3
name rank id