[Experimental]

These functions are wrappers around dplyr joining operations (see dplyr::mutate-joins) whose first (x) argument is either the taxonomy table or sample data.

left_join_tax_table(x, ...)

# S4 method for phyloseq
left_join_tax_table(x, ...)

# S4 method for taxonomyTable
left_join_tax_table(x, ...)

left_join_sample_data(x, ...)

# S4 method for phyloseq
left_join_sample_data(x, ...)

# S4 method for sample_data
left_join_sample_data(x, ...)

inner_join_tax_table(x, ...)

# S4 method for phyloseq
inner_join_tax_table(x, ...)

# S4 method for taxonomyTable
inner_join_tax_table(x, ...)

inner_join_sample_data(x, ...)

# S4 method for phyloseq
inner_join_sample_data(x, ...)

# S4 method for sample_data
inner_join_sample_data(x, ...)

Arguments

x

A phyloseq, taxonomyTable, or sample_data object

...

Arguments passed to respective dplyr joining operation

Value

An object of the same type as x, with added columns

Details

When joining by taxonomy table, the .otu column name can be used to match taxa names. When joining by sample data, the .sample column name can be used to match sample names.

See also

Examples

library(tibble) data(GlobalPatterns) GlobalPatterns %>% sample_variables
#> [1] "X.SampleID" "Primer" #> [3] "Final_Barcode" "Barcode_truncated_plus_T" #> [5] "Barcode_full_length" "SampleType" #> [7] "Description"
ps1 <- GlobalPatterns %>% select_sample_data(!contains("Barcode"))
#> Error in select_sample_data(., !contains("Barcode")): could not find function "select_sample_data"
y <- GlobalPatterns %>% sample_data %>% select_sample_data(contains("Barcode")) %>% as_tibble
#> Error in select_sample_data(., contains("Barcode")): could not find function "select_sample_data"
ps2 <- ps1 %>% left_join_sample_data(y, by = ".sample")
#> Error in left_join_sample_data(., y, by = ".sample"): could not find function "left_join_sample_data"
ps2 %>% sample_variables
#> Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'colnames': error in evaluating the argument 'object' in selecting a method for function 'sample_data': object 'ps2' not found