microeco
microeco copied to clipboard
heatmap x axis label
Hi, I used ASV level abundance heatmap plot. I am getting species name along with ASV lable (below pic). i want to keep only ASV number not species names. Could you pls give me the idea. It use to be like that but now the species name added extra.
show 24 taxa at Genus level
t_all_generalists <- trans_abund$new(dataset = all_generalists_dataset, taxrank = "ASV", ntaxa = 24) figure1e<-t_all_generalists$plot_heatmap(min_abundance = 0.001, facet = "Host_taxa", xtext_keep = FALSE, withmargin = FALSE)
Hi. It could come from the unrecognizable prefix. Two ways are available.
- Use tidy the taxonomy to make the tax_table well organized with the prefix by using
tidy_taxonomy
.
library(microeco)
library(magrittr)
data(dataset)
dataset$add_rownames2taxonomy("ASV")
dataset$tax_table %<>% tidy_taxonomy
dataset$cal_abund()
t1 <- trans_abund$new(dataset = dataset, taxrank = "ASV", ntaxa = 20)
t1$plot_heatmap(xtext_keep = FALSE, withmargin = FALSE)
- Another way is to change the default
prefix
option intrans_abund$new
. Settingprefix = "\\|"
means the prefix is just |, no other things, i.e. the connector character between taxonomic levels.
library(microeco)
data(dataset)
dataset$add_rownames2taxonomy("ASV")
dataset$cal_abund()
t1 <- trans_abund$new(dataset = dataset, taxrank = "ASV", ntaxa = 20, prefix = "\\|")
t1$plot_heatmap(xtext_keep = FALSE, withmargin = FALSE)