Skip to content

Commit

Permalink
Merge pull request #10 from mrc-ide/feature/pass_checks
Browse files Browse the repository at this point in the history
tweaks to pass checks and added github actions
  • Loading branch information
bobverity committed Dec 11, 2023
2 parents 2ac0544 + 837eee4 commit acb21b7
Show file tree
Hide file tree
Showing 133 changed files with 5,274 additions and 7,843 deletions.
Binary file added .DS_Store
Binary file not shown.
2 changes: 2 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,5 @@ vignettes_src
docs
vignettes/introduction_cache
vignettes_src/introduction_cache
^\.github$
^index.md$
1 change: 1 addition & 0 deletions .github/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.html
47 changes: 47 additions & 0 deletions .github/workflows/checks_develop.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Workflow derived from https://github.com/r-lib/actions/tree/master/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches:
- develop
pull_request:
branches:
- develop

name: checks_develop

jobs:
R-CMD-check:

runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config:
- {os: windows-latest, r: 'release'}
- {os: macOS-latest, r: 'release'}
- {os: ubuntu-20.04, r: 'release'}

env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes
steps:
- name: Checkout Repository
uses: actions/checkout@v3

- name: Set up R
uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.config.r }}

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

- name: Build Package
uses: r-lib/actions/check-r-package@v2
with:
args: 'c("--no-manual", "--ignore-vignettes")'
build_args: 'c("--no-build-vignettes")'
47 changes: 47 additions & 0 deletions .github/workflows/checks_master.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Workflow derived from https://github.com/r-lib/actions/tree/master/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches:
- master
pull_request:
branches:
- master

name: checks_master

jobs:
R-CMD-check:

runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config:
- {os: windows-latest, r: 'release'}
- {os: macOS-latest, r: 'release'}
- {os: ubuntu-20.04, r: 'release'}

env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes
steps:
- name: Checkout Repository
uses: actions/checkout@v3

- name: Set up R
uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.config.r }}

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

- name: Build Package
uses: r-lib/actions/check-r-package@v2
with:
args: 'c("--no-manual", "--ignore-vignettes")'
build_args: 'c("--no-build-vignettes")'
8 changes: 0 additions & 8 deletions .travis.yml

This file was deleted.

19 changes: 11 additions & 8 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,17 @@ Package: MIPanalyzer
Type: Package
Title: Filtering and analysis of MIP data
Version: 1.0.0
Author: Bob Verity
Maintainer: Bob Verity <r.verity@imperial.ac.uk>
Authors@R: as.person(c(
"Bob Verity <r.verity@imperial.ac.uk> [aut, cre]"
))
Description: Filtering and analysis of MIP data.
License: MIT + file LICENSE
Encoding: UTF-8
LazyData: true
LinkingTo:
Rcpp
Imports:
Rcpp,
vcfR,
magrittr,
dplyr,
reshape2,
RColorBrewer,
Expand All @@ -23,12 +22,16 @@ Imports:
ape,
stringr,
methods,
rworldmap
RoxygenNote: 7.0.2
rworldmap,
coda,
data.table
RoxygenNote: 7.2.3
SystemRequirements: C++11
Suggests:
testthat,
covr,
knitr,
rmarkdown
rmarkdown,
here,
kableExtra,
tidyverse
VignetteBuilder: knitr
13 changes: 8 additions & 5 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@ S3method(print,mipanalyzer_biallelic)
S3method(print,mipanalyzer_multiallelic)
S3method(summary,mipanalyzer_biallelic)
S3method(summary,mipanalyzer_multiallelic)
export("%>%")
export(MIPanalyzerbi2vcfR)
export(Pf_chrom_lengths)
export(check_MIPanalyzer_loaded)
export(explore_filter_coverage_loci)
export(explore_filter_coverage_samples)
export(filter_counts)
Expand All @@ -26,6 +25,7 @@ export(inbreeding_mle)
export(is.mipanalyzer_biallelic)
export(is.mipanalyzer_multiallelic)
export(lonlat_to_bearing)
export(mipanalyzer_biallelic_to_vcfR)
export(mipanalyzer_file)
export(pca_wsaf)
export(pcoa_genomic_distance)
Expand All @@ -39,14 +39,17 @@ export(print_full)
export(rbetabinom)
export(rdirichlet)
export(sim_biallelic)
export(vcf2mipanalyzer_biallelic)
export(vcf2mipanalyzer_multiallelic)
export(vcf_to_mipanalyzer_biallelic)
export(vcf_to_mipanalyzer_multiallelic)
import(ggplot2)
importFrom(RColorBrewer,brewer.pal)
importFrom(Rcpp,sourceCpp)
importFrom(ape,pcoa)
importFrom(coda,geweke.diag)
importFrom(coda,mcmc)
importFrom(data.table,fread)
importFrom(grDevices,grey)
importFrom(magrittr,"%>%")
importFrom(methods,is)
importFrom(methods,new)
importFrom(plotly,layout)
importFrom(plotly,plot_ly)
Expand Down
27 changes: 27 additions & 0 deletions R/MIPanalyzer.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#------------------------------------------------
#' @title MIPanalyzer
#'
#' @description This package can be used to read in raw molecular inversion
#' probe (MIP) data from vcf into a format that is convenient to work with.
#' Data can be filtered based on counts, frequencies, missingness or other
#' criteria. Filtered data can be analysed by common methods including PCA and
#' various pairwise genetic metrics, and can be visualised in multiple ways.
#' This package is intended to evolve as new MIP analyses are needed, thereby
#' making it easy to repeat common analyses as new data becomes available.
#'
#' @docType package
#' @name MIPanalyzer
NULL

#------------------------------------------------
# link to Rcpp
#' @useDynLib MIPanalyzer, .registration = TRUE
#' @importFrom Rcpp sourceCpp
NULL

#------------------------------------------------
# unload dll when package is unloaded
#' @noRd
.onUnload <- function(libpath) {
library.dynam.unload("MIPanalyzer", libpath)
}
Loading

0 comments on commit acb21b7

Please sign in to comment.