Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
54de06e
issue #32 complete
Cristianetaniguti Jul 18, 2025
8890234
vcf check never breaks + viewpoly output
Cristianetaniguti Aug 11, 2025
d4e41ca
update Dockerfile
Cristianetaniguti Aug 12, 2025
52db70b
version 1.3.1
Cristianetaniguti Aug 12, 2025
8a6cb41
docker fast build
Cristianetaniguti Aug 14, 2025
b721b9b
update version
Cristianetaniguti Aug 14, 2025
04405f0
rm main branch requirement
Cristianetaniguti Aug 14, 2025
060bf7e
up version to docker test
Cristianetaniguti Aug 14, 2025
6859ff9
fix for arm64
Cristianetaniguti Aug 14, 2025
1fa8481
add vcf_sanity_check to filter tab + export PCA tab
Cristianetaniguti Aug 15, 2025
0737930
max markers as warning
Cristianetaniguti Aug 19, 2025
71c5823
error if doesnt have .gz but is compressed
Cristianetaniguti Aug 19, 2025
2ad082f
up version + BIGr from CRAN
Cristianetaniguti Aug 19, 2025
a925296
run arm64 #92
Cristianetaniguti Aug 19, 2025
f91617f
fix format #92
Cristianetaniguti Aug 19, 2025
a303e3d
sintax fix #92
Cristianetaniguti Aug 19, 2025
b3157e4
change schedule for test #92
Cristianetaniguti Aug 19, 2025
3f04519
use a native ARM64 runner #92
Cristianetaniguti Aug 19, 2025
e546fa9
add BIG citation to help files
Cristianetaniguti Aug 19, 2025
9f1a10d
add i
Cristianetaniguti Aug 19, 2025
bb6e208
deps manifest okay
Cristianetaniguti Aug 20, 2025
5abfd30
adjust version on footer
Cristianetaniguti Aug 20, 2025
21b00d9
update manifest decl.
Cristianetaniguti Aug 21, 2025
901b813
up version
Cristianetaniguti Aug 21, 2025
ef0b54d
update images
Cristianetaniguti Aug 21, 2025
0549b03
option to save removed sample list
alex-sandercock Aug 25, 2025
30527fa
Merge branch 'development' into vcf_sanity_check
alex-sandercock Aug 25, 2025
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
139 changes: 139 additions & 0 deletions .github/workflows/dockerhub-on-version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
name: Build & Push Docker image on package version change

on:
push:
branches: [ main, vcf_sanity_check ]
paths:
- .github/workflows/dockerhub-on-version.yml
- Dockerfile
- DESCRIPTION
workflow_dispatch:

concurrency:
group: docker-${{ github.ref }}
cancel-in-progress: true

env:
IMAGE: docker.io/breedinginsight/bigapp
IMAGE_DEPS: docker.io/breedinginsight/bigapp-deps
DEPS_TAG: r4.5-bioc3.21-2025-08

jobs:
check-version:
runs-on: ubuntu-latest
outputs:
changed: ${{ steps.ver.outputs.changed }}
version: ${{ steps.ver.outputs.version }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- id: ver
shell: bash
run: |
set -euo pipefail
cur_ver=$(sed -n 's/^Version:[[:space:]]*//p' DESCRIPTION | tr -d '[:space:]')
prev_sha="${{ github.event.before }}"
if git show "${prev_sha}:DESCRIPTION" >/dev/null 2>&1; then
prev_ver=$(git show "${prev_sha}:DESCRIPTION" | sed -n 's/^Version:[[:space:]]*//p' | tr -d '[:space:]')
else
prev_ver=""
fi
changed=false
if [[ -z "${prev_ver}" || "${cur_ver}" != "${prev_ver}" ]]; then changed=true; fi
echo "version=${cur_ver}" >> "$GITHUB_OUTPUT"
echo "changed=${changed}" >> "$GITHUB_OUTPUT"

build-amd64:
needs: check-version
if: needs['check-version'].outputs.changed == 'true'
runs-on: ubuntu-latest
timeout-minutes: 120
steps:
- uses: actions/checkout@v4
- uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v3
- uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.IMAGE }}
tags: |
type=raw,value=v${{ needs['check-version'].outputs.version }}-amd64
type=raw,value=sha-${{ github.sha }}-amd64
- name: Build & push app (amd64)
uses: docker/build-push-action@v6
with:
context: .
file: Dockerfile
platforms: linux/amd64
push: true
build-args: |
BASE_IMAGE=${{ env.IMAGE_DEPS }}:${{ env.DEPS_TAG }}
tags: ${{ steps.meta.outputs.tags }}
cache-from: |
type=registry,ref=${{ env.IMAGE }}:buildcache-amd64
cache-to: type=registry,ref=${{ env.IMAGE }}:buildcache-amd64,mode=max,compression=zstd

