View source: R/amp_merge_ampvis2.R
amp_merge_ampvis2 | R Documentation |
Merge any number of ampvis2 objects into a single object.
amp_merge_ampvis2(
...,
by_refseq = TRUE,
refseq_names = NULL,
rename_unmatched = TRUE,
unmatched_prefix = "unmatched"
)
... |
(required) Any number of ampvis2-class objects to merge |
by_refseq |
(recommended) Merge by exact matches between DNA reference sequences. The full DNA sequences will then be used as the new names in the output. (default: |
refseq_names |
Path to a FASTA file or a |
rename_unmatched |
Whether to rename any unmatched sequences or not when |
unmatched_prefix |
Prefix used to name any unmatched sequences when |
It's important to ensure that the taxonomy for all OTU's across data sets is generated in the exact same way with the same database.
When by_refseq = FALSE
it's likewise important to ensure that OTU ID's are not arbitrary between data sets and that they are corresponding to the same sequences across data sets (objects).
When by_refseq = TRUE
the full DNA sequences will be used as the new OTU ID's unless refseq_names
is provided.
Currently, phylogenetic trees are not merged. Feel free to contribute.
An ampvis2-class object
data("MiDAS")
# summary of samples from 2010-2012
amp_filter_samples(
MiDAS,
Year %in% c("2010", "2011", "2012")
)
# now merge individual objects and verify summary is the same
d_2010 <- amp_filter_samples(
MiDAS,
Year %in% "2010"
)
d_2011 <- amp_filter_samples(
MiDAS,
Year %in% "2011"
)
d_2012 <- amp_filter_samples(
MiDAS,
Year %in% "2012"
)
amp_merge_ampvis2(
d_2010,
d_2011,
d_2012
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.