Closed mikemc closed 3 years ago
Given this implementation scheme, one can use .otu
and .sample
as column names in filter to select specific taxa and samples. Might be nice to support the use of .otu
and .sample
as column names in mutate, to set new sample and taxa names. For this to work, we need to add an extra step: e.g. create the new tax table, set taxa names in the phyloseq object to match the taxonomy table, and then replace the taxonomy table in the phyloseq object.
I did not implement the .groups
feature; may do so in the future once I run into a good use case.
mutate_sample_data()
andmutate_tax_table()
transmute_*()
rename_*()
andrename_with_*()
filter_*()
select_*()
relocate_*()
Each can be a simple wrapper around the corresponding dplyr verb. E.g. the method for
mutate_sample_data
on phyloseq objects can be a function containingFor relevant verbs, can consider an optional
.groups
arg, in which case the operation will be wrapped indplyr::with_groups()
.To reduce code redundancy, might be useful to have a function that takes a dplyr verb and a phyloseq accessor/creator (
sample_data
ortax_table
) and produces the relevant operation