build-arm64:
needs: check-version
if: needs['check-version'].outputs.changed == 'true'
continue-on-error: true
runs-on: ubuntu-latest
timeout-minutes: 350
steps:
- uses: actions/checkout@v4
- uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v3
- uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.IMAGE }}
tags: |
type=raw,value=v${{ needs['check-version'].outputs.version }}-arm64
type=raw,value=sha-${{ github.sha }}-arm64
- name: Build & push app (arm64)
uses: docker/build-push-action@v6
with:
context: .
file: Dockerfile
platforms: linux/arm64
push: true
build-args: |
BASE_IMAGE=${{ env.IMAGE_DEPS }}:${{ env.DEPS_TAG }}
tags: ${{ steps.meta.outputs.tags }}
cache-from: |
type=registry,ref=${{ env.IMAGE }}:buildcache-arm64
cache-to: type=registry,ref=${{ env.IMAGE }}:buildcache-arm64,mode=max,compression=zstd

manifest:
needs: [check-version, build-amd64, build-arm64]
if: >
needs['check-version'].outputs.changed == 'true' &&
needs['build-amd64'].result == 'success' &&
needs['build-arm64'].result == 'success'
runs-on: ubuntu-latest
steps:
- uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}

- name: Create multi-arch manifest
env:
IMAGE: ${{ env.IMAGE }}
PKG_VERSION: ${{ needs['check-version'].outputs.version }}
run: |
set -euo pipefail
docker buildx imagetools create \
-t "$IMAGE:v${PKG_VERSION}" \
-t "$IMAGE:latest" \
"$IMAGE:v${PKG_VERSION}-amd64" \
"$IMAGE:v${PKG_VERSION}-arm64"
3 changes: 1 addition & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: BIGapp
Title: Breeding Insight Genomics Shiny Application
Version: 1.4.0
Version: 1.5.1
Authors@R:
c(
person(c("Alexander", "M."), "Sandercock",
Expand Down Expand Up @@ -73,7 +73,6 @@ Imports:
methods
Remotes:
github::jendelman/GWASpoly,
github::Breeding-Insight/BIGr,
bioc::Rsamtools
Suggests:
testthat
68 changes: 23 additions & 45 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,47 +1,25 @@
FROM rocker/r-ver:4.4.2
RUN apt-get update && apt-get install -y cmake libz-dev libcurl4-openssl-dev libssl-dev
RUN R -e 'install.packages("remotes")'
RUN Rscript -e 'remotes::install_version("adegenet",upgrade="never", version = "2.1.10")'
RUN Rscript -e 'remotes::install_version("curl",upgrade="never", version = "6.0.1")'
RUN Rscript -e 'remotes::install_version("DT",upgrade="never", version = "0.33")'
RUN Rscript -e 'remotes::install_version("dplyr",upgrade="never", version = "1.1.4")'
RUN Rscript -e 'remotes::install_version("vcfR",upgrade="never", version = "1.15.0")'
RUN Rscript -e 'remotes::install_version("ggplot2",upgrade="never", version = "3.5.1")'
RUN Rscript -e 'remotes::install_version("tidyr",upgrade="never", version = "1.3.1")'
RUN Rscript -e 'remotes::install_version("curl",upgrade="never", version = "6.0.1")'
RUN Rscript -e 'remotes::install_version("shiny",upgrade="never", version = "1.9.1")'
RUN Rscript -e 'remotes::install_version("config",upgrade="never", version = "0.3.2")'
RUN Rscript -e 'remotes::install_version("bs4Dash",upgrade="never", version = "2.3.4")'
RUN Rscript -e 'remotes::install_version("golem",upgrade="never", version = "0.5.1")'
RUN Rscript -e 'remotes::install_version("purrr",upgrade="never", version = "1.0.2")'
RUN Rscript -e 'remotes::install_version("markdown",upgrade="never", version = "1.13")'
RUN Rscript -e 'remotes::install_version("scales",upgrade="never", version = "1.3.0")'
RUN Rscript -e 'remotes::install_version("plotly",upgrade="never", version = "4.10.4")'
RUN Rscript -e 'remotes::install_version("shinyWidgets",upgrade="never", version = "0.8.7")'
RUN Rscript -e 'remotes::install_version("shinyjs",upgrade="never", version = "2.1.0")'
RUN Rscript -e 'remotes::install_version("shinydisconnect",upgrade="never", version = "0.1.1")'
RUN Rscript -e 'remotes::install_version("shinyalert",upgrade="never", version = "3.1.0")'
RUN Rscript -e 'remotes::install_version("stringr",upgrade="never", version = "1.5.1")'
RUN Rscript -e 'remotes::install_version("updog",upgrade="never", version = "2.1.5")'
RUN Rscript -e 'remotes::install_version("AGHmatrix",upgrade="never", version = "2.1.4")'
RUN Rscript -e 'remotes::install_version("factoextra",upgrade="never", version = "1.0.7")'
RUN Rscript -e 'remotes::install_version("httr",upgrade="never", version = "1.4.7")'
RUN Rscript -e 'remotes::install_version("future",upgrade="never", version = "1.34.0")'
RUN Rscript -e 'remotes::install_version("shinycssloaders",upgrade="never", version = "1.1.0")'
RUN Rscript -e 'remotes::install_version("RColorBrewer",upgrade="never", version = "1.1.3")'
RUN Rscript -e 'remotes::install_version("tibble",upgrade="never", version = "3.2.1")'
RUN Rscript -e 'remotes::install_version("rrBLUP",upgrade="never", version = "4.6.3")'
RUN Rscript -e 'remotes::install_version("MASS",upgrade="never", version = "7.3.60.2")'
RUN Rscript -e 'remotes::install_version("Matrix",upgrade="never", version = "1.7.0")'
RUN Rscript -e 'remotes::install_version("matrixcalc",upgrade="never", version = "1.0.6")'
RUN Rscript -e 'remotes::install_github("Breeding-Insight/BIGr",upgrade="never")'
RUN Rscript -e 'remotes::install_github("jendelman/GWASpoly",upgrade="never")'
# syntax=docker/dockerfile:1.7
# Buildx/Actions will pass BASE_IMAGE as a manifest tag that covers both arches
ARG BASE_IMAGE=docker.io/breedinginsight/bigapp-deps:r4.5-bioc3.21-2025-08
FROM ${BASE_IMAGE}

RUN mkdir /build_zone
ADD . /build_zone
WORKDIR /build_zone
RUN R -e 'remotes::install_local(upgrade="never")'
RUN rm -rf /build_zone
EXPOSE 80
CMD R -e "options('shiny.port'=80,shiny.host='0.0.0.0');BIGapp::run_app()"
SHELL ["/bin/bash","-eo","pipefail","-c"]
ENV DEBIAN_FRONTEND=noninteractive TZ=UTC
ENV MAKEFLAGS="-j2" R_PKG_INSTALL_ARGS="--no-build-vignettes --no-manual"

# App install (only your code changes should rebuild this layer)
WORKDIR /app
COPY DESCRIPTION /app/
# COPY NAMESPACE /app/ # if present, include for better cache hits
COPY . /app
RUN R -q -e "remotes::install_local('.', upgrade='never', dependencies=TRUE, \
INSTALL_opts=c('--no-build-vignettes','--no-manual'))"

# Runtime
RUN useradd -m appuser
USER appuser
WORKDIR /app
EXPOSE 80
HEALTHCHECK --interval=30s --timeout=5s --retries=5 \
CMD wget -qO- http://localhost:${PORT:-80}/ || exit 1
CMD ["R","-q","-e","options(shiny.port=as.integer(Sys.getenv('PORT','80')), shiny.host='0.0.0.0'); BIGapp::run_app()"]
78 changes: 78 additions & 0 deletions Dockerfile.deps
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
# syntax=docker/dockerfile:1.7
FROM rocker/r2u:noble

SHELL ["/bin/bash","-eo","pipefail","-c"]
ENV DEBIAN_FRONTEND=noninteractive TZ=UTC
# keep compiles gentle for CI/QEMU
ENV MAKEFLAGS="-j2"
ENV R_PKG_INSTALL_ARGS="--no-build-vignettes --no-manual"

# System libs (no Bioc via apt to avoid ABI/arch mismatches)
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt/lists,sharing=locked \
apt-get update && apt-get install -y --no-install-recommends \
build-essential gfortran cmake git wget pkg-config \
ccache \
libhts-dev \
libcurl4-gnutls-dev libssl-dev libxml2-dev \
libpng-dev libjpeg-dev libfreetype6-dev libfontconfig1-dev \
libbz2-dev liblzma-dev zlib1g-dev \
r-cran-remotes r-cran-pak r-cran-biocmanager \
&& rm -rf /var/lib/apt/lists/*

# ccache
ENV CCACHE_DIR=/root/.cache/ccache
RUN --mount=type=cache,target=/root/.cache/ccache ccache -M 2G && \
{ echo 'CC=ccache gcc'; echo 'CXX=ccache g++'; echo 'FC=ccache gfortran'; } >> /usr/lib/R/etc/Makevars.site

# ---- CRAN via r2u binaries first (fast) ----
ENV CRAN_PKGS="adegenet curl DT dplyr vcfR \
ggplot2 tidyr shiny config bs4Dash \
golem purrr markdown scales plotly \
shinyWidgets shinyjs shinydisconnect shinyalert \
stringr updog AGHmatrix factoextra \
httr future shinycssloaders RColorBrewer \
tibble rrBLUP MASS Matrix matrixcalc BIGr"
RUN install2.r --skipinstalled --ncpus 1 $CRAN_PKGS || true

# ---- Bioconductor from source (R 4.5 -> Bioc 3.21) ----
RUN --mount=type=cache,target=/root/.cache/R/src Rscript - <<'RS'
options(Ncpus = 2)
repos <- BiocManager::repositories(version = "3.21")
options(repos = repos)
bioc_pkgs <- c("Rsamtools","Biostrings","pwalign","VariantAnnotation")
for (p in bioc_pkgs) {
if (!requireNamespace(p, quietly = TRUE)) {
message("Installing Bioconductor (source): ", p)
install.packages(p, dependencies = TRUE, type = "source",
INSTALL_opts = c("--no-build-vignettes","--no-manual"))
}
}
RS

# ---- Fallback for any missing CRAN pkgs (source, sequential) ----
RUN --mount=type=cache,target=/root/.cache/R/src Rscript - <<'RS'
pkgs <- strsplit(Sys.getenv("CRAN_PKGS"), " +")[[1]]
miss <- setdiff(pkgs, rownames(installed.packages()))
if (length(miss)) {
message("Installing remaining CRAN from source: ", paste(miss, collapse=", "))
for (p in miss) {
install.packages(p, repos="https://cloud.r-project.org", type="source",
INSTALL_opts=c("--no-build-vignettes","--no-manual"))
}
}
RS

# ---- GitHub dep (pak-free to avoid QEMU helper issues) ----
RUN R -q -e "remotes::install_github('jendelman/GWASpoly', upgrade='never', dependencies=TRUE, \
INSTALL_opts=c('--no-build-vignettes','--no-manual'))"

# Version snapshot (handy for audits)
RUN R -q -e "pkgs <- c('adegenet','curl','DT','dplyr','vcfR','ggplot2','tidyr','shiny','config','bs4Dash', \
'golem','purrr','markdown','scales','plotly','shinyWidgets','shinyjs','shinydisconnect','shinyalert', \
'stringr','updog','AGHmatrix','factoextra','httr','future','shinycssloaders','RColorBrewer', \
'tibble','rrBLUP','MASS','Matrix','matrixcalc','BIGr', \
'Rsamtools','VariantAnnotation','Biostrings','pwalign'); \
ip <- installed.packages(); dir.create('/opt/pins', recursive=TRUE, showWarnings=FALSE); \
write.table(data.frame(Package=pkgs, Version=ip[pkgs,'Version']), \
file='/opt/pins/deps_versions.tsv', sep='\t', row.names=FALSE, quote=FALSE)"
5 changes: 3 additions & 2 deletions R/app_ui.R
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,9 @@ app_ui <- function(request) {
)
),
left = div(
style = "display: flex; align-items: center; height: 100%;", # Center the version text vertically
"v1.4.0 development")
style = "display: flex; align-items: center; height: 100%;",
sprintf("v%s", as.character(utils::packageVersion("BIGapp")))
)
),
dashboardBody(
disconnectMessage(), #Adds generic error message for any error if not already accounted for
Expand Down
5 changes: 3 additions & 2 deletions R/mod_DosageCall.R
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this requiring that the VCF file be compressed for the analysis to run?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should be OK to use a compressed or uncompressed file

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, both are allowed, but there was a bug with our example uncompressed VCF because it has less/equal 100 markers, the same/less amount than the subsetting for testing. Bug fixed.
The check will only break if the file has the .gz but it is not compressed or the opposite, or if it has non compatible compression (bz2 or .xz)

Original file line number Diff line number Diff line change
Expand Up @@ -397,13 +397,14 @@ mod_DosageCall_server <- function(input, output, session, parent_session){

error_if_false <- c(
"VCF_header", "VCF_columns", "unique_FORMAT",
"samples", "max_markers", "chrom_info", "pos_info", "allele_counts"
"samples", "chrom_info", "pos_info", "allele_counts", "VCF_compressed"
)

error_if_true <- c(
"duplicated_samples", "duplicated_markers"
)
warning_if_false <- "ref_alt"
warning_if_false <- c("ref_alt","max_markers")

checks_result <- vcf_sanity_messages(checks,
error_if_false,
error_if_true,
Expand Down
Loading
Loading