taxa_only_in_one_level {MiscMetabar}R Documentation

Show taxa which are present in only one given level of a modality

Description

[Experimental]

[Experimental]

Usage

taxa_only_in_one_level(
  physeq,
  modality,
  level,
  min_nb_seq_taxa = 0,
  min_nb_samples_taxa = 0
)

taxa_only_in_one_level(
  physeq,
  modality,
  level,
  min_nb_seq_taxa = 0,
  min_nb_samples_taxa = 0
)

Arguments

physeq

(required): a phyloseq-class object obtained using the phyloseq package.

modality

(required) The name of a column present in the ⁠@sam_data⁠ slot of the physeq object. Must be a character vector or a factor.

level

(required) The level (must be present in modality) of interest

min_nb_seq_taxa

(default 0 = no filter) The minimum number of sequences per taxa

min_nb_samples_taxa

(default 0 = no filter) The minimum number of samples per taxa

Value

A vector of taxa names

A vector of taxa names

Author(s)

Adrien Taudière

See Also

ggvenn_pq() and upset_pq()

Examples

data_fungi_mini_woNA4height <- subset_samples(
  data_fungi_mini,
  !is.na(data_fungi_mini@sam_data$Height)
)
taxa_only_in_one_level(data_fungi_mini_woNA4height, "Height", "High")
# Taxa present only in low height samples
suppressMessages(suppressWarnings(taxa_only_in_one_level(data_fungi, "Height", "Low")))
# Number of taxa present only in sample of time equal to 15
suppressMessages(suppressWarnings(length(taxa_only_in_one_level(data_fungi, "Time", "15"))))

[Package MiscMetabar version 0.9.1 Index]