Skip to content

Commit

Permalink
Merge branch 'refactor/polishing'
Browse files Browse the repository at this point in the history
  • Loading branch information
DominikRafacz committed Jan 21, 2021
2 parents 32d2074 + f668496 commit 57272d4
Show file tree
Hide file tree
Showing 19 changed files with 27 additions and 49 deletions.
26 changes: 9 additions & 17 deletions .github/workflows/check-bioc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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'
Expand All @@ -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
Expand All @@ -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")
Expand Down
5 changes: 3 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -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 = "[email protected]",
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion R/doc-tidysq.R
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion R/export_sq.R
Original file line number Diff line number Diff line change
Expand Up @@ -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
#'
Expand Down
2 changes: 1 addition & 1 deletion R/substitute_letters.R
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 2 additions & 0 deletions R/util-checkmate-functions.R
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion R/write_fasta.R
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down
2 changes: 2 additions & 0 deletions inst/WORDLIST
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ atp
Available’
Avbelj
Bae
Bąkała
Bastolla
bata
Beghin
Expand Down Expand Up @@ -292,6 +293,7 @@ Venanzi
VFF
Vihinen
von
vectorized
Waals
Warme
wat
Expand Down
3 changes: 0 additions & 3 deletions inst/include/tidysq/constants/WarningLevel.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#pragma clang diagnostic push
#pragma ide diagnostic ignored "cert-err58-cpp"
#pragma once

#include <unordered_map>
Expand All @@ -22,4 +20,3 @@ namespace tidysq::constants {
{"error", LVL_ERROR}
};
}
#pragma clang diagnostic pop
4 changes: 0 additions & 4 deletions inst/include/tidysq/constants/ambiguous_maps.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#pragma clang diagnostic push
#pragma ide diagnostic ignored "cert-err58-cpp"
#pragma once

#include <map>
Expand Down Expand Up @@ -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
4 changes: 0 additions & 4 deletions inst/include/tidysq/constants/complement_tables.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#pragma clang diagnostic push
#pragma ide diagnostic ignored "cert-err58-cpp"
#pragma once

#include "tidysq/tidysq-typedefs.h"
Expand All @@ -16,5 +14,3 @@ namespace tidysq::constants {
{14u, 14u}
};
}

#pragma clang diagnostic pop
4 changes: 0 additions & 4 deletions inst/include/tidysq/constants/standard_letters.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#pragma clang diagnostic push
#pragma ide diagnostic ignored "cert-err58-cpp"
#pragma once

#include <unordered_map>
Expand All @@ -21,5 +19,3 @@ namespace tidysq::constants {
"S", "T", "U", "V", "W", "X", "Y", "Z", "-", "*"}}
};
}

#pragma clang diagnostic pop
4 changes: 0 additions & 4 deletions inst/include/tidysq/constants/translate_tables.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#pragma clang diagnostic push
#pragma ide diagnostic ignored "cert-err58-cpp"
#pragma once

#include "tidysq/tidysq-typedefs.h"
Expand Down Expand Up @@ -210,5 +208,3 @@ namespace tidysq::constants {
}}
};
}

#pragma clang diagnostic pop
2 changes: 1 addition & 1 deletion man/export_sq.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/substitute_letters.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/tidysq-package.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/write_fasta.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions vignettes/advanced-alphabet.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion vignettes/quick-start.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down

0 comments on commit 57272d4

Please sign in to comment.