drop_clstrs: Drop cluster records from phylota object

View source: R/user-drop.R

drop_clstrsR Documentation

Drop cluster records from phylota object

Description

Drops all clusters except those identified by user.

Usage

drop_clstrs(phylota, cid)

Arguments

phylota

Phylota object

cid

Cluster ID(s) to be kept

Value

phylota

See Also

Other tools-public: calc_mad(), calc_wrdfrq(), drop_by_rank(), drop_sqs(), get_clstr_slot(), get_nsqs(), get_ntaxa(), get_sq_slot(), get_stage_times(), get_tx_slot(), get_txids(), is_txid_in_clstr(), is_txid_in_sq(), list_clstrrec_slots(), list_ncbi_ranks(), list_seqrec_slots(), list_taxrec_slots(), plot_phylota_pa(), plot_phylota_treemap(), read_phylota(), write_sqs()

Examples

data("dragonflies")
# specify cids to *keep*
random_cids <- sample(dragonflies@cids, 100)
# drop an entire cluster
nbefore <- length(dragonflies@cids)
dragonflies <- drop_clstrs(phylota = dragonflies, cid = random_cids)
nafter <- length(dragonflies@cids)
# now there are only 100 clusters
(nafter < nbefore)

ropensci/phylotaR documentation built on July 9, 2023, 3:17 p.m.