Description Usage Arguments Details Value See Also Examples
Plot presence/absence of taxa by each cluster in phylota object.
1 | plot_phylota_pa(phylota, cids, txids, cnms = cids, txnms = txids)
|
phylota |
Phylota object |
cids |
Vector of cluster IDs |
txids |
Vector of taxonomic IDs |
cnms |
Cluster names |
txnms |
Taxonomic names |
Cluster names and taxonomic names can be given to the function, by default IDs are used.
geom_object
Other tools-public: calc_mad
,
calc_wrdfrq
, drop_by_rank
,
drop_clstrs
, 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_treemap
,
read_phylota
, write_sqs
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | library(phylotaR)
data(cycads)
# drop all but first ten
cycads <- drop_clstrs(cycads, cycads@cids[1:10])
# plot all
p <- plot_phylota_pa(phylota = cycads, cids = cycads@cids, txids = cycads@txids)
print(p) # lots of information, difficult to interpret
# get genus-level taxonomic names
genus_txids <- get_txids(cycads, txids = cycads@txids, rnk = 'genus')
genus_txids <- unique(genus_txids)
# dropping missing
genus_txids <- genus_txids[genus_txids != '']
genus_nms <- get_tx_slot(cycads, genus_txids, slt_nm = 'scnm')
# make alphabetical for plotting
genus_nms <- sort(genus_nms, decreasing = TRUE)
# generate geom_object
p <- plot_phylota_pa(phylota = cycads, cids = cycads@cids, txids = genus_txids,
txnms = genus_nms)
# plot
print(p) # easier to interpret
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.