View source: R/subset_methods.R
| subsetBins | R Documentation |
Create a SQM object containing only the requested bins, and the contigs and ORFs contained in them.
subsetBins(
SQM,
bins = NULL,
rank = NULL,
tax = NULL,
min_completeness = NULL,
max_contamination = NULL,
tax_source = "bins",
trusted_functions_only = FALSE,
ignore_unclassified_functions = FALSE,
rescale_tpm = TRUE,
rescale_copy_number = TRUE,
allow_empty = FALSE
)
SQM |
SQM object to be subsetted. |
bins |
character. Vector of bins to be selected. If provided, will override |
rank |
character. The taxonomic rank from which to select the desired taxa ( |
tax |
character. A taxon or vector of taxa to be selected. |
min_completeness |
numeric. Discard bins with completeness lower than this value (default |
max_contamination |
numeric. Discard bins with contamination higher than this value (default |
tax_source |
character, source data used for taxonomic subsetting (if |
trusted_functions_only |
logical. If |
ignore_unclassified_functions |
logical. If |
rescale_tpm |
logical. If |
rescale_copy_number |
logical. If |
allow_empty |
(internal use only). |
SQM object containing only the requested bins.
subsetContigs, subsetORFs
data(Hadza)
# Which are the most complete bins?
topBinNames = rownames(Hadza$bins$table)[order(Hadza$bins$table[,"Completeness"],
decreasing=TRUE)][1:2]
# Subset with the most complete bin.
topBin = subsetBins(Hadza, topBinNames[1])
# Subset with all the bins over 90% completeness
over90 = subsetBins(Hadza, min_completeness = 90)
# Subset with bins from the Phascolarctobacterium genus using SqueezeMeta's taxonomy
phasco = subsetBins(Hadza, tax_source = "bins_sqm", rank = "genus", tax = "Phascolarctobacterium")
# Subset with binsfrom the Bacteroidota phylum using GTDB taxonomy
bact = subsetBins(Hadza, tax_source = "bins_gtdb", rank = "phylum", tax = "Bacteroidota")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.