diff --git a/NEWS.md b/NEWS.md index e257b79..7ab3c5c 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,6 +1,6 @@ # News -## Current +## metacoder 0.2.1 ### Bug fixes diff --git a/R/heat_tree.R b/R/heat_tree.R index a044829..5ed46e4 100644 --- a/R/heat_tree.R +++ b/R/heat_tree.R @@ -221,8 +221,6 @@ heat_tree.Taxmap <- function(.input, ...) { #' Passed to the \code{\link{igraph}} layout function used. #' #' -#' @section Elements -#' #' @section labels: #' #' The labels of nodes, edges, and trees can be added. @@ -232,8 +230,6 @@ heat_tree.Taxmap <- function(.input, ...) { #' #' Accepts a vector, the same length \code{taxon_id} or a factor of its length. #' -#' @section Element Properties -#' #' @section sizes: #' #' The size of nodes, edges, labels, and trees can be mapped to various conditions. @@ -422,7 +418,6 @@ heat_tree.Taxmap <- function(.input, ...) { #' node_size_interval = c(10, 100)) #' #' } -#' @keywords internal #' @method heat_tree default #' @rdname heat_tree heat_tree.default <- function(taxon_id, supertaxon_id, diff --git a/R/remove_ambiguous.R b/R/remove_ambiguous.R index fbf72f8..bdc6078 100644 --- a/R/remove_ambiguous.R +++ b/R/remove_ambiguous.R @@ -73,6 +73,9 @@ ambiguous_patterns <- function(unknown = TRUE, uncultured = TRUE, #' determining a match. #' #' @return TRUE/FALSE vector corresponding to \code{taxon_names} +#' +#' @examples +#' is_ambiguous(c("unknown", "uncultured", "homo sapiens", "kfdsjfdljsdf")) #' #' @export is_ambiguous <- function(taxon_names, unknown = TRUE, uncultured = TRUE, @@ -104,6 +107,14 @@ is_ambiguous <- function(taxon_names, unknown = TRUE, uncultured = TRUE, #' #' @return A \code{\link[taxa]{taxmap}} object #' +#' @examples +#' obj <- parse_tax_data(c("Plantae;Solanaceae;Solanum;lycopersicum", +#' "Plantae;Solanaceae;Solanum;tuberosum", +#' "Plantae;Solanaceae;Solanum;unknown", +#' "Plantae;Solanaceae;Solanum;uncultured", +#' "Plantae;UNIDENTIFIED")) +#' filter_ambiguous_taxa(obj) +#' #' @export filter_ambiguous_taxa <- function(obj, unknown = TRUE, uncultured = TRUE, name_regex = ".", ignore_case = TRUE, diff --git a/man/filter_ambiguous_taxa.Rd b/man/filter_ambiguous_taxa.Rd index f290e5b..7d6db6c 100644 --- a/man/filter_ambiguous_taxa.Rd +++ b/man/filter_ambiguous_taxa.Rd @@ -66,3 +66,12 @@ Works the same way as \code{\link[taxa]{filter_taxa}} for the most part. If you encounter a taxon name that represents an ambiguous taxon that is not filtered out by this function, let us know and we will add it. } +\examples{ +obj <- parse_tax_data(c("Plantae;Solanaceae;Solanum;lycopersicum", + "Plantae;Solanaceae;Solanum;tuberosum", + "Plantae;Solanaceae;Solanum;unknown", + "Plantae;Solanaceae;Solanum;uncultured", + "Plantae;UNIDENTIFIED")) +filter_ambiguous_taxa(obj) + +} diff --git a/man/heat_tree.Rd b/man/heat_tree.Rd index 7599ccd..710c523 100644 --- a/man/heat_tree.Rd +++ b/man/heat_tree.Rd @@ -255,10 +255,6 @@ The conditions are data (e.g. taxon statistics, such as abundance) represented i The mapping properties are parameters (e.g. transformations, range, interval, and layout) used to change the elements/element properties and how they are used to represent (or not represent) the various conditions. } -\section{Elements}{ -NA -} - \section{labels}{ @@ -270,10 +266,6 @@ Tree labels are displayed over their tree. Accepts a vector, the same length \code{taxon_id} or a factor of its length. } -\section{Element Properties}{ -NA -} - \section{sizes}{ @@ -476,4 +468,3 @@ heat_tree(x, node_label = taxon_names, node_size = n_obs, node_color = n_obs, } } -\keyword{internal} diff --git a/man/is_ambiguous.Rd b/man/is_ambiguous.Rd index aa20d12..9b0dff6 100644 --- a/man/is_ambiguous.Rd +++ b/man/is_ambiguous.Rd @@ -32,3 +32,7 @@ Find taxa with ambiguous names, such as "unknown" or "uncultured". If you encounter a taxon name that represents an ambiguous taxon that is not filtered out by this function, let us know and we will add it. } +\examples{ +is_ambiguous(c("unknown", "uncultured", "homo sapiens", "kfdsjfdljsdf")) + +} diff --git a/man/ncbi_taxon_sample.Rd b/man/ncbi_taxon_sample.Rd index c3b1e20..1cf869f 100644 --- a/man/ncbi_taxon_sample.Rd +++ b/man/ncbi_taxon_sample.Rd @@ -49,23 +49,24 @@ characters in length.} in the same genus as the one searched for. If \code{FALSE}, returns nothing if no match found.} -\item{fuzzy}{(logical) Whether to do fuzzy taxonomic ID search or exact search. If \code{TRUE}, -we use \code{xXarbitraryXx[porgn:__txid]}, but if \code{FALSE}, we use \code{txid}. -Default: \code{FALSE}} +\item{fuzzy}{(logical) Whether to do fuzzy taxonomic ID search or exact +search. If \code{TRUE}, we use \code{xXarbitraryXx[porgn:__txid]}, +but if \code{FALSE}, we use \code{txid}. Default: \code{FALSE}} -\item{limit}{(\code{numeric}) Number of sequences to search for and return. Max of 10,000. -If you search for 6000 records, and only 5000 are found, you will of course -only get 5000 back.} +\item{limit}{(\code{numeric}) Number of sequences to search for and return. +Max of 10,000. If you search for 6000 records, and only 5000 are found, +you will of course only get 5000 back.} -\item{entrez_query}{(\code{character}; length 1) An Entrez-format query to filter results with. -This is useful to search for sequences with specific characteristics. The format is the same -as the one used to seach genbank. +\item{entrez_query}{(\code{character}; length 1) An Entrez-format query to +filter results with. This is useful to search for sequences with specific +characteristics. The format is the same as the one used to seach genbank. (\url{https://www.ncbi.nlm.nih.gov/books/NBK3837/#EntrezHelp.Entrez_Searching_Options})} -\item{hypothetical}{(\code{logical}; length 1) If \code{FALSE}, an attempt will be made to not -return hypothetical or predicted sequences judging from accession number prefixs (XM and XR). -This can result in less than the \code{limit} being returned even if there are more sequences -available, since this filtering is done after searching NCBI.} +\item{hypothetical}{(\code{logical}; length 1) If \code{FALSE}, an attempt +will be made to not return hypothetical or predicted sequences judging from +accession number prefixs (XM and XR). This can result in less than the +\code{limit} being returned even if there are more sequences available, +since this filtering is done after searching NCBI.} \item{verbose}{(\code{logical}) If \code{TRUE}, progress messages will be printed.} } diff --git a/man/parse_qiime_biom.Rd b/man/parse_qiime_biom.Rd index 3c76fc1..0247a79 100644 --- a/man/parse_qiime_biom.Rd +++ b/man/parse_qiime_biom.Rd @@ -34,6 +34,7 @@ A taxmap object } \description{ Parses a file in BIOM format from QIIME into a taxmap object. +This also seems to work with files from MEGAN. I have not tested if it works with other BIOM files. } \details{