diff --git a/.github/workflows/check-bioc.yml b/.github/workflows/check-bioc.yml index c93d2b9c..9f0b285d 100644 --- a/.github/workflows/check-bioc.yml +++ b/.github/workflows/check-bioc.yml @@ -63,9 +63,6 @@ jobs: GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} steps: - ## to avoid conversion of configure.ac - - name: Configure git - run: git config --global core.autocrlf false ## Set the R library to the directory matching the ## R packages cache step further below when running on Docker (Linux). @@ -76,7 +73,7 @@ jobs: echo ".libPaths('/__w/_temp/Library')" > ~/.Rprofile ## Most of these steps are the same as the ones in - ## https://github.com/r-lib/actions/blob/master/examples/check -standard.yaml + ## https://github.com/r-lib/actions/blob/master/examples/check-standard.yaml ## If they update their steps, we will also need to update ours. - name: Checkout Repository uses: actions/checkout@v2 @@ -125,10 +122,6 @@ jobs: - name: Install macOS system dependencies if: matrix.config.os == 'macOS-latest' run: | - mkdir ~/.R - touch ~/.R/Makevars - echo "CXX_STD = CXX17" > ~/.R/Makevars - ## Enable installing XML from source if needed brew install libxml2 echo "XML_CONFIG=/usr/local/opt/libxml2/bin/xml2-config" >> $GITHUB_ENV @@ -140,8 +133,8 @@ jobs: ## For textshaping, required by ragg, and required by pkgdown brew install harfbuzz fribidi - ## Helps compile RCurl from source; added forced ignoring deps - brew uninstall --ignore-dependencies curl + ## For installing usethis's dependency gert + brew install libgit2 - name: Install Windows system dependencies if: runner.os == 'Windows' @@ -160,7 +153,7 @@ jobs: BiocManager::install(version = "${{ matrix.config.bioc }}", ask = FALSE) shell: Rscript {0} - - name: Install dependencies + - name: Install dependencies pass 1 run: | ## Try installing the package dependencies in steps. First the local ## dependencies, then any remaining dependencies to avoid the @@ -169,19 +162,18 @@ jobs: ## https://github.com/r-lib/remotes/issues/296 ## Ideally, all dependencies should get installed in the first pass. - ## Temporary for now due to https://github.com/ropensci/RefManageR/issues/79 - remotes::install_github("ropensci/bibtex") - remotes::install_github("ropensci/RefManageR") - remotes::install_github("cboettig/knitcitations") - ## Pass #1 at installing dependencies message(paste('****', Sys.time(), 'pass number 1 at installing dependencies: local dependencies ****')) remotes::install_local(dependencies = TRUE, repos = BiocManager::repositories(), build_vignettes = TRUE, upgrade = TRUE) + continue-on-error: true + shell: Rscript {0} + - name: Install dependencies pass 2 + run: | ## Pass #2 at installing dependencies message(paste('****', Sys.time(), 'pass number 2 at installing dependencies: any remaining dependencies ****')) remotes::install_local(dependencies = TRUE, repos = BiocManager::repositories(), build_vignettes = TRUE, upgrade = TRUE) - + ## For running the checks message(paste('****', Sys.time(), 'installing rcmdcheck and BiocCheck ****')) remotes::install_cran("rcmdcheck") diff --git a/DESCRIPTION b/DESCRIPTION index 465128dd..2edd4c1f 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: tidysq Type: Package Title: Tidy processing and analysis of biological sequences -Version: 0.9.0 +Version: 1.0.0 Date: 2020-12-10 Authors@R: c(person("Dominik", "Rafacz", email = "dominikrafacz@gmail.com", @@ -60,7 +60,8 @@ Suggests: spelling, testthat (>= 2.1.0), withr (>= 2.2.0), - knitr + knitr, + purrr License: GPL (>= 2) URL: https://github.com/michbur/tidysq BugReports: https://github.com/michbur/tidysq/issues diff --git a/R/doc-tidysq.R b/R/doc-tidysq.R index 966bc2b2..31e6b536 100644 --- a/R/doc-tidysq.R +++ b/R/doc-tidysq.R @@ -2,7 +2,7 @@ #' #' @description The \code{tidysq} package is a toolbox for the analysis of #' biological sequences in a tidy way. -#' @author Michal Burdukiewicz, Dominik Rafacz, Leon Eyrich Jessen +#' @author Michal Burdukiewicz, Dominik Rafacz, Mateusz Bąkała, Leon Eyrich Jessen #' @docType package #' @importFrom stats na.omit rnorm setNames #' @importFrom utils download.file installed.packages diff --git a/R/export_sq.R b/R/export_sq.R index 7e7c9540..5d4e6da6 100644 --- a/R/export_sq.R +++ b/R/export_sq.R @@ -9,7 +9,7 @@ #' #' @template x #' @param export_format [\code{character(1)}]\cr -#' A string indicating desired class (with specified package for disambiguity). +#' A string indicating desired class (with specified package for clarity). #' @template name #' @template three-dots #' diff --git a/R/substitute_letters.R b/R/substitute_letters.R index e7712c5e..856e4acf 100644 --- a/R/substitute_letters.R +++ b/R/substitute_letters.R @@ -1,6 +1,6 @@ #' Substitute letters in a sequence #' -#' @description Replaces all occurrfuences of a letter with another. +#' @description Replaces all occurrences of a letter with another. #' #' @template x #' @param encoding [\code{character} || \code{numeric}]\cr diff --git a/R/util-checkmate-functions.R b/R/util-checkmate-functions.R index 15365166..26e8e647 100644 --- a/R/util-checkmate-functions.R +++ b/R/util-checkmate-functions.R @@ -1,3 +1,5 @@ +globalVariables("x") + check_sq_type <- function(type, null.ok = FALSE, unt.ok = FALSE, atp.ok = FALSE) { check_choice(type, choices = c("dna_bsc", "dna_ext", "rna_bsc", diff --git a/R/write_fasta.R b/R/write_fasta.R index 823645ad..f25e3660 100644 --- a/R/write_fasta.R +++ b/R/write_fasta.R @@ -15,7 +15,7 @@ #' #' @details #' Whenever a name has more letters than \code{width} parameter, nothing -#' happens, as only sequences are splited to fit within designated space. +#' happens, as only sequences are split to fit within designated space. #' #' @examples #' \dontrun{ diff --git a/inst/WORDLIST b/inst/WORDLIST index 36181607..93221b82 100644 --- a/inst/WORDLIST +++ b/inst/WORDLIST @@ -25,6 +25,7 @@ atp Available’ Avbelj Bae +Bąkała Bastolla bata Beghin @@ -292,6 +293,7 @@ Venanzi VFF Vihinen von +vectorized Waals Warme wat diff --git a/inst/include/tidysq/constants/WarningLevel.h b/inst/include/tidysq/constants/WarningLevel.h index ac51b506..fab45808 100644 --- a/inst/include/tidysq/constants/WarningLevel.h +++ b/inst/include/tidysq/constants/WarningLevel.h @@ -1,5 +1,3 @@ -#pragma clang diagnostic push -#pragma ide diagnostic ignored "cert-err58-cpp" #pragma once #include @@ -22,4 +20,3 @@ namespace tidysq::constants { {"error", LVL_ERROR} }; } -#pragma clang diagnostic pop \ No newline at end of file diff --git a/inst/include/tidysq/constants/ambiguous_maps.h b/inst/include/tidysq/constants/ambiguous_maps.h index 9ff0bdb4..fd565e1a 100644 --- a/inst/include/tidysq/constants/ambiguous_maps.h +++ b/inst/include/tidysq/constants/ambiguous_maps.h @@ -1,5 +1,3 @@ -#pragma clang diagnostic push -#pragma ide diagnostic ignored "cert-err58-cpp" #pragma once #include @@ -44,5 +42,3 @@ namespace tidysq::constants { {"N", {"A", "C", "G", "U", "W", "S", "M", "K", "R", "Y", "B", "D", "H", "V", "N"}} }; } - -#pragma clang diagnostic pop \ No newline at end of file diff --git a/inst/include/tidysq/constants/complement_tables.h b/inst/include/tidysq/constants/complement_tables.h index 1a03b949..f8c95d59 100644 --- a/inst/include/tidysq/constants/complement_tables.h +++ b/inst/include/tidysq/constants/complement_tables.h @@ -1,5 +1,3 @@ -#pragma clang diagnostic push -#pragma ide diagnostic ignored "cert-err58-cpp" #pragma once #include "tidysq/tidysq-typedefs.h" @@ -16,5 +14,3 @@ namespace tidysq::constants { {14u, 14u} }; } - -#pragma clang diagnostic pop \ No newline at end of file diff --git a/inst/include/tidysq/constants/standard_letters.h b/inst/include/tidysq/constants/standard_letters.h index 9dae5dea..b6ddbca0 100644 --- a/inst/include/tidysq/constants/standard_letters.h +++ b/inst/include/tidysq/constants/standard_letters.h @@ -1,5 +1,3 @@ -#pragma clang diagnostic push -#pragma ide diagnostic ignored "cert-err58-cpp" #pragma once #include @@ -21,5 +19,3 @@ namespace tidysq::constants { "S", "T", "U", "V", "W", "X", "Y", "Z", "-", "*"}} }; } - -#pragma clang diagnostic pop \ No newline at end of file diff --git a/inst/include/tidysq/constants/translate_tables.h b/inst/include/tidysq/constants/translate_tables.h index 210a939d..17298cfb 100644 --- a/inst/include/tidysq/constants/translate_tables.h +++ b/inst/include/tidysq/constants/translate_tables.h @@ -1,5 +1,3 @@ -#pragma clang diagnostic push -#pragma ide diagnostic ignored "cert-err58-cpp" #pragma once #include "tidysq/tidysq-typedefs.h" @@ -210,5 +208,3 @@ namespace tidysq::constants { }} }; } - -#pragma clang diagnostic pop \ No newline at end of file diff --git a/man/export_sq.Rd b/man/export_sq.Rd index e54b8076..9b9e8444 100644 --- a/man/export_sq.Rd +++ b/man/export_sq.Rd @@ -11,7 +11,7 @@ export_sq(x, export_format, name = NULL, ...) An object this function is applied to.} \item{export_format}{[\code{character(1)}]\cr -A string indicating desired class (with specified package for disambiguity).} +A string indicating desired class (with specified package for clarity).} \item{name}{[\code{character}]\cr Vector of sequence names. Must be of the same length as \code{sq} object. diff --git a/man/substitute_letters.Rd b/man/substitute_letters.Rd index 642b6159..da9d950a 100644 --- a/man/substitute_letters.Rd +++ b/man/substitute_letters.Rd @@ -29,7 +29,7 @@ An \code{\link[=sq-class]{sq}} object of \strong{atp} type with updated alphabet. } \description{ -Replaces all occurrfuences of a letter with another. +Replaces all occurrences of a letter with another. } \details{ \code{substitute_letters} allows to replace unwanted letters in any sequence diff --git a/man/tidysq-package.Rd b/man/tidysq-package.Rd index ba247b97..d5ad1d84 100644 --- a/man/tidysq-package.Rd +++ b/man/tidysq-package.Rd @@ -10,5 +10,5 @@ The \code{tidysq} package is a toolbox for the analysis of biological sequences in a tidy way. } \author{ -Michal Burdukiewicz, Dominik Rafacz, Leon Eyrich Jessen +Michal Burdukiewicz, Dominik Rafacz, Mateusz Bąkała, Leon Eyrich Jessen } diff --git a/man/write_fasta.Rd b/man/write_fasta.Rd index d23eae05..325d64c9 100644 --- a/man/write_fasta.Rd +++ b/man/write_fasta.Rd @@ -36,7 +36,7 @@ a fasta file. } \details{ Whenever a name has more letters than \code{width} parameter, nothing -happens, as only sequences are splited to fit within designated space. +happens, as only sequences are split to fit within designated space. } \examples{ \dontrun{ diff --git a/vignettes/advanced-alphabet.Rmd b/vignettes/advanced-alphabet.Rmd index af2b3a97..ed181560 100644 --- a/vignettes/advanced-alphabet.Rmd +++ b/vignettes/advanced-alphabet.Rmd @@ -25,11 +25,11 @@ sq_dna <- sq(c("CTGAATGCAGT", "ATGCCGT", "CAGACCATT")) alphabet(sq_dna) ``` -It is strongly discouraged to manually assign different alphabet, as it may result in undesirable behaviour. +It is strongly discouraged to manually assign different alphabet, as it may result in undesirable behavior. ## Standard alphabets -Alphabets can be divided into standard and non-standard types. Both these groups have similar behaviour, but standard alphabets have additional functionalities available due to their biological interpretation. +Alphabets can be divided into standard and non-standard types. Both these groups have similar behavior, but standard alphabets have additional functionalities available due to their biological interpretation. Standard alphabets can be subdivided into basic and extended alphabets, both groups closely linked. For every standard alphabet there exists a type such that if an `sq` object has this type, then its `alphabet` attribute has this alphabet as value. diff --git a/vignettes/quick-start.Rmd b/vignettes/quick-start.Rmd index 223446bf..ab09ab20 100644 --- a/vignettes/quick-start.Rmd +++ b/vignettes/quick-start.Rmd @@ -36,7 +36,7 @@ sq_dna There are several thing to note. First, each sequence is an element of `sq` object. Many operations are vectorized --- they are applied to all sequences of a vector --- and `sq` objects are no different in this regard. Second, the first line of output says: `basic DNA sequences list`. This means that all sequences of this object are of DNA type and do not use ambiguous letters (more about that in "Advanced alphabet techniques" vignette). -## Subsequencing +## Subsetting sequences Manipulating sequence objects is an integral part of `tidysq`. `sq` objects can be easily subsetted using usual R syntax: