Description Usage Arguments Value See Also Examples
An S4 Generic method for pruning/filtering unwanted samples by defining those you want to keep.
1 2 3 4 5 6 7 8 9 10 11 12 13 | prune_samples(samples, x)
## S4 method for signature 'character,otu_table'
prune_samples(samples, x)
## S4 method for signature 'character,sample_data'
prune_samples(samples, x)
## S4 method for signature 'character,phyloseq'
prune_samples(samples, x)
## S4 method for signature 'logical,ANY'
prune_samples(samples, x)
|
samples |
(Required). A character vector of the samples in object x that you want to
keep – OR alternatively – a logical vector where the kept samples are TRUE, and length
is equal to the number of samples in object x. If |
x |
A phyloseq object. |
The class of the object returned by prune_samples
matches
the class of the phyloseq object, x
.
1 2 3 4 5 6 | data(GlobalPatterns)
# Subset to just the Chlamydiae phylum.
GP.chl <- subset_taxa(GlobalPatterns, Phylum=="Chlamydiae")
# Remove the samples that have less than 20 total reads from Chlamydiae
GP.chl <- prune_samples(sample_sums(GP.chl)>=20, GP.chl)
# (p <- plot_tree(GP.chl, color="SampleType", shape="Family", label.tips="Genus", size="abundance"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.