Skip to content

Commit 52aa083

Browse files
final check of function documentation
1 parent 9133f04 commit 52aa083

22 files changed

+35
-67
lines changed

R/calculations.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -294,9 +294,9 @@ rarefy_obs <- function(obj, dataset, sample_size = NULL, cols = NULL,
294294
#' order and length as \code{cols}.
295295
#' @param func The function to apply for each comparison. For each row in
296296
#' \code{dataset}, for each combination of groups, this function will
297-
#' receive the data for each treatment, passed a two character vectors.
297+
#' receive the data for each treatment, passed as two character vectors.
298298
#' Therefore the function must take at least 2 arguments corresponding to the
299-
#' two groups compared. The function should return a vector or list or
299+
#' two groups compared. The function should return a vector or list of
300300
#' results of a fixed length. If named, the names will be used in the output.
301301
#' The names should be consistent as well. A simple example is
302302
#' \code{function(x, y) mean(x) - mean(y)}. By default, the following function

R/dataset_documentation.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#' It contains OTU ids, taxonomic lineages, and the read counts for 50 samples.
55
#' See \code{\link{hmp_samples}} for the matching dataset of sample information.
66
#'
7-
#' The 50 samples were randomly elected such that there were 10 in each of 5
7+
#' The 50 samples were randomly selected such that there were 10 in each of 5
88
#' treatments: "Saliva", "Throat", "Stool", "Right_Antecubital_fossa",
99
#' "Anterior_nares". For each treatment, there were 5 samples from men and 5
1010
#' from women.
@@ -24,7 +24,7 @@ NULL
2424
#' matrix stored in \code{\link{hmp_otus}}. The "sample_id" column corresponds
2525
#' to the column names of \code{\link{hmp_otus}}.
2626
#'
27-
#' The 50 samples were randomly elected such that there were 10 in each of 5
27+
#' The 50 samples were randomly selected such that there were 10 in each of 5
2828
#' treatments: "Saliva", "Throat", "Stool", "Right_Antecubital_fossa",
2929
#' "Anterior_nares". For each treatment, there were 5 samples from men and 5
3030
#' from women. "Right_Antecubital_fossa" was renamed to "Skin" and

R/metacoder-package.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#' \item Standardized parsing of taxonomic information from diverse resources.
1010
#' \item Visualization of statistics distributed over taxonomic classifications.
1111
#' \item Evaluating potential metabarcoding primers for taxonomic specificity.
12-
#' \item Provide flexible functions for analyzing taxonomic and abundance data.
12+
#' \item Providing flexible functions for analyzing taxonomic and abundance data.
1313
#' }
1414
#'
1515
#' To accomplish these goals, \code{metacoder} leverages resources from other R packages, interfaces with
@@ -79,7 +79,7 @@
7979
#' \item \code{\link{ncbi_taxon_sample}}
8080
#' }
8181
#'
82-
#' @author Zachary Foster
82+
#' @author Zachary Foster and Niklaus Grunwald
8383
#' @name metacoder
8484
#' @docType package
8585
#' @useDynLib metacoder

R/parsers.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ parse_unite_general <- function(input = NULL, file = NULL, include_seqs = TRUE)
423423
#' Parse RDP FASTA release
424424
#'
425425
#' Parses an RDP reference FASTA file that can be found at
426-
#' https://rdp.cme.msu.edu/misc/resources.jsp.
426+
#' \url{https://rdp.cme.msu.edu/misc/resources.jsp}.
427427
#'
428428
#' The input file has a format like:
429429
#'
@@ -493,7 +493,7 @@ parse_rdp <- function(input = NULL, file = NULL, include_seqs = TRUE, add_specie
493493
#' Parse SILVA FASTA release
494494
#'
495495
#' Parses an SILVA FASTA file that can be found at
496-
#' https://www.arb-silva.de/no_cache/download/archive/release_128/Exports/.
496+
#' \url{https://www.arb-silva.de/no_cache/download/archive/release_128/Exports/}.
497497
#'
498498
#' The input file has a format like:
499499
#'

R/remove_ambiguous.R

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,12 @@ ambiguous_patterns <- function(unknown = TRUE, uncultured = TRUE,
6262

6363
#' Find ambiguous taxon names
6464
#'
65-
#' Find taxa with ambiguous names, such as "unknown" or "uncultured". If you
66-
#' encounter a taxon name that represents an ambiguous taxon that is not
65+
#' Find taxa with ambiguous names, such as "unknown" or "uncultured".
66+
#'
67+
#' If you encounter a taxon name that represents an ambiguous taxon that is not
6768
#' filtered out by this function, let us know and we will add it.
6869
#'
69-
#' @param taxon_names A taxmap object
70+
#' @param taxon_names A \code{\link[taxa]{taxmap}} object
7071
#' @inheritParams ambiguous_patterns
7172
#' @param ignore_case If \code{TRUE}, dont consider the case of the text when
7273
#' determining a match.
@@ -97,11 +98,11 @@ is_ambiguous <- function(taxon_names, unknown = TRUE, uncultured = TRUE,
9798
#' If you encounter a taxon name that represents an ambiguous taxon that is not
9899
#' filtered out by this function, let us know and we will add it.
99100
#'
100-
#' @param obj A taxmap object
101+
#' @param obj A \code{\link[taxa]{taxmap}} object
101102
#' @inheritParams is_ambiguous
102103
#' @inheritParams taxa::filter_taxa
103104
#'
104-
#' @return TRUE/FALSE vector corresponding to \code{taxon_names}
105+
#' @return A \code{\link[taxa]{taxmap}} object
105106
#'
106107
#' @export
107108
filter_ambiguous_taxa <- function(obj, unknown = TRUE, uncultured = TRUE,

R/sequence_download.R

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#' Download representative sequences for a taxon
22
#'
33
#' Downloads a sample of sequences meant to evenly capture the diversity of a given taxon.
4-
#' Can be used to get a shallow sampling of a vast groups.
4+
#' Can be used to get a shallow sampling of vast groups.
55
#' \strong{CAUTION:} This function can make MANY queries to Genbank depending on arguments given and
66
#' can take a very long time.
77
#' Choose your arguments carefully to avoid long waits and needlessly stressing NCBI's servers.
@@ -165,7 +165,6 @@ ncbi_taxon_sample <- function(name = NULL, id = NULL, target_rank,
165165
result <- traits::ncbi_searcher(id = id, seqrange = seqrange, getrelated = getrelated,
166166
fuzzy = fuzzy, limit = limit, entrez_query = entrez_query,
167167
hypothetical = hypothetical, verbose = verbose)
168-
print(result)
169168
} else {
170169
child_ranks <- factor(sub_taxa$childtaxa_rank,
171170
levels = levels(taxonomy_levels), ordered = TRUE)

R/writers.R

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,6 @@
3333
#' @param ids (\code{character} named by taxon ids) Sequence ids
3434
#' @param sequences (\code{character} named by taxon ids) Sequences
3535
#'
36-
#' @return \code{\link{taxmap}}
37-
#'
3836
#' @family writers
3937
#'
4038
#' @export
@@ -113,8 +111,6 @@ write_greengenes <- function(obj, tax_file = NULL, seq_file = NULL,
113111
#' "Sparassis crispa; MBUH-PIRJO&ILKKA94-1587/ss5"
114112
#' @param sequences (\code{character} named by taxon ids) Sequences
115113
#'
116-
#' @return \code{\link{taxmap}}
117-
#'
118114
#' @family writers
119115
#'
120116
#' @export
@@ -183,8 +179,6 @@ write_rdp <- function(obj, file,
183179
#' @param ids (\code{character} named by taxon ids) Sequence ids
184180
#' @param scores TBD
185181
#'
186-
#' @return \code{\link{taxmap}}
187-
#'
188182
#' @family writers
189183
#'
190184
#' @export
@@ -251,8 +245,6 @@ write_mothur_taxonomy <- function(obj, file,
251245
#' @param type (\code{character} named by taxon ids) What type of sequence it
252246
#' is. Usually "rep" or "ref".
253247
#'
254-
#' @return \code{\link{taxmap}}
255-
#'
256248
#' @family writers
257249
#'
258250
#' @export
@@ -322,10 +314,6 @@ write_unite_general <- function(obj, file,
322314
#' sequence.
323315
#' @param sequences (\code{character} named by taxon ids) Sequences
324316
#'
325-
#' @return \code{\link{taxmap}}
326-
#'
327-
#' @family writers
328-
#'
329317
#' @export
330318
write_silva_fasta <- function(obj, file,
331319
tax_names = obj$get_data("taxon_names")[[1]],

man/compare_groups.Rd

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/filter_ambiguous_taxa.Rd

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/hmp_otus.Rd

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)