Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto tests #3

Merged
merged 2 commits into from
Jul 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
^.*\.Rproj$
^\.Rproj\.user$
.github
BIGf90_0.3.0.pdf
49 changes: 49 additions & 0 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches: [main, auto_tests]
pull_request:
branches: [main, auto_tests]

name: R-CMD-check

jobs:
R-CMD-check:
runs-on: ${{ matrix.config.os }}

name: ${{ matrix.config.os }} (${{ matrix.config.r }})

strategy:
fail-fast: false
matrix:
config:
- {os: macos-latest, r: 'release'}
- {os: windows-latest, r: 'release'}
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
- {os: ubuntu-latest, r: 'release'}
- {os: ubuntu-latest, r: 'oldrel-1'}

env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes

steps:
- uses: actions/checkout@v3

- uses: r-lib/actions/setup-pandoc@v2

- uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.config.r }}
http-user-agent: ${{ matrix.config.http-user-agent }}
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::rcmdcheck
needs: check

- uses: r-lib/actions/check-r-package@v2
with:
upload-snapshots: true
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.DS_store
.Rproj.user
BIGf90.Rproj
10 changes: 6 additions & 4 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
Package: BIGf90
Title: R face front for running K-fold crossvalidation, estimating ebvs and variance component estimation with Blupf90 modules
Version: 0.3.0
Authors: Josue Chinchilla-Vargas, Alexander M. Sandercock and Breeding Insight Team
Maintainer:Josue Chinchilla-Vargas <jc3635@cornell.edu>
Authors@R: c(person("Josue", "Chinchilla-Vargas", role = c("aut", "cre"), email = "jc3635@cornell.edu"),
person("Alexander", "Sandercock", role = "aut"),
person("Breeding Insight Team", role = "ctb"))
Maintainer: Josue Chinchilla-Vargas <jc3635@cornell.edu>
Description: This package provides R functions to run several BLUPf90 modules. Along with an R function to run K-fold crossvalidation for univariate analyses through blupf90+.
The output table from the K-fold crossvalidation function calculates accuracy as cor(y,ebv^) and cor(y*,ebv^) along with bias of ebvs calculated as reg(y,ebv.)
You will need to create the .par file to feed into Renumf90 manually. Once this is done, there are functions to run Renumf90, Blupf90+, Predictf90, Gibbsf90+ and Postgibbsf90.
If you need to learn how to use the blupf90 suite of programs refer to nce.ads.uga.edu/wiki/doku.php?id=start. Please remember to cite Blupf90 appropriately along with this package when used for publications.
To run the functions in this package you will need to have a directory with all the blupf90 executables so that you can indicate the path for R to find the execs.
As of version 0.3.0, all functions have been tested in PC and Unix environments, we have noticed that PC environments tend to have issues about permissions, so it is advised to run RStudio as administrator when planning to use this package.
License: Apache 2.0
License: Apache License (== 2.0)
Encoding: UTF-8
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.3.1
RoxygenNote: 7.3.2
Imports:
base (>= 4.3.1),
dplyr (>= 1.1.4),
Expand Down
8 changes: 4 additions & 4 deletions R/clean_ebvs.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
#' @return a tab-separated file that includes the original id and ebv for all individuals for which an EBV was produced.
#' @import dplyr
#' @examples
#' ## Example
#'
#'clean_ebvs(3,
#'"my_clean_ebvs")
#'
#' \donttest{
#' #clean_ebvs(3, "my_clean_ebvs")
#' }
#'
#' @export
clean_ebvs <- function(random_effect_col, solutions_output_name) {

Expand Down
12 changes: 7 additions & 5 deletions R/run_renum.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@
#' @param path_2_execs path to a folder that holds the renumf90 executable. This field should be in quotes "".
#' @param raw_par_file name of the .par file that will be processed. This field should be in quotes "".
#' @examples
#' ## Example
#'
#' # run_renum(path_2_execs = "/Users/johndoe/Desktop/bf90_execs/",
#' raw_par_file = "weight_2022_no_cov_cv.par")
#'
#'
#' \donttest{
#' #run_renum(path_2_execs = "path/bf90_execs/",
#' #raw_par_file = "weight_2022_no_cov_cv.par")
#' }
#'
#'
#' @export
run_renum <- function(path_2_execs, raw_par_file) {

Expand Down
6 changes: 3 additions & 3 deletions man/clean_ebvs.Rd

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

8 changes: 5 additions & 3 deletions man/run_renum.Rd

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

Loading