Skip to content

Commit

Permalink
Added changes for v2.3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
royfrancis committed Dec 27, 2020
1 parent 3ad0dba commit 6c2e83e
Show file tree
Hide file tree
Showing 289 changed files with 253,254 additions and 2,860 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ NEWS.md
.git/
vignettes/
vignettes/*
..Rcheck/
92 changes: 20 additions & 72 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,23 @@
## GITHUB ACTION FOR R PACKAGE
## Build, check, test, code coverage
## Required secrets
## CODECOV_TOKEN
## TOKEN

name: build
on:
pull_request:
push:
branches:
- master
jobs:
linux:
name: ubuntu
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
r: [3.5]
r: [3.5.3,3.6.3,4.0.0]
steps:
- uses: actions/checkout@v1
- uses: r-lib/actions/setup-r@master
Expand All @@ -21,20 +28,20 @@ jobs:
- name: Install linux dependencies
run: |
sudo apt-get update
sudo apt-get install -y libfreetype6-dev libcurl4-openssl-dev libssl-dev libxml2-dev
sudo apt-get install -y libfreetype6-dev libcurl4-openssl-dev libssl-dev libxml2-dev libnlopt-dev
- name: Check R installation
run: Rscript -e "print('R installation works!')"

- name: Cache R packages
id: cache-rp
uses: actions/cache@v1
id: cache-r-packages
uses: actions/cache@v2
with:
path: "/home/runner/work/_temp/Library"
key: ${{ runner.os }}-cache-rp-$(ls /home/runner/work/_temp/Library/ | sha256sum)
key: ${{runner.os}}-${{matrix.r}}-$(ls /home/runner/work/_temp/Library/ | sha256sum)

- name: Install R dependencies
if: steps.cache-rp.outputs.cache-hit != 'true'
if: steps.cache-r-packages.outputs.cache-hit != 'true'
run: |
Rscript -e "install.packages(c('remotes','covr','rcmdcheck'))"
Rscript -e "remotes::install_deps(pkgdir='.',dependencies=TRUE,repos='https://cran.rstudio.com/')"
Expand All @@ -44,93 +51,34 @@ jobs:
R CMD INSTALL .
- name: Code coverage
if: matrix.r == '4.0.0'
run: Rscript -e 'covr::codecov(token="${{ secrets.CODECOV_TOKEN }}",quiet=FALSE)'

windows:
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
r: [3.5,3.6]
r: [3.5.3,3.6.3,4.0.0]
steps:
- uses: actions/checkout@v1
- uses: r-lib/actions/setup-r@master
with:
r-version: ${{matrix.r}}

- name: Cache R packages
id: cache-rp
uses: actions/cache@v1
id: cache-r-packages
uses: actions/cache@v2
with:
path: "C:/R/library"
key: ${{ runner.os }}-cache-rp
key: ${{runner.os}}-${{matrix.r}}

- name: Install R dependencies
if: steps.cache-rp.outputs.cache-hit != 'true'
if: steps.cache-r-packages.outputs.cache-hit != 'true'
run: |
Rscript -e "install.packages(c('remotes','rcmdcheck','stringi'),lib='C:/R/library')"
Rscript -e "remotes::install_deps(pkgdir='.',dependencies=TRUE,repos='https://cran.rstudio.com/',lib='C:/R/library')"
Rscript -e "(print(.libPaths()))"
- name: RMD check and install package
run: |
Rscript -e "rcmdcheck::rcmdcheck(args = '--no-manual', error_on = 'warning', check_dir = 'check')"
R CMD INSTALL .
pkgdown:
needs: [mac, linux, windows]
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v1
- uses: r-lib/actions/setup-r@master
with:
r-version: 3.6.2
- uses: r-lib/actions/setup-pandoc@master

- name: Install linux dependencies
run: |
sudo apt-get update
sudo apt-get install -y libfreetype6-dev libcurl4-openssl-dev libssl-dev libxml2-dev
- name: Check R installation
run: Rscript -e "print('R installation works!')"

- name: Cache R packages
id: cache-rp
uses: actions/cache@v1
with:
path: "/home/runner/work/_temp/Library"
key: ${{ runner.os }}-cache-rp-$(ls /home/runner/work/_temp/Library/ | sha256sum)

- name: Install R dependencies
if: steps.cache-rp.outputs.cache-hit != 'true'
run: |
Rscript -e "install.packages(c('remotes','rcmdcheck','pkgdown'))"
Rscript -e "remotes::install_deps(pkgdir='.',dependencies=TRUE,repos='https://cran.rstudio.com/')"
- name: RMD check and install package
run: |
Rscript -e "rcmdcheck::rcmdcheck(args = '--no-manual', error_on = 'warning', check_dir = 'check')"
R CMD INSTALL .
- name: Render site, pull repo, copy folder, push repo
run: |
# Add git info
git config --global user.email "do_not_email@example.com"
git config --global user.name "gh_action"
# Render website
Rscript -e "pkgdown::build_site()"
# Clone gh-pages branch
git clone --single-branch --branch gh-pages "https://${{ secrets.TOKEN }}@github.com/${GITHUB_REPOSITORY}.git" tmprepo
cd tmprepo
rm -rf *
git add .
git commit -m "Old contents deleted."
cp -r ../docs/* .
echo "Folder contents at $(pwd):"
ls -lh
# Push changes back
git add .
git commit -m "Updated contents at $(date +%Y%m%d-%H%M%S)"
git push origin
31 changes: 12 additions & 19 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,37 +1,30 @@
Package: pophelper
Type: Package
Title: Tabulate, analyse and visualise admixture proportions from STRUCTURE, TESS, BAPS, ADMIXTURE and tab-delimited q-matrices
files
Version: 2.3.0
Date: 2019-08-15
Title: Tabulate, Analyse and Visualise Admixture Proportions
Version: 2.3.1
Date: 2020-12-28
Author: Roy Mathew Francis
Authors@R: person("Roy", "Francis", email = "roy.m.francis@outlook.com",role = c("aut", "cre"))
Maintainer: Roy Mathew Francis <roy.m.francis@outlook.com>
Description: A set of useful functions for processing admixture proportion files from the
population structure analysis softwares STRUCTURE, TESS, ADMIXTURE, BAPS, fastSTRUCTURE etc. The
package contains functions to read runs, tabulate runs, summarise runs, plot runs, estimate
K using Evanno method, export clumpp files, export distruct files and generate barplots.
Description: Process admixture proportion files from the population structure analysis tools such as 'STRUCTURE', 'TESS', 'ADMIXTURE', 'BAPS', 'fastSTRUCTURE' etc. The package contains functions to read runs, tabulate runs, summarise runs, plot runs, estimate K using 'EVANNO' method, export 'CLUMPP' files, export 'DISTRUCT' files and generate barplots.
URL: https://github.com/royfrancis/pophelper
Depends:
R(>= 3.5.0),
ggplot2
R(>= 3.5)
Imports:
ggplot2,
grDevices,
grid,
gridExtra,
gtable,
label.switching,
tidyr
stats,
tidyr,
utils
Suggests:
bookdown,
curl,
captioner,
showtext,
ggpubr,
knitr,
rmarkdown,
showtext,
testthat
License: GPL-3
Encoding: UTF-8
BugReports: https://github.com/royfrancis/pophelper/issues
VignetteBuilder: knitr
RoxygenNote: 6.1.1
RoxygenNote: 7.1.1
59 changes: 54 additions & 5 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,57 @@ export(splitQ)
export(summariseQ)
export(tabulateQ)
export(verifyGrplab)
import(grid)
import(gridExtra)
import(gtable)
import(label.switching)
import(tidyr)
importFrom(ggplot2,aes)
importFrom(ggplot2,element_blank)
importFrom(ggplot2,element_line)
importFrom(ggplot2,element_rect)
importFrom(ggplot2,element_text)
importFrom(ggplot2,facet_grid)
importFrom(ggplot2,facet_wrap)
importFrom(ggplot2,geom_bar)
importFrom(ggplot2,geom_blank)
importFrom(ggplot2,geom_errorbar)
importFrom(ggplot2,geom_line)
importFrom(ggplot2,geom_path)
importFrom(ggplot2,geom_point)
importFrom(ggplot2,geom_text)
importFrom(ggplot2,geom_vline)
importFrom(ggplot2,ggplot)
importFrom(ggplot2,ggplotGrob)
importFrom(ggplot2,guide_legend)
importFrom(ggplot2,guides)
importFrom(ggplot2,labeller)
importFrom(ggplot2,labs)
importFrom(ggplot2,margin)
importFrom(ggplot2,scale_fill_manual)
importFrom(ggplot2,scale_x_continuous)
importFrom(ggplot2,scale_x_discrete)
importFrom(ggplot2,scale_y_continuous)
importFrom(ggplot2,theme)
importFrom(ggplot2,theme_bw)
importFrom(ggplot2,theme_grey)
importFrom(ggplot2,unit)
importFrom(ggplot2,waiver)
importFrom(grDevices,colorRampPalette)
importFrom(grDevices,dev.off)
importFrom(grDevices,jpeg)
importFrom(grDevices,pdf)
importFrom(grDevices,png)
importFrom(grDevices,tiff)
importFrom(grid,unit.pmax)
importFrom(gridExtra,arrangeGrob)
importFrom(gridExtra,grid.arrange)
importFrom(label.switching,stephens)
importFrom(stats,aggregate)
importFrom(stats,as.formula)
importFrom(stats,ave)
importFrom(stats,sd)
importFrom(tidyr,pivot_longer)
importFrom(tidyr,pivot_wider)
importFrom(utils,packageDescription)
importFrom(utils,read.delim)
importFrom(utils,read.table)
importFrom(utils,setTxtProgressBar)
importFrom(utils,str)
importFrom(utils,txtProgressBar)
importFrom(utils,write.table)
16 changes: 15 additions & 1 deletion NEWS
Original file line number Diff line number Diff line change
@@ -1,7 +1,21 @@
pophelper 2.3.1
=================
* 28-Dec-2020
* Min req R-3.5.
* Error bars in first plot of Evanno method showed max/min rather than SD. Fixed to show SD.
* Input and output directories are to be specified explicitly by user as per CRAN guidelines
* cat and print statements replaced with message or warning
* Argument 'quiet' removed in all functions
* Fixed dependency issues
* Automatic CI testing added
* Fixed an issue where runs merged using mergeQ() produced a warning about missing attributes.
* In function clumppExport() and distructExport(), argument 'path' changed to 'exportpath' to be consistent with other functions.
* Fixed minor errors in documentation.

pophelper 2.3.0
=================
* 11-Aug-2019
* Built on R-3.6.0. Min req R-3.5.0.
* Min req R-3.5.0.
* Removed CLUMPP and DISTRUCT executables
* 'useexe' argument in ClumppExport() deprecated.
* Added alignK() function for label switching within and between K
Expand Down
Loading

0 comments on commit 6c2e83e

Please sign in to comment.