From 7ee55ea3bc83a81115c06a8ea69e7516468fe874 Mon Sep 17 00:00:00 2001 From: brendanf Date: Sun, 14 Jun 2020 23:36:05 +0200 Subject: [PATCH] address warnings in R CMD check for r-devel --- .travis.yml | 1 + R/tzara.R | 28 +++++++++++++++------------- man/cluster_consensus.Rd | 13 +++++++------ man/combine_derep.Rd | 7 ++++--- man/extract_region.Rd | 4 ++-- man/seqhash.Rd | 4 ++-- 6 files changed, 31 insertions(+), 26 deletions(-) diff --git a/.travis.yml b/.travis.yml index 25b4120..1087fd2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,6 +18,7 @@ bioc_packages: - Biostrings - ShortRead - odseq + - dada2 after_success: - R CMD INSTALL $PKG_TARBALL - Rscript -e 'lintr::lint_package()' diff --git a/R/tzara.R b/R/tzara.R index 439cb1b..0f2e298 100644 --- a/R/tzara.R +++ b/R/tzara.R @@ -61,9 +61,10 @@ flog_toc <- function( #' "\code{map}" (\code{integer}), giving the mapping from the #' "\code{idx}"th sequence in "\code{file}" to a sequence in #' "\code{fasta}"} -#' \item{\code{$fasta} (\code{\link[Biostrings]{DNAStringSet}})}{all unique -#' sequences; the name of each sequence is an \code{integer} which -#' matches a value in \code{map$newmap}} +#' \item{\code{$fasta} ( +#' \code{\link[Biostrings:XStringSet-class]{DNAStringSet-class}})}{all +#' unique sequences; the name of each sequence is an \code{integer} +#' which matches a value in \code{map$newmap}} #' } #' @export combine_derep <- function(dereps, .data = NULL, ...) { @@ -292,8 +293,8 @@ dadamap.list <- function(derep, dada, filename = names(derep), seq_id = NULL, #' Individually hash biological sequences #' -#' @param seq (\code{character} or \code{\link[Biostrings]{XStringSet}}) the -#' sequences to hash. +#' @param seq (\code{character} or \code{\link[Biostrings]{XStringSet-class}}) +#' the sequences to hash. #' @param algo (\code{character}) a hash algorithm supported by #' \code{\link[digest]{digest}}. default: "xxhash32" #' @param len (\code{integer}) number of characters to keep from each hash @@ -469,7 +470,8 @@ has_alphabet <- function(seq, alphabet) { #' but which has been clustered based on sequence variant identity in one #' subregion. #' -#' @param seq (\code{character} vector or \code{\link[Biostrings]{XStringSet}}) +#' @param seq (\code{character} vector or +#' \code{\link[Biostrings]{XStringSet-class}}) #' The sequences to calculate a consensus for. #' @param nread (\code{integer} vector) For the purposes of calculating the #' consensus, consider each read to occur \code{nread} times. Supplying @@ -485,9 +487,9 @@ has_alphabet <- function(seq, alphabet) { #' representing the consensus sequence for reads which were included in #' the consensus, or \code{NA_character_} for reads which were initially #' \code{NA} or which were removed from the consensus alignment as -#' outliers. For the \code{\link[Biostrings]{XStringSet}} method, which -#' does not allow \code{NA} entries, these elements are missing from the -#' set (this can be deduced by the names). +#' outliers. For the \code{\link[Biostrings]{XStringSet-class}} method, +#' which does not allow \code{NA} entries, these elements are missing from +#' the set (this can be deduced by the names). #' @param ... passed to methods #' #' @details The sequences are first aligned using @@ -504,8 +506,8 @@ has_alphabet <- function(seq, alphabet) { #' ambiguous base representing at least 50\% of the reads at that position is #' chosen for nucleotide sequences, or \code{"X"} for amino acids. #' -#' @return an \code{\link[Biostrings]{XStringSet}} representing the consensus -#' sequence. +#' @return an \code{\link[Biostrings]{XStringSet-class}} representing the +#' consensus sequence. #' #' @export @@ -641,8 +643,8 @@ cluster_consensus.XStringSet <- #' @param ... Passed to methods. #' #' @return (\code{object} of the same class as \code{seq}, or if \code{seq} -#' is a filename, \code{\link[Biostrings]{XStringSet}} if \code{format -#' = "fasta"}, \code{\link[Biostrings]{QualityScaledXStringSet}} if +#' is a filename, \code{\link[Biostrings]{XStringSet-class}} if \code{format +#' = "fasta"}, \code{\link[Biostrings]{QualityScaledXStringSet-class}} if #' \code{format = "fastq"}) The requested region from each of the input #' sequences where it was found. #' @export diff --git a/man/cluster_consensus.Rd b/man/cluster_consensus.Rd index 9473cab..490576e 100644 --- a/man/cluster_consensus.Rd +++ b/man/cluster_consensus.Rd @@ -21,7 +21,8 @@ cluster_consensus(seq, nread = 1, ..., ncpus = 1, simplify = TRUE) \method{cluster_consensus}{XStringSet}(seq, nread = 1, ..., ncpus = 1, simplify = TRUE) } \arguments{ -\item{seq}{(\code{character} vector or \code{\link[Biostrings]{XStringSet}}) +\item{seq}{(\code{character} vector or +\code{\link[Biostrings]{XStringSet-class}}) The sequences to calculate a consensus for.} \item{nread}{(\code{integer} vector) For the purposes of calculating the @@ -40,9 +41,9 @@ consensus. If \code{FALSE}, an object of the same type as \code{seq} representing the consensus sequence for reads which were included in the consensus, or \code{NA_character_} for reads which were initially \code{NA} or which were removed from the consensus alignment as -outliers. For the \code{\link[Biostrings]{XStringSet}} method, which -does not allow \code{NA} entries, these elements are missing from the -set (this can be deduced by the names).} +outliers. For the \code{\link[Biostrings]{XStringSet-class}} method, +which does not allow \code{NA} entries, these elements are missing from +the set (this can be deduced by the names).} \item{names}{(\code{character}) If \code{seq} is a \code{character} vector, names for the sequences.} @@ -51,8 +52,8 @@ names for the sequences.} use (calculated) RNA secondary structure in alignments.} } \value{ -an \code{\link[Biostrings]{XStringSet}} representing the consensus -sequence. +an \code{\link[Biostrings]{XStringSet-class}} representing the +consensus sequence. } \description{ This algorithm assumes that the sequences "should be" identical except for diff --git a/man/combine_derep.Rd b/man/combine_derep.Rd index 6661be3..9764e60 100644 --- a/man/combine_derep.Rd +++ b/man/combine_derep.Rd @@ -24,9 +24,10 @@ the length of \code{dereps}.} "\code{map}" (\code{integer}), giving the mapping from the "\code{idx}"th sequence in "\code{file}" to a sequence in "\code{fasta}"} - \item{\code{$fasta} (\code{\link[Biostrings]{DNAStringSet}})}{all unique - sequences; the name of each sequence is an \code{integer} which - matches a value in \code{map$newmap}} + \item{\code{$fasta} ( + \code{\link[Biostrings:XStringSet-class]{DNAStringSet-class}})}{all + unique sequences; the name of each sequence is an \code{integer} + which matches a value in \code{map$newmap}} } } \description{ diff --git a/man/extract_region.Rd b/man/extract_region.Rd index 13e0572..7bd7947 100644 --- a/man/extract_region.Rd +++ b/man/extract_region.Rd @@ -97,8 +97,8 @@ filename or list of filenames).} } \value{ (\code{object} of the same class as \code{seq}, or if \code{seq} - is a filename, \code{\link[Biostrings]{XStringSet}} if \code{format - = "fasta"}, \code{\link[Biostrings]{QualityScaledXStringSet}} if + is a filename, \code{\link[Biostrings]{XStringSet-class}} if \code{format + = "fasta"}, \code{\link[Biostrings]{QualityScaledXStringSet-class}} if \code{format = "fastq"}) The requested region from each of the input sequences where it was found. } diff --git a/man/seqhash.Rd b/man/seqhash.Rd index b2871b3..10bf6a3 100644 --- a/man/seqhash.Rd +++ b/man/seqhash.Rd @@ -13,8 +13,8 @@ seqhash(seq, algo = "xxhash32", len = NA, preserve_na = TRUE) \method{seqhash}{XStringSet}(seq, algo = "xxhash32", len = NA, preserve_na = TRUE) } \arguments{ -\item{seq}{(\code{character} or \code{\link[Biostrings]{XStringSet}}) the -sequences to hash.} +\item{seq}{(\code{character} or \code{\link[Biostrings]{XStringSet-class}}) +the sequences to hash.} \item{algo}{(\code{character}) a hash algorithm supported by \code{\link[digest]{digest}}. default: "xxhash32"}