YuLab-SMU / treeio

:seedling: Base Classes and Functions for Phylogenetic Tree Input and Output
https://yulab-smu.top/treedata-book/
94 stars 24 forks source link

suppress the warning message about check whether is a tbl_tree #103

Closed xiangpin closed 1 year ago

xiangpin commented 1 year ago

Description

using options(check.tbl_tree.verbose=FALSE) to suppress the warning message of check whether is a tbl_tree.

Related Issue

https://github.com/YuLab-SMU/tidytree/issues/40

Example

Before

> library(treeio)
treeio v1.25.1.002 For help:
https://yulab-smu.top/treedata-book/

If you use the ggtree package suite in published research, please cite
the appropriate paper(s):

LG Wang, TTY Lam, S Xu, Z Dai, L Zhou, T Feng, P Guo, CW Dunn, BR
Jones, T Bradley, H Zhu, Y Guan, Y Jiang, G Yu. treeio: an R package
for phylogenetic tree input and output with richly annotated and
associated data. Molecular Biology and Evolution. 2020, 37(2):599-603.
doi: 10.1093/molbev/msz240

G Yu. Data Integration, Manipulation and Visualization of Phylogenetic
Trees (1st ed.). Chapman and Hall/CRC. 2022. ISBN: 9781032233574

Shuangbin Xu, Lin Li, Xiao Luo, Meijun Chen, Wenli Tang, Li Zhan, Zehan
Dai, Tommy T. Lam, Yi Guan, Guangchuang Yu. Ggtree: A serialized data
object for visualization of a phylogenetic tree and annotation data.
iMeta 2022, 1(4):e56. doi:10.1002/imt2.56
> example(drop.tip)

drp.tp> nhxfile <- system.file("extdata/NHX", "ADH.nhx", package="treeio")

drp.tp> nhx <- read.nhx(nhxfile)

drp.tp> tr1 <- drop.tip(nhx, c("ADH2", "ADH1"))
ℹ invalid tbl_tree object. Missing column: parent.
ℹ invalid tbl_tree object. Missing column: parent.
! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.

drp.tp> tr2 <- keep.tip(nhx, c("ADH2", "ADH1"))
ℹ invalid tbl_tree object. Missing column: parent.
ℹ invalid tbl_tree object. Missing column: parent.
! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
>

After

> library(treeio)
treeio v1.25.1.002 For help:
https://yulab-smu.top/treedata-book/

If you use the ggtree package suite in published research, please cite
the appropriate paper(s):

LG Wang, TTY Lam, S Xu, Z Dai, L Zhou, T Feng, P Guo, CW Dunn, BR
Jones, T Bradley, H Zhu, Y Guan, Y Jiang, G Yu. treeio: an R package
for phylogenetic tree input and output with richly annotated and
associated data. Molecular Biology and Evolution. 2020, 37(2):599-603.
doi: 10.1093/molbev/msz240

Guangchuang Yu.  Data Integration, Manipulation and Visualization of
Phylogenetic Trees (1st edition). Chapman and Hall/CRC. 2022,
doi:10.1201/9781003279242

S Xu, Z Dai, P Guo, X Fu, S Liu, L Zhou, W Tang, T Feng, M Chen, L
Zhan, T Wu, E Hu, Y Jiang, X Bo, G Yu. ggtreeExtra: Compact
visualization of richly annotated phylogenetic data. Molecular Biology
and Evolution. 2021, 38(9):4039-4042. doi: 10.1093/molbev/msab166
> example(drop.tip)

drp.tp> nhxfile <- system.file("extdata/NHX", "ADH.nhx", package="treeio")

drp.tp> nhx <- read.nhx(nhxfile)

drp.tp> tr1 <- drop.tip(nhx, c("ADH2", "ADH1"))

drp.tp> tr2 <- keep.tip(nhx, c("ADH2", "ADH1"))
>