join-phyloseq: Mutating joins of the taxonomy table or sample data

join-phyloseqR Documentation

Mutating joins of the taxonomy table or sample data

Description

[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.

Usage

left_join_tax_table(x, ...)

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

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

left_join_sample_data(x, ...)

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

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

inner_join_tax_table(x, ...)

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

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

inner_join_sample_data(x, ...)

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

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

Arguments

x

A phyloseq, taxonomyTable, or sample_data object

...

Arguments passed to respective dplyr joining operation

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.

Value

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

See Also

dplyr::left_join() dplyr::inner_join()

Examples

library(tibble)

data(GlobalPatterns)

GlobalPatterns %>% sample_variables
ps1 <- GlobalPatterns %>%
  select_sample_data(!contains("Barcode"))
y <- GlobalPatterns %>%
  sample_data %>%
  select_sample_data(contains("Barcode")) %>%
  as_tibble
ps2 <- ps1 %>% left_join_sample_data(y, by = ".sample")
ps2 %>% sample_variables

mikemc/speedyseq documentation built on April 22, 2024, 6:40 p.m.